You want to contribute? Nice! Below are some guidelines for ensuring that your contribution makes sense for everybody.
Found a problem? Want a new feature?
- See if your issue or idea has already been reported.
- Provide detailed reproduction instructions as well as what behavior is expected.
Pull requests are the greatest contributions, so be sure they are focused in scope.
- To begin, fork this project, clone your fork, and add our upstream.
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-user>/calcite-design-tokens
# Navigate to the newly cloned directory
cd calcite-design-tokens
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/esri/calcite-design-tokens
# Install the tools necessary for development
npm install
- Create a branch for your feature or fix:
# If you are a designer setting up a branch for FigmaTokens Plugin, make sure your branch name starts with `designer/`.
git checkout -b designer/[yourname]
# Use the calcite default branching pattern
git checkout -b [yourname]/[type]-[issue#]
- Be sure your code follows our practices.
# Test current code
npm run test
- Push your branch up to your fork:
# Push a designer branch
git push origin designer/[yourname]
# Push a developer branch
git push origin [yourname]/[type]-[issue#]
- Now open a pull request with a clear title and description.
- Following the rules of SEMVER, change the version number in
package.json
to the appropriate version number. - Write a description of the changes, additions, and bug fixes in
CHANGELOG.md
. - Run
npm run build
to make sure thebuild/
files are updated. - Make sure
Esri/calcite-design-tokens
is up-to-date with your changes (via Pull Request). - Run
npm run release
. If prompted enter your GitHub credentials.
Github actions facilitate the token handoff between the Designers using the Figma Tokens Plugin and a multi-branch git repo.
Designers using the Figma Token Plugin should set their watched git repo to designers/[custom-name]
.
This file allows designers to each work off their own branch. Helping prevent accidental overwrites from other people working on the same tokens files.
Automated Steps
- Watches for changes to any branch in the repo named
designers/*
. - Generate a pull request with new changes to the set feature branch.
Await reviews from the team before merging the new work from designers into the feature branch. This allows time for discussion and alignment on bug fixes, features, and potential breaking changes before merging.
When changes are detected on the feature branch, generate a pull-request back to the designer branches. This avoids the burden on designers to have to switch between branches in the Figma Token plugin and ensuring any conflicts between each designer's branch and the feature branch do not accidentally overwrite the designers work.
Automated Steps
- Watch for changes on the feature branch.
- Open pull-requests to each of the designer branches set in the action file.
- Add
automated-tokens-pr'
label.
Auto merge pull requests created with the label automated-tokens-pr
.
Automated Steps
- Watch for pull requests with the label
automated-tokens-pr
. - Wait to confirm the pull request passes required checks.
- Merge the pull request with the commit message
chore: automatic merge
.