@comatch/design-system

A set of rules and components (react) to simplify work when adopting Comatch styles.

Usage no npm install needed!

<script type="module">
  import comatchDesignSystem from 'https://cdn.skypack.dev/@comatch/design-system';
</script>

README

:point_right: Live Storybook preview :point_left:

lines coverage badge lines coverage badge lines coverage badge lines coverage badge

Contents:

Guidelines

Code Approval & QA before deployment

  1. Make sure you are up to date with master branch:
    • git checkout master
    • git pull origin master
    • git checkout <YOUR_WORKING_BRANCH>
    • git rebase master
  2. Create a pull request into master
  3. Get QA approval from Product Design: run storybook locally and demo to designer
  4. Get pull request approved: notify all teams of any updated components
  5. Merge your PR into master

Deployment

  1. Make sure you are up to date with master branch:
    • git checkout master
    • git pull origin master
  2. Check that all CI steps pass (no errors etc):
    • yarn lint
    • yarn test
    • yarn start (make sure that storybook is working as expected)
    • yarn build (generate the new bundle, making sure there are no errors)
    • npm version major|minor|patch.
      • If you are just adding or updating new components and/or stories, you need to bump minor version as: npm version minor. This will automatically increment the version and creates a new version (unpushed) commit. Read more about semver (Semantic Versioning) When not clear what to do, ask in the channel: #design-system.
  3. Run yarn build one more time. This is because as we just updated the package version in above command, we need to generate a fresh build to get that updated version value into the build.
  4. npm publish (will publish to the npm registry)
  5. Push version commit to master:
    • If you have a permission to push directly to master, run: git push origin master
    • If you don't have that permission or if above command fails due to some reason, create a new branch out of that version commit and push as following steps:
      • run: git log to get the commit message sha hash. This should be the first commit in the list.
      • Create branch as: git branch <BRANCH_NAME> <SHA_HASH_OF_COMMIT>
      • This branch has already the version commit, so just push it: git push
      • Get it approved and merge this branch into master.
  6. yarn build (generate the new bundle)
  7. Create tag with latest version of the package:
    • git tag <VERSION_NUMBER_IN_PACKAGE_JSON>
    • git push origin <VERSION_NUMBER_IN_PACKAGE_JSON>
  8. Deploy storybook to Github Pages:
    • yarn deploy:storybook