Yippee! If you're here, you must be interested in contributing something to Charts.
If that's the case, we would like to personally thank you ahead of time 🤓❤️
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
We use Lerna to manage all @carbon/charts
related packages.
These are the Node & NPM versions we recommend:
- Node Version:
12.16.1
- Yarn Version:
1.6.0
- NPM Version:
6.4.1
To get charts running locally on your machine:
- Fork this repo
- Clone your fork
- Run
yarn
(this would install all packages and get lerna setup) - Run
yarn build
to do an initial build of the monorepo and correctly link all the packages
All packages use Storybook for demos:
yarn run storybook
- Before submitting, confirm the issue doesn't already exist by browsing through existing issues. Duplicates are just a waste of space.
- Keep issues specific to one topic. Do not open an issue that describes multiple defects.
- Provide a short descriptive title that mentions the component being addressed.
- Provide enough of the relevant information below to initiate a clear issue description. Most of this content comes out-of-the-box as a template when creating a new issue.
- Type of issue
- Version of charts
- Description of the issue
- Steps taken to produce the issue
- Expected behavior
- Current behavior
- Screenshots or recording
- Code snippets
- Links to your application source code or running demo
- Include any connection/authentication information we may need to view the links
- Add relevant labels (accessibility, bug, design, discussion, feature, etc.) to help organize and identify issues. For a complete list of our labels, see the labels page.
- If you are interested in contributing, feel free to assign the issue to yourself, otherwise leave it unassigned.
-
Before creating the pull request:
-
Update the "[Unreleased]" section of
CHANGELOG.md
. -
Update the demo as needed.
-
Update the documentation as needed.
-
Do not change the version number.
-
Keep in mind there will be a code review checklist against the following requirements at time of review:
Requirement Description Demos all features All interactions spec'd out in the Design Guide has visual support and a demo as proof. Documented/annotated All rule blocks, placeholders, mixins, and functions has associated comment blocks that convey purpose and list inline notations referencing declarations that need further explanation. Matches UI/UX specs All features are pixel perfect when compared to the Design Guide. All new code follows similar structure and style to the existing codebase giving off the impression that it was written by one developer. Accessible All code passes the Dynamic Assessment Plugin (DAP) scan in Chrome. Mobile first All visual elements are elegantly responsive. RTL support All visual elements reflect bidirectional text appropriately. Performant All Sass code is strategically written in a way to limit bloat in the compiled CSS.
-
-
While creating the pull request:
- Prepend "WIP: " to the title of your pull request if it is not ready to be merged.
- Provide enough of the relevant information below to initiate a clear contribution description. Most of this content comes out-of-the-box as a template when creating a pull request.
- A list of updates with references to the related issue (see: Closing issues using keywords)
- Screenshots or recording
- @mention any key stakeholders that need to be aware of the changes
- Add relevant labels (needs review, accessibility, bug, design, feature, etc.) to help organize and identify issues. For a complete list of our labels, see the labels page
-
Run Charts locally, then configure the remotes from your
charts/
directory:# Assign the original repo to a remote called "upstream" git remote add upstream [email protected]:IBM/carbon-charts.git
-
Create a new topic branch (off the original remote branch) to contain your code changes:
git checkout -b <topic-branch-name> upstream/master
-
Commit your changes in small logical chunks. Refer to these git commit message guidelines to maintain consistency.
To commit changes, please use
yarn run commit
rather thangit commit
-
If time passes between development, locally merge (or rebase) the upstream master branch into your topic branch to avoid conflicts in your pull request. We recommend using Git's interactive rebase feature to tidy up a messy commit history.
# Fetch and merge commits history git pull upstream master # Reapply one commit at a time git rebase --interactive upstream/master
-
Complete step 5 first, before pushing your topic branch up to your fork:
git push origin <topic-branch-name>
-
Open a Pull Request with a clear title and description from the template provided.
- See Creating a pull request from a fork for step-by-step instructions.
- Ensure the base branch is assigned to
master
.
- Components should be fully equipped with all features and interactions defined in the latest Design Guide and UX Specifications.
- Components should be pixel perfect when compared to the latest Design Guide.