-
-
Notifications
You must be signed in to change notification settings - Fork 5
Contributing to Default
Daniel W edited this page Jul 5, 2020
·
25 revisions
- Find an issue you want to fix, assign it to yourself.
- Fork the Default Component repo.
- Create a branch for the feature, hotfix, or bug you're working on (e.g., feature-feature-name).
- Make your changes and open a new pull request in GitHub.
- Ensure your PR description clearly describes the problem, your solution, and is linked to the issue it resolves.
- For more information on GitHub workflow basics, see: How to Use the Github Workflow
- Don't forget to update your tickets
If questions come up when following these steps, look to the other files available in these directories as examples, or email support@default.services.
- Create a folder for the component in
src/components, adding the component's.jsand.scssfile(s). - Import the component's
.scssfile insrc/assets/scss/styles.module.scss, this is for CSS modules. - Create a story file for the component in
src/stories/, similar to the other story files. - From here you can run
yarn run start:storybookin terminal to easily develop your component in a controlled environment. - Once complete, run
yarn run buildin the terminal to build the project and Storybook.
- Be sure to test your component in another React app. This can be done installing the Default component library in that app, then copying your dev build's
distfile (created from build in the last step) over the<other react app>/node_modules/@default-services/components/distfolder, and then starting that app. - Completed components should also include completed Storybook stories, these help display components in-action and are also used to help create examples in the Default component documentation.
-
Don't forget to import and set
setClassNameto allows the user to include their class names, while also keeping our CSS module class names. See other components for examples of how this works.
- Ensure the bug was not already reported by searching on GitHub under Issues.
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
By default, GitHub sets your organization membership status to private. If you want people to know that your a member of the Default Services organization, you will need to update your settings to publicize your membership.
- Reach out to a member of the Default team or email support@default.services with any questions.