@systatum/coneto
v2.2.0
Published
Coneto is a shared component library used across all applications at Systatum — including Workaty, Dashtomer, and others, designed with modernity, simplicity, and usability in mind.
Readme
Coneto
Coneto is a shared component library used across all applications at Systatum — including Workaty, Dashtomer, and others, designed with modernity, simplicity, and usability in mind.
To start the storybook locally:
pnpm install
pnpm storybookComponent Structure
Each main component consists of two parts:
[component].tsx– the React component[component].stories.tsx– the Storybook file to display the component
How to run:
- Install dependencies:
pnpm install - Start Storybook locally:
pnpm storybook
How to Submit Changes to Chromatic
We don't actively using Chromatic anymore.
- Open Chromatic on your desktop
- Make any necessary changes to your component
- Commit and push your changes
- Publish the changes to Chromatic:
npx chromatic --project-token={{your token}}orpnpm build-chromatic - View your updates in the Chromatic app
How to Test
- Create your component test inside the
test/e2edirectory. Each component should have its own test file. - Write your test logic to cover expected behaviors, interactions, and visual, name the file using the format
[component].cy.tsthen save it. - Commit and push your changes to the repository.
- To run tests locally:
Ensure that you have
cypressinstalled:pnpm add --save-dev cypress # you may need to do this ./node_modules/.bin/cypress install # install the cypress app locallyYou will know that you need to install
cypressif you see this kind of error:Please reinstall Cypress by running: cypress install ---------- Cypress executable not found at: /Users/adam.h/Library/Caches/Cypress/14.5.3/Cypress.app/Contents/MacOS/CypressRun the storybook server, used for E2E testing:
pnpm run storybookExecute either use one of the following commands:
pnpm test-open– opens the Cypress Test Runner with an interactive UI.pnpm test-run– runs all tests in headless mode via the CLI. Ensure that you seeAll specs passed!eventually.
Tech Stack
This repository uses:
@storybook/react-vite– the core framework that runs Storybook using Vite for faster builds and hot reloads@storybook/addon-essentials– a set of essential addons like docs, controls, actions, and viewport to enhance Storybook functionality@storybook/addon-onboarding– used for testing individual React components in isolation to ensure they behave correctly, integrated with Storybook for a consistent testing environment
Code Quality Checks
- Run unit tests:
pnpm test-openorpnpm test-run - Run the linter to check for unused code and issues:
pnpm lint
Coding convention
- Constants should always be in SNAKE_CASE_CAPITALS
- Helper functions, when they're not likely to be re-usable, should be put in the same file of the component, but located after the component's function declaration.
- Constants, when they're not likely to be re-usable, should be put in the same file of the compoennt.
How to deploy
- Build Storybook:
pnpm build-storybook - Push the build output
- Deploy it using your preferred platform (e.g., Vercel, Netlify, etc.)
