@manufac/boutique
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

boutique

Introduction

Contains a collection of data visualization components build by the Manufac UI Team.


Tooling

This project has been built using the following tools:

  • TypeScript ✅
  • Webpack Bundling ✅
  • Storybook and Loki testing ✅
  • Mantine integration ✅
  • Linting ✅
  • Prettifying & package.json sorting ✅
  • shx for OS agnostic CLI ✅

Prescribed Dev Environment

  • Node: v16.16.0
  • yarn: v1.22.19
  • OS: Ubuntu 20.04, macOS, Windows 10, WSL 1, WSL 2

Other versions/OS may also work but the above are tested by our team so far.


How to try out the product?

  • Clone the respository.
  • Install NodeJS & yarn if you don't have them on your system.
  • Open the repository folder in the CLI.
  • Run yarn install or yarn to downloads all the dependencies.
  • Run one of the following:
    • Run yarn build to build and bundle the packages into a browser-ready format and it also builds storybook bundle. OR
    • Run yarn start to start storybook, and to render components on localhost to see them in action.
      • Upon successful start, a local server should start with the storybook in localhost:6006.

Principal CLI

  • yarn build: Compiles, bundles and minifies the source code for production.
  • yarn lint: Lints the source code.
  • yarn pretty: Prettifies the source code.
  • yarn compile: Compiles the TS source code into JS using tsc.
  • yarn start: Starts storybook on localhost:6006.
  • yarn refresh: Deletes all the build/docs artefacts.
  • yarn clean: Deletes all the build/docs artefacts and other relatively-less-sensitive artefacts like node_modules & .eslintcache.
  • yarn test:loki: Run loki snapshot testings of UIs that have stories.
  • yarn update:loki: Update loki screenshots.
  • yarn prune:loki: Prune outdated screenshots (screenshots corresponding to which no stories exist).

Development IDE

VSCode is the recommended IDE for this project. Here are some extensions that can improve your productivity:

  1. Conventional Commits
  2. Gitlens
  3. Prettier
  4. ESLint
  5. Reload
  6. Version Lens

Some of these extensions require minor configuration. Those settings are provided via the .vscode folder in the project's root. VSCode should be able to auto-ingest them once these extensions are installed.


Code QA Measures

  • As one of the QA measures, we are relying on linting to enforce quality and consistency in our code. ESLint and Prettier are configured for this task. Airbnb's rule set is adopted as the standard for TS and JS code quality.
  • The functional aspects of the code quality can be improved by manual testing (via Storybook).
  • PR reviews 🙌 are expected to be the ultimate layer of defence in assuring good and cosistent code quality! All new changes should go into the main branch only after a successful review.

PR Workflow

  1. Let's say a team member (developer) raised a PR for an issue.
  2. The PR should be reviewed by every other team member (reviewer) within 2 working days.
    • If PR is raised anytime on Monday, 26th April, it should be reviewed before Tuesday, 27th April EOD.
  3. The developer should include instructions on how to test the PR, if applicable.
  4. The reviewer should perform a deep code review and point out all the possible improvements and seek clarifications if needed.
  5. Once the reviewer's concerns are addressed, the developer should intimate the reviewer.
  6. The reviewer can then chose to go for round 2 of review if needed, or if requested by the developer, and so on.
  7. If a PR fully addresses a given issue, close the issue after merging the related PR to the main branch.

Smaller PRs are preferred where possible.


Branching Workflows

Branch naming conventions

  1. Use the following structure for naming any feature branch: ${username}/#${issue-number}-${some-title}.
  2. You can read more about the reasoning here.
  3. The first portion of the branch name ${username}/... is a "grouping token". It helps in clubing all the branches owned by a particular user.

Pushing a new feature

We follow the Git Feature Branch Workflow for pushing new features into the main branch.


Commits Format

  • We use the conventional commits specification to decide how to format our commit messages.
  • This is not strictly enforced at the moment but the developers are expected to follow this specification while commiting important changes like bringing in a new feature, making a breaking change to the API, or any change that the developer feels should be reflected in the CHANGELOG in the subsequent release.
  • Conventional commits integrate well with the SemVer versioning pattern and this compatibility is the main reason for its adoption.
  • The Conventional Commits extension makes the formating & compliance of the commit messages a cake-walk!

Readme

Keywords

none

Package Sidebar

Install

npm i @manufac/boutique

Weekly Downloads

0

Version

2.2.0

License

UNLICENSED

Unpacked Size

48.2 MB

Total Files

467

Last publish

Collaborators

  • maneetgoyal