Skip to content

Latest commit

 

History

History
92 lines (61 loc) · 3.7 KB

CONTRIBUTING.md

File metadata and controls

92 lines (61 loc) · 3.7 KB

Contribute to Strapi Design System

The Strapi Design System is an open-source project administered by the Strapi team. We appreciate your interest and efforts to contribute to the Design System.

All efforts to contribute are highly appreciated, we recommend you open an issue prior to spending a lot of time making a pull request that may not align with the project roadmap.

Code of Conduct

This project and everyone participating in it are governed by the Strapi Code of Conduct. By participating, you are expected to uphold this code. Please read the full text so that you can read which actions may or may not be tolerated.

You found a bugs

We are using GitHub Issues to manage our public bugs. We keep a close eye on this so before filing a new issue, try to make sure the problem does not already exist. You can also use the codesandbox template to easily show us the bug.

Non-editable part

The design system follows the Strapi branding. We use Specify to be able to synchronise the design tokens with the design tools. Some parts of the codebase can not be modified including:

  • Icons packages/strapi-icons/assets/icons/
  • Colors packages/strapi-design-system/src/themes/colors.js
  • Shadows packages/strapi-design-system/src/themes/shadows.js

Before Submitting a Pull Request

The core team will review your pull request and will either merge it, request changes to it, or close it.

Before submitting your pull request make sure the following requirements are fulfilled:

  • Fork the repository and create your branch from main.
  • Run yarn setup in the repository root.
  • If you’ve fixed a bug or added code that should be tested, add the tests and then link the corresponding issue in either your commit or your PR.
  • Ensure the test suites are passing:
    • yarn test
    • yarn test:e2e (The storybook app must be running for the e2e tests yarn storybook, you may need to install playwright browsers before npx playwright install)
  • Make sure your code lints (yarn lint).

Development Workflow

Please follow the instructions below:

1. Fork the repository

Go to the repository and fork it to your own GitHub account.

2. Clone from your repository

git clone [email protected]:YOUR_USERNAME/design-system.git

3. Install the dependencies

Go to the root of the repository.

cd design-system
yarn setup

4. Start storybook for component and stories documentation changes

Start the storybook application to test your changes to components or their documentation.

yarn storybook

5. Start the website for documentation changes

Start the DS website to test your changes on the documentation library.

cd website
yarn
yarn dev

Available commands

  • yarn analyze:bundle Start webpack bundle analyzer in all packages.
  • yarn setup Install dependencies and build all the packages.
  • yarn lint Lint the codebase.
  • yarn storybook Start the storybook app and load stories in files that end with .stories.mdx.
  • yarn test Run the design system tests.
  • yarn test:watch Run an interactive test watcher.
  • yarn test:e2e Run the end-to-end test suite.
  • yarn test:e2e:watch Run an interactive end-to-end test watcher.
  • yarn test:snapshots Generate snapshots.
  • yarn test:start-app Start the test application.
  • yarn generate Generate a new component.