Repository navigation
Open
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingrole: Front Endsize: 3ptCan be done in 13-18 hours
Description
Trillium Firstmate 🤖
Overview
Add one in-app page, /design-system, where volunteers can see the principles, tokens, and every shared component with a live demo. Each later component ticket adds its own entry, so the page is the single place to look before building UI.
Dependencies
- Foundation: add the shared UI toolkit (cn helper, cva, '@/' alias, test setup, components/ui folder) #2257
- Foundation: Tailwind theme tokens, fonts, breakpoints, and the temporary 'important' flag #2258
Action Items
- Create
client/src/pages/DesignSystem/index.tsxand add a/design-systemroute in theroutesarray ofclient/src/App.jsx(React Router v5). The page is public and not linked from the navbar. - Build the page from eight sections, each a
<section>with a stable id so people can link to it:ds-principles,ds-foundations,ds-tokens,ds-components,ds-patterns,ds-content,ds-accessibility,ds-governance.- Principles: 4-6 short rules that settle design arguments (for example "match the existing look", "one primitive per job", "keyboard first").
- Foundations: color swatches, type scale specimens, spacing and breakpoints, radius, shadow, motion, icon set.
- Tokens: a table of every
@themetoken from the tokens ticket with name, value, and a swatch. Drive it from a typed list inclient/src/pages/DesignSystem/tokens.ts, and add a Vitest check that every token in that list exists inclient/src/tailwind.css. - Components: render one
ComponentDocper primitive from a registry fileclient/src/pages/DesignSystem/component-docs.tsx(empty at first, with theComponentDoclayout component: name, description, props/variants table, states, do/don't, code example, live demo). Later tickets append to this registry. - Patterns: placeholder list of the layouts and flows that will be documented (form, list with actions, dialog confirm, page header).
- Content guidelines: voice and microcopy rules, filled in from how the app words things today (button labels, error messages, empty states).
- Accessibility: contrast, visible focus, keyboard support, reduced motion.
- Governance: how to add or change a component (build in
components/ui/, add the test, add the catalogue entry, migrate call sites), and who to ask (the VRMS front-end lead).
- Add a Vitest test that renders the page and checks all eight section ids are present.
- Add a one-line mention of the page to
client/src/components/ui/README.md.
Acceptance Criteria
-
/design-systemloads without errors and shows all eight sections. - The Tokens table matches
tailwind.css, and the Vitest check fails if a listed token is missing there. - The
ComponentDoclayout and registry exist so the next ticket can add an entry with one small file change. - The page uses only Tailwind classes (no
@mui/*, no new.scss). - Page looks right at 1280 px and at 390 px width.
-
yarn typecheck,yarn buildandyarn testpass.
Resources/Instructions
- Routes live in
client/src/App.jsx(theroutesarray and theSwitch). - Tokens come from
client/src/tailwind.css(see Foundation: Tailwind theme tokens, fonts, breakpoints, and the temporary 'important' flag #2258). - Accessibility guidance: https://www.w3.org/WAI/WCAG22/quickref/
Additional Notes
- Decision needed: where the page renders. The app shell currently shows every page inside a 500 px-wide white box (
App.jsx). Proposed default: render inside the existing shell, single column, so the catalogue shows components at the width they really appear. If that is too cramped, the app-shell ticket can add a wider layout for this route. - Decision needed: visibility. Proposed default: public but unlinked. Alternative: show only when
import.meta.env.DEVis true. - Only the Components section grows over time. The other sections are written once here and edited when a decision changes.
Metadata
Metadata
Assignees
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingrole: Front Endsize: 3ptCan be done in 13-18 hours
Type
Projects
- StatusShow more project fieldsNew Issue Approval
Activity