-
Notifications
You must be signed in to change notification settings - Fork 474
Description
Problem
Hovering a sidebar navigation item in dark mode only changes the icon colour to purple. The text stays white and there is no background highlight. In light mode, hovering changes both icon and text to purple.
Root cause: SidebarLink.tsx uses CSS classes hover-fill-primary and hover-bg-primary that do not exist anywhere in the SCSS. The class that does exist is hover-color-primary (web/styles/project/_utils.scss:9), which handles text colour + child colour + SVG path fill on hover.
Light mode appears to work by coincidence — the text colour change comes from anchor/NavLink default styles, not from the missing utility classes.
Bugs (3 in one file)
| Line | Code | Issue |
|---|---|---|
| 35 | hover-fill-primary hover-bg-primary |
Non-existent CSS classes — should be hover-color-primary |
| 31 | inactiveClassName={activeClassName} |
Copy-paste bug — inactive NavLinks receive active class styles |
| 42 | fill={'#767D85'} |
Hardcoded icon fill overrides any CSS-based fill class |
Files
web/components/navigation/SidebarLink.tsx
Proposed Fix
- Line 35: Replace
hover-fill-primary hover-bg-primarywithhover-color-primary - Line 31: Change
inactiveClassName={activeClassName}toinactiveClassName={inactiveClassName} - Line 42: Remove
fill={'#767D85'}so the icon inherits colour from the CSS class
Acceptance Criteria
- Sidebar hover works correctly in both light and dark mode
- Inactive NavLinks no longer receive active class styles
- Icon colour adapts to theme via CSS inheritance, not hardcoded hex
-
npm run typecheckpasses -
npx eslint --fixpasses
Context
Part of the design system audit (#6606). See frontend/DESIGN_SYSTEM_ISSUES.md on chore/design-system-audit-6606 branch for full issue list (QW-9).