Skip to content

fix(frontend): route 5 Lucide icons through design-system wrapper - #86

Merged
vgtray merged 1 commit into
mainfrom
fix/81-lucide-icons-wrapper
Apr 22, 2026
Merged

fix(frontend): route 5 Lucide icons through design-system wrapper#86
vgtray merged 1 commit into
mainfrom
fix/81-lucide-icons-wrapper

Conversation

@vgtray

@vgtray vgtray commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

M6.3 follow-up flagged by dev-frontend-tree during the ISA-95 tree view refactor (PR #71, commit aa67504): EquipmentPicker.tsx was importing 5 icons directly from lucide-react, bypassing the centralized design-system/icons.tsx wrapper and breaking DESIGN_PLAN §7.

This PR re-exports Building2, MapPin, Layers, GitBranch, Cpu through the wrapper (same pattern as ChevronDown, Search, X, Check, RefreshCw), then switches EquipmentPicker.tsx to Icons.*.

Changes

  • frontend/src/design-system/icons.tsx — +10 lines: 5 Raw* imports + 5 styled exports, alphabetical.
  • frontend/src/app/EquipmentPicker.tsx — removes the lucide-react direct import block, routes LEVEL_ICON map through Icons.*.

Visual impact

Strictly pixel-identical. LevelIcon still passes strokeWidth={1.75} explicitly, which overrides the wrapper default via {...props} spread — final rendered strokeWidth unchanged.

Heads-up for later: the wrapper default is 1.75, the DESIGN_PLAN §7 says 1.5. Discrepancy to reconcile once this is merged (either update the doc to match code, or rebase the wrapper to 1.5 — but that changes every icon's look project-wide, out of scope here).

Test plan

  • npm run typecheck — green
  • npm run check — green (biome, 53 files)
  • npm run build — green (vite 7.3.2, 2495 modules, 1.66s)
  • grep -n 'from "lucide-react"' frontend/src/app/EquipmentPicker.tsx — empty
  • Tree view visual QA on running app

Closes #81

Re-export Building2, MapPin, Layers, GitBranch, Cpu from
design-system/icons.tsx and switch EquipmentPicker to use
the centralized wrapper, restoring DESIGN_PLAN §7 compliance.

Visual rendering is pixel-identical: LevelIcon still passes
strokeWidth={1.75} explicitly, which overrides the wrapper default.

Closes #81
Copilot AI review requested due to automatic review settings April 22, 2026 23:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the ISA-95 equipment tree UI with the frontend design-system guidelines by ensuring Lucide icons are consumed exclusively through the centralized design-system/icons wrapper.

Changes:

  • Re-export Building2, MapPin, Layers, GitBranch, and Cpu via frontend/src/design-system/icons.tsx.
  • Update EquipmentPicker.tsx to use Icons.* for tree level icons instead of importing directly from lucide-react.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
frontend/src/design-system/icons.tsx Adds wrapped exports for five additional Lucide icons so they are themed/styled consistently via the DS wrapper.
frontend/src/app/EquipmentPicker.tsx Removes direct lucide-react imports and routes level-to-icon mapping through Icons.*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vgtray
vgtray merged commit 21f6930 into main Apr 22, 2026
13 checks passed
@vgtray
vgtray deleted the fix/81-lucide-icons-wrapper branch April 22, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M6.3 follow-up — route 5 Lucide icons through design-system/icons wrapper

2 participants