Skip to content

Contributing

Francis Goh edited this page Oct 26, 2019 · 18 revisions

Contribution Guide

How to Contribute

  1. Clone the glints-aries repo
    • For Glints engineers: you do not have to fork the repo. This allows other engineers to easily access your branches.
  2. Create a branch (see Branch-Naming)
  3. Commit your changes and push the code
  4. Submit a PR
    • request a review from the Glints Aries maintainer (currently @franciscrispin)
    • assign yourself to the PR
    • add appropriate label(s)
    • reference any relevant issues or PRs by pasting the links in the comments
    • resolve any merge conflicts before submitting the PR
  5. Once the PR is approved, the reviewer will merge the PR and publish a new version of the library

Branch Naming

  • New features or enhancements: feature/feature-name
  • Bugs or hotfixes: hotfix/hotfix-name
  • Writing tests: test/component-name
  • Documentation: doc/documentation-name

Rules

1. All components should have good test coverage.

We are in the process of documenting how we define test coverage that is "good".

2. Update the ComponentStory if necessary.

Example:

ButtonStory

Demo

3. Run prettier to format your code changes.

Run prettier automatically on save

If you are using vscode, download the prettier extension and turn on Editor: Format On Save

Run prettier manually using the command line

Run this command to format all subdirectories and files in a directory:

yarn prettier --write "*src/directoryName/**/*.{tsx,ts}"

4. Fix all typescript or eslint errors/warnings before submitting a PR.

Running Tests

Run tests locally before pushing code up. We are in the midst of implementing continuous integration and deployment into this project.

For more information on testing

FAQ

How to upgrade to the latest version of glints-aries

yarn upgrade glints-aries

For glints engineers, you can run this command on your review apps.

How to add an icon

  • Add your icon to the IconLibrary file
    • Remove all unnecessary html attributes from the <path> (e.g. id)
  • Follow the How to Contribute section
Clone this wiki locally