Skip to content

Contributing to Default

Daniel W edited this page Jul 5, 2020 · 25 revisions

🛠️ Making updates

  1. Find an issue you want to fix, assign it to yourself.
  2. Fork the Default Component repo.
  3. Create a branch for the feature, hotfix, or bug you're working on (e.g., feature-feature-name).
  4. Make your changes and open a new pull request in GitHub.
  5. Ensure your PR description clearly describes the problem, your solution, and is linked to the issue it resolves.
  6. For more information on GitHub workflow basics, see: How to Use the Github Workflow
  • Don't forget to update your tickets

⚙️ Developing components

If questions come up when following these steps, look to the other files available in these directories as examples, or email support@default.services.

  1. Create a folder for the component in src/components, adding the component's .js and .scss file(s).
  2. Import the component's .scss file in src/assets/scss/styles.module.scss, this is for CSS modules.
  3. Create a story file for the component in src/stories/, similar to the other story files.
  4. From here you can run yarn run start:storybook in terminal to easily develop your component in a controlled environment.
  5. Once complete, run yarn run build in 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 dist file (created from build in the last step) over the <other react app>/node_modules/@default-services/components/dist folder, 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 setClassName to 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.

🦟 Reporting bugs

  1. Ensure the bug was not already reported by searching on GitHub under Issues.
  2. 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.

📢 Membership status

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.

❔ Questions

Clone this wiki locally