Thank you so much for your interest in contributing to Manifest! Before you begin please take a moment to review our contribution guidelines.
We believe in providing a safe and positive environment for all contributors and expect all community members to help maintain that culture. Please review our code of conduct to understand our do's and dont's.
Before contributing to Manifest Design System, you should make sure to have the following tools installed:
We adhere to semantic versioning for versioning our packages, utilizing changesets for version bumping and releasing.
Our main
should remain stable, pull request generally should be opened against this branch. For
major releases or breaking changes, please use the next
branch.
When naming branches, please follow our <type>/<scope>
convention.
Type
Must be one of the following:
Type | Purpose |
---|---|
build |
Changes that affect the build system or external dependencies. |
ci |
Changes to our CI configuration. |
docs |
Documentation only changes. |
feat |
A new feature. |
fix |
A bug fix. |
perf |
A code change that improves performance. |
refactor |
A code change that neither fixes a bug nor adds a feature. |
style |
Changes that do not affect the meaning of the code . |
test |
Adding missing tests or correcting existing tests. |
Scope
The scope should be a kebab-cased id representing the changes to be made.
We follow the conventional commits specification for commit messages. This ensures our commits and readable and scannable.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and the scope of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
The footer should contain a closing reference to an issue if any.
Examples
feat(button): adding loading indicator
fix(button): increase the padding of the button
The padding in our react styles does not match the design system specification
If the commit reverts a previous commit, it should begin with revert: , followed by the header of
the reverted commit. In the body it should say: This reverts commit <hash>.
, where the hash is the
SHA of the commit being reverted.
Must be one of the following:
Type | Purpose |
---|---|
build |
Changes that affect the build system or external dependencies. |
ci |
Changes to our CI configuration. |
docs |
Documentation only changes. |
feat |
A new feature. |
fix |
A bug fix. |
perf |
A code change that improves performance. |
refactor |
A code change that neither fixes a bug nor adds a feature. |
style |
Changes that do not affect the meaning of the code. |
test |
Adding missing tests or correcting existing tests. |
The scope should be the name of the package affected (as perceived by the person reading the changelog generated from commit messages.
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.
Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines. The rest of the commit message is then used for this.
Pull Request titles should follow the following format:
<type>: <subject>
Note this excludes scope <type>(<scope>): ...
Before working on an issue or feature please review any tickets, pull requests, and discussions to be certain that no one is actively working on the same issue or feature.
-
Fork the repository
-
Clone your fork locally
git clone https://github.com/<your username>/manifest.git
cd manifest
- Add upstream remotes
git remote add upstream https://github.com/project44/manifest.git
-
Create a new branch off of
main
. -
Make and commit your changes.
We use changesets for changelog and release management.
- Add a changeset
yarn changeset
-
Select the packages to be included in the release.
-
Select the semvar bump type.
-
Add a message that will be added to the changelog.
For changes that do not require a package release (e.g. doc site changes, ci, etc..) add an empty changeset:
yarn changeset add --empty
- Commit the newly generate changelog.
Manifest uses Turborepo to manage applications.
yarn workspaces list
They are divided into
apps
- Applications that are deployed to productionstorybook
website
- Documentation site
packages
- Packages that are used by other applications or packages@project44-manifest/react
is the primary package that contains all of the react components and exports them for consumption outside Manifest
Run commands from the global root of the repository. For example, to run the website
application:
yarn workspace website dev
When working with react components and packages, we have provided a storybook development server to use for validation.
yarn workspace storybook dev
We use Docusuarus to generate our documentation site. To run the docs site locally, run the following command:
yarn workspace website dev
The website is deployed to GitHub Pages via the deploy-website
GitHub Action.
If changing a React component prop, you will need to regenerate the prop types. To do so, run the following command:
yarn workspace @project44-manifest/react generate-props
We use jest as our test runner along with
react testing library for our react
code base. Please be sure to add or update unit tests for any code changes. Run yarn test
to run
jest.
We use ESLint and Prettier to help maintain our coding style. We recommend enabling linting in your editor for the best developer experience.
You may run code style checks manually with the following commands:
Command | Purpose |
---|---|
yarn format |
Lints all projects. |
yarn format:write |
Format all projects. |
By contributing your code to the manifest GitHub repository, you agree to license your contribution under the MIT license.