feat: One set of icons for taxing bodies and budget areas, shared by Key facts, chart legends and the projects page
Back to our planSize: M
Depends on: nothing to start. Chart 1 (its text legend) and #636 (the shared Legend) use it once it exists. #594, #596 and #597 use it for their bodies, kinds and cards.
Problem
In plain words: the tax pages talk about the same few things over and over: schools, the City, the County, the college, police, fire, streets, parks, the library, buses, paying back loans, housing. A small icon next to each makes a chart's legend, a fact card or a project card quicker to scan, and a little friendlier. Each thing should always get the same icon everywhere on the site. An icon must never be the only way to tell things apart.
The owner (Amine, 2026-11-03, Claude Code session, text) asked for icons and colours in the explainer, and for reusable UI elements for this and future explainers. He also asked to use the existing library behind an interface instead of building one.
Today (checked 2026-11-03):
- The kit's icons are Lucide.
lucide-react0.576.0 (ISC) is inpackage.json, andcomponents-and-content.mdsays to use it for all icons, never inline SVG. - There's already a curated map, for Key facts only.
src/platform/richtext/editorial/factIcons.ts(FACT_ICONS) maps 13 keys to a label and an icon. Among them:taxesisReceipt,governmentisLandmark,moneyisCircleDollarSign,constructionisConstruction.KeyFacts.tsxdraws them witharia-hidden="true", and the label carries the meaning. - Elsewhere, files import icons ad hoc (about 40 files).
Landmarkalready means "official meeting" (OfficialMeetingBadge.tsx). - Icons we need, checked in the 0.576.0 package:
School,GraduationCap,University,Landmark,Building2,Shield,Siren,Flame,HeartPulse,Construction,TrafficCone,Trees,TreePine,Library,BookOpen,Bus,Truck,Droplets,House,Banknote,HandCoins,PiggyBank,Receipt,Scale,Percent,Calculator. There's noRoadicon.
Proposed fix
- One map from a concept to an icon in
src/platform/ui/icons/conceptIcons.ts. Each key has a label, an icon and a short description for editors.- The keys are stable and plain, not tied to a city: taxing bodies (
schools,city,county,college,state-credit), budget areas (police,fire-ems,public-health,streets,parks,library,transit,water,housing,debt,personnel), and money sources (property-tax,fees,state-aid,borrowing,impact-fees,grants,tif,savings). - The PR picks the icon per key. It avoids reusing
Landmarkfor two meanings on one page, and records the choice in the file's comment.
- The keys are stable and plain, not tied to a city: taxing bodies (
FACT_ICONSbecomes a view of the same map. The existing 13 keys keep their names and icons, so stored blocks don't change. Each concept is defined once (guard rail 1).- A
ConceptIconcomponent with two modes:- decorative (the default):
aria-hidden="true", for when the visible label next to it says the same thing - meaningful:
role="img"and anaria-labelfrom the map's label, for the rare icon shown without text - The PR checks and tests what lucide-react 0.576.0 sets by default, instead of assuming it.
- decorative (the default):
- Rules, written in
docs/ui/component-set.md:- An icon always sits next to its text label, or is meaningful with a label. Never icon or colour alone.
- The icon uses
currentColorand the theme's tokens, and needs 3:1 against its background (ui-ux-design.md). - Sizes come from the kit (
size-4,size-5,size-6).
- Where it's used.
- First: the Key facts icon picker (the new keys added as options).
- Then, by the issues that build them: #639's legend rows, #636's
Legendmarker (a later variant), #594's "sample bill" rows, and #596/#597's project kind and funding source. - Icons go in the HTML legend and labels, never inside a chart's SVG marks.
- Lucide stays behind the map. Pages import concept keys, not Lucide names, so swapping an icon or the library touches one file.
Native first, one line per step:
- Native: React components and SVG from the kit's existing icon library.
- Official plugins: not relevant.
- Open source:
lucide-react, already installed. No new dependency. - Our code: the map,
ConceptIcon, theFACT_ICONSview, tests and the gallery entry.
Acceptance criteria
- Not done:
conceptIcons.tsexists, andFACT_ICONSis derived from it. Existing Key facts render unchanged (snapshot or test). - Not done: A test checks that every key has a label and an icon, and that decorative and meaningful modes set the right ARIA. axe passes on the gallery.
- Not done: The Key facts editor can pick the new keys.
- Not done:
/dev/galleryshows every concept with its label at 320 and 1280 px, in light and dark mode, at 3:1 or better. - Not done:
docs/ui/component-set.mdhas the rule "never colour or icon alone" and the row forConceptIcon. - Not done: The PR has the
shared-componentlabel, and every page using Key facts is checked.
Area
frontend, ux
Priority
medium
Generated by Claude Code, opens in a new tab