Skip to content

Replace the MUI icons with one icon package #2261

Open

Description

@trillium

Trillium Firstmate 🤖

Overview

The app uses 8 different Material icons (9 uses). Replace them with icons from lucide-react and remove @mui/icons-material, so icons no longer need MUI.

Dependencies

Action Items

Run yarn commands from client/, and commit client/package.json and client/yarn.lock together.

  • Replace each icon import and usage (keep the same size and color as today):
    • components/ChangesModal.jsx: WarningAmberRounded
    • components/manageProjects/editProject.jsx: Close (also has a .MuiSvgIcon-root selector at lines ~246 and ~291 to turn into a size class)
    • components/manageProjects/editPMs/projectMembersList.jsx: Delete, Close, WarningAmber, CheckCircleOutline
    • components/manageProjects/editPMs/editProjectMembers.jsx: AddCircleOutline, CheckCircleOutline
    • components/user-admin/UserManagement.jsx and components/user-admin/UserPermissionSearch.jsx: Person
    • components/parts/boxes/TitledBox.jsx: ExpandMore
    • pages/OnboardOffboardVisibility.jsx: InfoOutlined
  • Mapping to start from: WarningAmber(Rounded) -> TriangleAlert, Close -> X, Delete -> Trash2, CheckCircleOutline -> CircleCheck, AddCircleOutline -> CirclePlus, Person -> User, ExpandMore -> ChevronDown, InfoOutlined -> Info.
  • Create client/src/components/ui/icon.tsx: a tiny wrapper that sets default size (size-5), aria-hidden for decorative icons, and accepts an aria-label for meaningful ones. Test it.
  • Remove @mui/icons-material from client/package.json and from the root package.json (it is listed there too and is not used by any root code).
  • Add an "Iconography" entry to the Foundations section of /design-system listing the 8 icons in use.
  • Take a before/after screenshot of every place an icon appears (a few need a signed-in admin).

Acceptance Criteria

  • git grep @mui/icons-material returns nothing in client/ and the root package.json.
  • Every icon appears in the same place, size and color as before.
  • Icons that act as buttons have an accessible name; decorative ones are hidden from screen readers.
  • yarn typecheck, yarn build and yarn test pass.

Resources/Instructions

Additional Notes

  • Decision needed: icon package. Proposed default: lucide-react (tree-shakeable, one consistent style). Lucide shapes differ slightly from Material shapes. If a reviewer sees a visible difference that breaks pixel parity, copy that one Material icon's SVG path into components/ui/icon.tsx instead.
  • This ticket only swaps icons inside files that still use MUI for everything else. The files are fully migrated later in their own tickets.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions