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
Create the shared tooltip, accordion, and divider that replace MUI Tooltip (2 uses), Accordion (1 use) and Divider (1 use).
Dependencies
- Replace the MUI icons with one icon package #2261
- Add a /design-system page that catalogues tokens and components #2260
Action Items
- Add
@radix-ui/react-tooltip,@radix-ui/react-accordion, and@radix-ui/react-separator. - Create
client/src/components/ui/tooltip.tsx(TooltipProvider,Tooltip,TooltipTrigger,TooltipContent). Opens on hover and on keyboard focus; Escape closes. - Create
client/src/components/ui/accordion.tsx(Accordion,AccordionItem,AccordionTrigger,AccordionContent) with the chevron icon from the icon ticket that rotates when open. Matchcomponents/parts/boxes/TitledBox.jsx. - Create
client/src/components/ui/separator.tsx(replaces theDividerinTitledBox.jsx). - Tests for each (hover/focus opens a tooltip; Enter/Space toggles the accordion; separator has the right role).
- Catalogue entries for all three.
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
- Radix docs: https://www.radix-ui.com/primitives/docs/components/tooltip, https://www.radix-ui.com/primitives/docs/components/accordion
- MUI uses to replace:
components/parts/boxes/TitledBoxIFrame.jsxandpages/OnboardOffboardVisibility.jsx(Tooltip),components/parts/boxes/TitledBox.jsx(Accordion, Divider).
Additional Notes
- Mount
TooltipProvideronce, in the app shell ticket (Migrate the app shell, navbar, and footer to Tailwind #2273). Until then each screen wraps its own tooltip in a provider.
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