Skip to content

feat(ui): standardise the icon set on Lucide - #177

Merged
Ardnived merged 2 commits into
feat/rethink-sansfrom
feat/lucide-icons
Aug 28, 2026
Merged

Ardnived merged 2 commits into
feat/rethink-sansfrom
feat/lucide-icons

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Third of three. Stacked on #176 (which is stacked on #175) — their commits show in this diff until those land.

The catalogue mixed Material, Fluent and hand-drawn glyphs: different grids, different stroke weights, filled next to outlined, and seven non-24 viewBoxes. Now one family — 24px grid, 2px stroke, round caps and joins, outline only.

A direct swap, with no wrapper

Lucide already provides the two contracts BaseIcon existed for: it draws with stroke="currentColor" and sets aria-hidden="true" itself. So colour inheritance and the decorative-icon a11y treatment both survive untouched, and size/className mean the same thing, so every call site kept its metrics. Only role="presentation" is lost, which is redundant beside aria-hidden.

Verified in the browser: 39 Lucide glyphs in the gallery, 39/39 stroking currentColor, 47/47 SVGs aria-hidden, 0 empty glyphs.

⚠ flipRtl did not come for free

BaseIcon carried RTL mirroring centrally for the two directional glyphs. Lucide has no equivalent, so the six directional call sites now declare rtl:-scale-x-100 themselves — the drill-in chevrons (ListItem, SettingsMenu, the calendar's month arrows) and the directions arrow. Confirmed mirrored in Chrome under dir="rtl" (matrix(-1, 0, 0, 1, 0, 0)).

This is now a rule someone has to remember, so it is written into .claude/rules/code-style.md and the module's own header.

⚠ The brief's brand-mark premise was wrong, in our favour

It asked to keep "the 11 brand marks in the share row (WhatsApp, Telegram, VK, LINE, …)". Those were never ours — react-share renders its own bundled icons; they left this repo in #61. What we actually own is the Sahaja Yoga Logo plus three meeting-platform glyphs behind SocialIcon (Zoom / Google Meet / YouTube). Those stay hand-drawn, same trademark reasoning.

Icons/ is now exactly that: brand marks. actions.tsx, records.tsx and symbols.tsx are gone, and with them four icons with no reference anywhere — PlusSquareIcon, ExternalIcon, HeartFilledIcon, SignupIcon.

Two inline SVGs absorbed

Alert's info glyph was already drawn in the Lucide idiom, and Spinner's hand-rolled ring becomes LoaderCircle while keeping its animate-spin, colour variants and live region.

pnpm size ratcheted 310 → 308

The swap took ~3 KiB off both eager graphs — the tree-shaken glyphs cost less than the path data they replaced, even after adding the dependency. The repo's rule is to lower the budget in the commit that wins the space, so it is lowered, preserving the previous line's headroom (10.7 / 8.2 KiB spare, both clear of the ~2.1 KiB a credentialed build adds that CI cannot see).

Worth noting the direction: a swap that adds a package can still win space, and the ratchet is what stops that win being quietly re-spent.

Open question for the designer

Two names in the brief map to nothing in the app — contact and map-pinned — and the brief omits the theme picker, whose sun/moon glyphs had no entry. I used Lucide's Sun/Moon. Worth confirming.

Judgement calls the brief flagged, both taken as proposed: the MDI directions diamond became navigation (semantics kept, shape lost), and the two camcorder glyphs collapse to video.

Verification

lint · typecheck · test:run (1403) · build · size · ladle:build all green. Icons.test.tsx now covers both sides of the seam — the Lucide contracts the swap had to keep, and the brand marks we still draw.

🤖 Generated with Claude Code

The catalogue mixed Material, Fluent and hand-drawn glyphs — different grids,
different stroke weights, filled next to outlined, and seven non-24 viewBoxes.
It is now one family: 24px grid, 2px stroke, round caps and joins, outline only.

**A direct swap, with no wrapper, because Lucide already provides the two
contracts `BaseIcon` existed for.** It draws with `stroke="currentColor"` and
sets `aria-hidden="true"` itself, so colour inheritance and the decorative-icon
a11y treatment both survive untouched. `size` and `className` have the same
meaning, so every call site kept its metrics. Only `role="presentation"` is lost,
which is redundant beside `aria-hidden`.

**What did NOT come for free is `flipRtl`.** `BaseIcon` carried RTL mirroring
centrally for the two directional glyphs; Lucide has no equivalent, so the six
directional call sites now declare `rtl:-scale-x-100` themselves — the drill-in
chevrons (ListItem, SettingsMenu, the calendar's month arrows) and the directions
arrow. Verified mirrored in Chrome under `dir="rtl"`.

**Brand marks stay ours.** Lucide removed its brand icons and redrawing them is a
trademark problem, so `Icons/` is now exactly that: the Sahaja Yoga `Logo` plus
the three meeting-platform glyphs behind `SocialIcon`. (The share row's network
marks were never ours — react-share renders its own.) `actions.tsx`, `records.tsx`
and `symbols.tsx` are gone, and with them four icons that had no reference
anywhere: PlusSquare, External, HeartFilled and Signup.

Two inline SVGs outside the module are absorbed: Alert's info glyph, already
drawn in the Lucide idiom, and Spinner's ring, which becomes `LoaderCircle` while
keeping its `animate-spin`, colour variants and live region.

**`pnpm size` is ratcheted down, 310 -> 308.** The swap took ~3 KiB off both eager
graphs — the tree-shaken glyphs cost less than the path data they replaced, even
after adding the dependency — and the repo's rule is to lower the budget in the
commit that wins the space. Headroom is preserved at the previous line's margin.

`Icons.test.tsx` now covers both sides of the seam: the Lucide contracts the swap
had to keep, and the brand marks we still draw.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2049865
Status: ✅  Deploy successful!
Preview URL: https://dce0d246.sahajatlas-design.pages.dev
Branch Preview URL: https://feat-lucide-icons.sahajatlas-design.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2049865
Status: ✅  Deploy successful!
Preview URL: https://89b6674e.sahajatlas.pages.dev
Branch Preview URL: https://feat-lucide-icons.sahajatlas.pages.dev

View logs

…alogue

Three changes to the icon story, plus the glyph swap they surfaced.

**Directions is now `Milestone`, not `Navigation`.** A signpost rather than a
paper plane. It still encodes travel direction, so it keeps the
`rtl:-scale-x-100` the previous glyph carried.

**The gallery lists only what the app renders**, and links out for the rest. It
was a curated subset of Lucide, which is the worst of both: stale the moment
upstream ships anything, and an invitation to pick a glyph from our page rather
than from the 2,000 there. `Video` is gone — it was only ever in
`Chip.stories.tsx` — and `Sun`/`Moon` are added, which the original icon brief
omitted entirely despite the theme picker using both.

⚠ `Pause` and `SquarePlay` STAY: they look decorative but they are the image
carousel's pause control, which exists for WCAG 2.2.2 (anything moving for more
than five seconds needs a visible way to stop it). Removing them from the gallery
would have been the easy mistake here.

**A "Browse all Lucide icons" button sits below the gallery**, on the `Button`
atom's href form so the shared href gate covers it. (`Button`'s anchor arm
spreads native `<a>` props — `isExternal` belongs to `Link` — so the new-tab
treatment is written out.)

**The one-way rule is enforced, not remembered.** `Icons.usage.test.tsx` walks
app code — excluding stories and tests, which is exactly the distinction `Video`
turned on — and fails in BOTH directions: a newly-used glyph is red until it is
listed, and one that loses its last call site cannot linger. Both were confirmed
red before the spec was kept. Same reasoning as `href.test.ts`'s anchor
inventory: a rule a person has to re-check is a rule that drifts.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit 8e99a74 into feat/rethink-sans Aug 28, 2026
5 checks passed
@Ardnived
Ardnived deleted the feat/lucide-icons branch August 28, 2026 22:44
Ardnived added a commit that referenced this pull request Aug 28, 2026
* feat(ui): standardise the icon set on Lucide (#177)

* feat(ui): standardise the icon set on Lucide

The catalogue mixed Material, Fluent and hand-drawn glyphs — different grids,
different stroke weights, filled next to outlined, and seven non-24 viewBoxes.
It is now one family: 24px grid, 2px stroke, round caps and joins, outline only.

**A direct swap, with no wrapper, because Lucide already provides the two
contracts `BaseIcon` existed for.** It draws with `stroke="currentColor"` and
sets `aria-hidden="true"` itself, so colour inheritance and the decorative-icon
a11y treatment both survive untouched. `size` and `className` have the same
meaning, so every call site kept its metrics. Only `role="presentation"` is lost,
which is redundant beside `aria-hidden`.

**What did NOT come for free is `flipRtl`.** `BaseIcon` carried RTL mirroring
centrally for the two directional glyphs; Lucide has no equivalent, so the six
directional call sites now declare `rtl:-scale-x-100` themselves — the drill-in
chevrons (ListItem, SettingsMenu, the calendar's month arrows) and the directions
arrow. Verified mirrored in Chrome under `dir="rtl"`.

**Brand marks stay ours.** Lucide removed its brand icons and redrawing them is a
trademark problem, so `Icons/` is now exactly that: the Sahaja Yoga `Logo` plus
the three meeting-platform glyphs behind `SocialIcon`. (The share row's network
marks were never ours — react-share renders its own.) `actions.tsx`, `records.tsx`
and `symbols.tsx` are gone, and with them four icons that had no reference
anywhere: PlusSquare, External, HeartFilled and Signup.

Two inline SVGs outside the module are absorbed: Alert's info glyph, already
drawn in the Lucide idiom, and Spinner's ring, which becomes `LoaderCircle` while
keeping its `animate-spin`, colour variants and live region.

**`pnpm size` is ratcheted down, 310 -> 308.** The swap took ~3 KiB off both eager
graphs — the tree-shaken glyphs cost less than the path data they replaced, even
after adding the dependency — and the repo's rule is to lower the budget in the
commit that wins the space. Headroom is preserved at the previous line's margin.

`Icons.test.tsx` now covers both sides of the seam: the Lucide contracts the swap
had to keep, and the brand marks we still draw.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* refactor(ui): make the icon gallery the app's usage, and link the catalogue

Three changes to the icon story, plus the glyph swap they surfaced.

**Directions is now `Milestone`, not `Navigation`.** A signpost rather than a
paper plane. It still encodes travel direction, so it keeps the
`rtl:-scale-x-100` the previous glyph carried.

**The gallery lists only what the app renders**, and links out for the rest. It
was a curated subset of Lucide, which is the worst of both: stale the moment
upstream ships anything, and an invitation to pick a glyph from our page rather
than from the 2,000 there. `Video` is gone — it was only ever in
`Chip.stories.tsx` — and `Sun`/`Moon` are added, which the original icon brief
omitted entirely despite the theme picker using both.

⚠ `Pause` and `SquarePlay` STAY: they look decorative but they are the image
carousel's pause control, which exists for WCAG 2.2.2 (anything moving for more
than five seconds needs a visible way to stop it). Removing them from the gallery
would have been the easy mistake here.

**A "Browse all Lucide icons" button sits below the gallery**, on the `Button`
atom's href form so the shared href gate covers it. (`Button`'s anchor arm
spreads native `<a>` props — `isExternal` belongs to `Link` — so the new-tab
treatment is written out.)

**The one-way rule is enforced, not remembered.** `Icons.usage.test.tsx` walks
app code — excluding stories and tests, which is exactly the distinction `Video`
turned on — and fails in BOTH directions: a newly-used glyph is red until it is
listed, and one that loses its last call site cannot linger. Both were confirmed
red before the spec was kept. Same reasoning as `href.test.ts`'s anchor
inventory: a rule a person has to re-check is a rule that drifts.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

* fix(ui): use Play rather than SquarePlay for the carousel control

The plain triangle reads as a transport control at 16px where the boxed variant
reads as a video thumbnail, and it pairs with `Pause` — the two are one toggle.

Both halves move together because they have to: `Icons.usage.test.tsx` fails if
the story's gallery and the app's imports disagree, in either direction.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* chore(build): record the icon-swap payload as measured on main

The ratchet landed on a branch that also carried the typeface change, so the
figure in the comment was measured with it. Re-measured without: the difference
is 0.1 KiB, because the woff2 files are separate assets and only the URL strings
live in the JS graph. The budget itself is unchanged and still correct.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

1 participant