@manufac/boutique
v2.2.0
Published
### Introduction
Downloads
6
Readme
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.0yarn:
v1.22.19OS:
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
oryarn
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.
- Run
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 usingtsc
.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 likenode_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:
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
- Let's say a team member (developer) raised a PR for an issue.
- 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.
- The developer should include instructions on how to test the PR, if applicable.
- The reviewer should perform a deep code review and point out all the possible improvements and seek clarifications if needed.
- Once the reviewer's concerns are addressed, the developer should intimate the reviewer.
- The reviewer can then chose to go for round 2 of review if needed, or if requested by the developer, and so on.
- 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
- Use the following structure for naming any feature branch:
${username}/#${issue-number}-${some-title}
. - You can read more about the reasoning here.
- 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!