Skip to content

UI kit: List (with selectable rows) and Table #2271

Open

Description

@trillium

Trillium Firstmate 🤖

Overview

Create the shared list and table components that replace MUI List/ListItem/ListItemButton/ListItemText (6 files) and Table/TableHead/TableBody/TableRow/TableCell (1 file).

Dependencies

Action Items

  • client/src/components/ui/list.tsx: List, ListItem (static row), and a ListItem variant asButton that is a real <button> (keyboard focus, hover and selected backgrounds) for the searchable user lists in UserManagement.jsx and UserPermissionSearch.jsx.
  • client/src/components/ui/table.tsx: Table, TableHeader, TableBody, TableRow, TableHead, TableCell using real table elements, matching the styling in components/presentational/profile/UserTable.jsx.
  • Tests: list renders items; the button variant fires on click and Enter and exposes the selected state with aria-current or aria-selected; the table has correct header cells (th scope).
  • Catalogue entries.

Acceptance Criteria

  • The component lives in client/src/components/ui/ as a .tsx file, with typed props that pass yarn typecheck (strict mode).
  • Styling uses Tailwind classes only. Variants (if any) are declared with cva, and className is merged with cn() 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 test passes.
  • The component has an entry on the /design-system page: 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: UserManagement.jsx, UserPermissionSearch.jsx, EditUsers.jsx, projectMembersList.jsx, editProject.jsx, pages/Events.jsx (lists); UserTable.jsx (table).

Additional Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: Design systemmilestone: missingrole: Front Endsize: 3pt

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions