Repository navigation
Open
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingrole: Front Endsize: 2ptCan be done in 7-12 hours
Description
Trillium Firstmate 🤖
Overview
Create the small shared pieces that replace MUI CircularProgress (8 files), Box/Grid/Container layout wrappers, and Paper.
Dependencies
- Foundation: Tailwind theme tokens, fonts, breakpoints, and the temporary 'important' flag #2258
- Add a /design-system page that catalogues tokens and components #2260
Action Items
-
client/src/components/ui/spinner.tsx: a CSS-only spinning ring in the primary color, sizessm/md/lg(MUI default is 40 px),role="status"and an accessible label (default "Loading"), and respectsprefers-reduced-motion. -
client/src/components/ui/stack.tsx: flex layout withdirection,gap,align,justify,wrapprops (maps to Tailwind classes). This covers mostBoxandGrid containeruses. -
client/src/components/ui/container.tsx: centered max-width wrapper (replaces MUIContainerin 4 files; MUI default has 16/24 px side padding and themaxWidth="lg"default). -
client/src/components/ui/card.tsx: the surface used forPaperinProjectForm.jsx(grey#F1F1F1background, same radius and shadow as MUIPaper). - Add the optional
loadingprop toButtonfrom UI kit: Button component #2262 now that the spinner exists (small follow-up in this PR). - Tests for each (spinner has status role and label; stack applies the right classes; container constrains width; card renders children).
- Catalogue entries and a Patterns section example "page header with actions" built from Stack.
Acceptance Criteria
- The component lives in
client/src/components/ui/as a.tsxfile, with typed props that passyarn typecheck(strict mode). - Styling uses Tailwind classes only. Variants (if any) are declared with
cva, andclassNameis merged withcn()so callers can override. - The component does not import anything from
@mui/*or@emotion/*. - A test file next to the component (for example
button.test.tsx) covers: it renders, each variant/size, the disabled and error states where they apply, and keyboard use where it applies (Tab, Enter/Space, Escape, arrow keys).yarn testpasses. - The component has an entry on the
/design-systempage: description, props/variants, states, a short do/don't, a code example, and a live demo. - Visible focus: there is a clear focus ring when the control is reached by keyboard.
- The PR does not change any existing screen. Screens adopt the component in their own tickets.
Resources/Instructions
- MUI uses to replace:
CircularProgressinHome.jsx,UserWelcome.jsx,ProjectList.jsx,ProjectForm.jsx,OnboardOffboardVisibility.jsx,HandleAuth.jsx,donutChartLoading.jsx,editPMs/buttonGroup.jsx;ContainerinNewUser.jsx,Users.jsx,EditUsers.jsx,donutChartLoading.jsx;PaperinProjectForm.jsx. - Layout rule (documented in the Patterns section): use
Stackfor rows/columns; usegrid grid-cols-*classes directly for true grids. There is noGridcomponent, because the MUIGrid(37 uses) maps to Tailwind grid/flex classes.
Additional Notes
- Decision needed: Box. MUI
Box(36 files) is a plaindivwith styles. Proposed default: noBoxcomponent; usedivwith Tailwind classes, orStack. Only add aBoxprimitive if reviewers want one name for "generic container".
Metadata
Metadata
Assignees
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingrole: Front Endsize: 2ptCan be done in 7-12 hours
Type
Projects
- StatusShow more project fieldsNew Issue Approval
Activity