Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (54 sloc) 3.05 KB

Contribution guide

Table of Contents

Development Information

Requirements

Technologies we use

Starting with development

For local development you can use:

  • yarn storybook

In case you want to develop in your current project:

  • yarn add @kiwicom/orbit-components
  • in current folder yarn watch
  • in current folder yarn link
  • in the project where you want to use this project yarn link @kiwicom/orbit-components

See Yarn Link documentation for more information.

Testing

We encourage adding tests to all components in Orbit. Jest is the testing framework across all types of tests in Orbit.

Before writing the test for a new component, first check component testing conventions.

Types of tests required to pass on every component:

  • Unit tests
  • Visual regression test

Unit tests

For checking the correctness of the component run yarn test-ci to perform the same automatic checks as the CI server. You can also run these checks separately by typing:

  • yarn flow for the static type check
  • yarn eslint for ESLint check
    • some warnings can be fixed automatically by running yarn eslint --fix
  • yarn test to run all Jest tests

If you need to update tests because of some changes in the code, you can do it by running yarn test -u. We strongly recommend testing your component in different types of browsers across different platforms.

Visual regression test

We are still working on this, we will add documentation as soon as possible.

Adding a new icon

It's easy to update or add a new icon because SVGs are automatically converted to React components. See this documentation for more information.

Props naming convention

We want to ensure that all props are consistent across all components. This convention can help choose the right prop names in for your new components.

Component design

Check this section for a complete description of the structure of the files which are necessary for a Component check.

Commits

We are using this commits convention to ensure that all commits are pushed in some logic from all devs.

Versioning

We release orbit-components under Semantic Versioning 2.0. See here.

You can’t perform that action at this time.