Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Contributions to this project are released to the public under the project's open source license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
This is an npm workspaces monorepo with multiple packages:
| Directory | Package | Description |
|---|---|---|
packages/storybook-addon-performance-panel |
@github-ui/storybook-addon-performance-panel |
The addon — collectors, panel UI, and types |
packages/examples-react |
@github-ui/examples-react |
React docs storybook (@storybook/react-vite) |
packages/examples-html |
@github-ui/examples-html |
HTML docs storybook (@storybook/html-vite) |
packages/storybook-config |
@github-ui/storybook-config |
Shared storybook config (theming, features, Vite helpers) |
| Command | Description |
|---|---|
npm run build |
Build the addon |
npm run build:watch |
Build the addon in watch mode |
npm test |
Run tests |
npm run lint |
Lint with ESLint + Prettier |
npm run tsc |
Type-check the addon |
npm run dev |
Build + start both storybooks with portless |
npm run docs |
Build the addon and start the React docs storybook |
npm run docs:build |
Build the addon and the React docs for production |
npm run docs:html |
Build the addon and start the HTML docs storybook |
npm run docs:html:build |
Build the HTML docs for production |
When using npm run dev, each storybook is served at a stable .localhost URL via portless:
- React docs:
http://examples-react.localhost:1355 - HTML docs:
http://examples-html.localhost:1355
These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.
- Install Node.js (v22 or later)
- Install dependencies:
npm install
- Fork and clone the repository
- Install the dependencies:
npm install - Build the addon:
npm run build - Make sure the tests pass on your machine:
npm test - Make sure the linter passes:
npm run lint - Create a new branch:
git checkout -b my-branch-name - Make your change, add tests, and make sure the tests and linter still pass
- Push to your fork and submit a pull request
- Pat yourself on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a good commit message.