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.
- IBMer Contributions
- Run Charts in Local Environment
- Issue guidelines
- Pull request guidelines
- Code guidelines
- Legal
If you are an IBMer, complete these steps, before contributing to any open source project:
- Complete your yearly training.
- Map your identity using IBM's GitHub mapper tool. This will generate an email and invite you to join the IBM org on Github.
- Get your manager’s approval.
You can find out more at W3 Developer.
We use Lerna to manage all @carbon/charts
related packages.
These are the Node and Yarn versions we recommend:
- Node Version:
20.x
- Yarn Version:
4.2.x
To get charts running locally on your machine:
- Fork this repo
- Git clone your fork locally
- Run
yarn install
- Run
yarn build
to build all packages and the documentation website
cd packages/docs
yarn dev
- 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 the library locally, then configure the remotes from your
charts/
directory:# Assign the original repo to a remote called "upstream" git remote add upstream [email protected]:carbon-design-system/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.
Each source file must include a license header for the Apache Software License 2.0. Using the SPDX format is the simplest approach. For example:
/*
Copyright <holder> All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
We have tried to make it as easy as possible to make contributions. This applies to how we handle the legal aspects of contribution. We use the same approach - the Developer's Certificate of Origin 1.1 (DCO) - that the Linux® Kernel community uses to manage code contributions.
We simply ask that when submitting a patch for review, the developer must include a sign-off statement in the commit message.
Here is an example Signed-off-by line, which indicates that the submitter accepts the DCO:
Signed-off-by: John Doe <[email protected]>
You can include this automatically when you commit a change to your local git repository using the following command:
git commit -s