Plasma is Coveo's design system used in Coveo Cloud Administration Console. All components and their documentation are available in the demo page. The @coveord/plasma-style
package contains the generic style classes used across the components and @coveord/plasma-react
is a react implementation of multiple visual and behavioural components.
npm install @coveord/plasma-react @coveord/plasma-style
Make sure you have
The @coveord/plasma-style
and @coveord/plasma-react
packages are in maintenance mode and can be found on the v53
branch.
All the commands in the instructions must be run at the root of the project.
First you need to install the project's dependencies and link the projects together.
pnpm install
pnpm start
Changes made to any source files in any package will make the demo rebuild and refresh. Since the projects are in the same repository and we use pnpm, we don't have to link them together.
All new unit tests for components should be written using Jest and React Testing Library, and not Enzyme which is being phased out.
Tests are critical in packages/react
as this is the source of all components
To run all tests from the root, you can run pnpm test
Alternatively, you can run it directly from the packages/react
package, which also allows using two other testing methods:
- First, make sure you're in the
packages/react
package. - To watch your tests:
- run
pnpm test:watch
, wait for it to start up then hit any key. This will show you the menu. - Then, for example, to focus on a particular spec file, hit
p
to filter by a filename regex pattern, then the name of a spec file (egSingleSelectConnected
). - Then you can use
fdescribe
andfit
to focus on individual suites and tests respectively
- run
- To debug your tests:
- run
pnpm test:debug
, wait for it to start up then hit any key to pause. - In a Chromium browser (Chrome / Brave), go to chrome://inspect and you should see the process under
node_modules/jest/bin/jest
. Click inspect. - From here, you can add a
debugger
in a test, save the file, focus on the suite usingp
and then the spec file name - When the file is saved and rerun, the debugger should open in the dev tools!
- You will need to close the dev tools for the process to disconnect
- run
Every commit made to this repository must comply to the Conventional Commits specification. Our build system is configured to automatically release and publish new versions according to this convention.
We have integrated an optionnal command line utility to help you build proper commit messages.
git add . # stage the changes you want to commit npm run commit-cli # execute the commit message helper
All packages under this repository are distributed under Apache 2.0 license.