#572 Standardize Lucide Iconography Across The App - #597
Open
b-at-neu wants to merge 4 commits into
Open
Conversation
Five Record<Enum, LucideIcon> maps (concept, application/position status, action, state, file type) as the single allow-listed source for every icon in the app, plus a uniqueness test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Zero consumers now that lib/icons.ts owns icon tinting via semantic text- utilities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
One sweep: status badges, section cards, empty/error/not-found/rate- limited states, nav, section headings and labelled buttons all look their icon up in lib/icons.ts instead of importing lucide-react directly. Fixes the Home/BriefcaseBusiness/Inbox/FileText concept drift, folds three hand-rolled empty states back into EmptyState / SectionCard / PositionStatusBadge, renames deprecated lucide aliases (Loader2, MoreHorizontal, UserCircle), and drops redundant size-4/aria-hidden props on icons already covered by a shadcn primitive's own CSS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New §6 codifies the lib/icons.ts vocabulary as the allow-list, sizing and aria-hidden rules, and the shadcn-exempt file list; renumbers Do/Don't, Responsive and Agent quick reference and updates the responsive-pass skill's now-stale §7 cross-reference. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Deployment failed for project aplio with the following error: Learn More: https://vercel.com/sga-operational-affairs-projects?upgradeToPro=build-rate-limit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #572
Summary
Full iconography sweep.
lib/icons.tsholds the whole vocabulary as five separately-exportedRecord<Enum, LucideIcon>maps (concept, application status, position availability/status, action, state, file type) — an icon only exists if its meaning is a key in one of those maps, so adding one anywhere new is a reviewable vocabulary change. Every call site looks its icon up there instead of importinglucide-reactdirectly.The sweep does three things: fixes real drift (four deprecated lucide aliases,
home/position/application/myApplicationcarrying inconsistent icons across nav vs. call sites, three hand-rolled copies ofEmptyState), adds icons where they were missing (status badges, section headings, labelled action buttons, the error/404/429 fallbacks), and deletes redundant markup the primitives already supply (aria-hiddenlucide already emits itself;size-4a shadcnButton/DropdownMenuItemalready forces via CSS).Changes
lib/icons.ts(new) — the vocabulary;tests/unit/icons.test.ts(new) — each map's icons are unique (POSITION_AVAILABILITY_ICONS'sclosed_by_date/unavailableshare one by design, both meaning "closed").app/globals.css— deleted the unusedicon-secondary/icon-tertiarytokens.components/ui/badge.tsx,status-badge.tsx— badges can now hold an icon; both status badges render one.components/ui/section-card.tsx—SectionCardgets an optionalicon;SectionCardEmpty'siconis now required (a deliberate compile break that catches an icon-less empty state).components/ui/empty-state.tsx,warning-callout.tsx,data-table.tsx— drop redundantaria-hidden;WarningCalloutdefaults to the warning icon; data-table sort affordances use the action vocabulary.components/layouts/nav-items.ts,page-header.tsx— nav resolves the three concept conflicts; back link uses the vocabulary.components/ui/error-fallback.tsx,not-found-fallback.tsx,app/429/page.tsx— each designed state gets its icon.applications-table.tsx,my-applications-widget.tsx,managed-positions-widget.tsx— hand-rolled empty/status markup folded intoEmptyState/SectionCard/SectionCardEmpty/PositionStatusBadge.Loader2→pending,MoreHorizontal→more,UserCircle→CircleUseracross ~19 files.SectionCardicons on all 9 call sites; icons added to the 9 qualifying inline section headings.position-card.tsx's Edit/Applications/View Details/Apply row;global-questions-table.tsxvs.position-questions-section.tsxstandardized on icon-only ghost row actions witharia-label).docs/DESIGN.md— new §6 Iconography; dropped the token row from §2; renumbered Do/Don't → §7, Responsive → §8, Agent quick reference → §9;.claude/skills/responsive-pass/SKILL.md's §7 cross-reference fixed to §8.Known gap, left as direct
lucide-reactimports (no vocabulary entry exists for these, and inventing one wasn't part of the plan):markdown-field.tsx's Bold/Italic/Heading/List formatting toolbar,mobile-nav.tsx's hamburgerMenu,user-menu.tsx's theme-switcher icons (Monitor/Sun/Moon/SunMoon) and dropdown caret (ChevronUp), andoptions-chip-editor.tsx'sCornerDownLeft"press Enter" hint.Testing plan
/positionsas admin, manager, applicant and signed-out: cards show a status badge with an icon; the button row is internally consistent; both empty states show theBriefcaseicon./applications— status icons in the table; filter to zero results and confirm theSearchXempty state with a working "Clear filters"; clear filters with no applications at all and confirm theInboxempty state./my-applications,/users,/global-questions— each list's empty state shows its concept icon; icon-only row actions (edit/delete) are reachable and correctly labelled by keyboard alone.Briefcase, Applications isInbox, My Applications isFileText, Global Questions isListChecks, Home isHouse— each matches the icon on the page it opens.sr-onlyspan./429: each shows its state icon./applicationsand/positionsand re-check every badge icon and muted icon for contrast.Automated checks
npm run prettier:check— passnpm run eslint:check— passnpm run tsc:check— passnpm run test:unit— 234/234 pass (Postgres unavailable in this worktree, sotests/db/**wasn't run locally — CI'srun-testscheck covers it)Notes
SectionCardEmpty.iconbecoming required and the status maps being typedRecord<Enum, …>are deliberate compile-time guards: a new enum value or a missing icon fails the build rather than shipping silently icon-less.