Skip to content

refactor(ui): size each shared component's glyphs itself - #3720

Merged
charleslpan merged 2 commits into
mainfrom
refactor/ui-glyph-sizes
Oct 18, 2026
Merged

charleslpan merged 2 commits into
mainfrom
refactor/ui-glyph-sizes

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Phase 4, Q5. Shared components now size their own glyphs. App CSS no longer names .luke-* internals to size a glyph.

The cause

The desktop's glyph defaults were unlayered: .settings-icon 14px, .icon-button-glyph 15px, .settings-chevron 11px, .credential-check 12px green, .link-icon 9px, and .state-glyph's box. @luke/ui's own Glyph svgs wear these classes. An unlayered rule beats every rule in the components layer, so it overrode each shared component's glyph rule. That is why #3674 added the :where(:not(.luke-…)) exclusions.

The fix

  • Desktop: those defaults move into the desktop's existing @layer base (settings.css, desktop.css, base.css), below components. A shared component's slot now sizes its glyph by its own rule, and the defaults reach only the window's own markup. I chose this over enumerating every desktop container by selector: these classes sit on dozens of glyphs in dozens of places, and a selector list would miss some.
  • Deleted from app CSS:
    • the :not(.luke-chip *, .luke-menu-item-end > *, .luke-combobox-option-end > *) and :not(.luke-button-face > *) exclusions;
    • .luke-menu-item-glyph .repository-picture;
    • .luke-hover-card-glyph / -sub / -row-glyph { --state-glyph-size } (scope moved from Q3 to here);
    • .link-icon, which no longer had a bare use (every ExternalIcon sits in a Button, IconButton, menu item, or the update pill).
  • @luke/ui:
    • menu.css: the glyph slot sizes an img standing directly in it as it sizes an svg, so a repository picture fits without an app rule. A face's picture inside a mark still fills its own disc. The end slot's glyph wears the end's ink.
    • combobox.css: the end slot's glyph wears the end's ink.
    • hover-card.css: the head and row glyph slots size whatever child they hold, a StateGlyph span included. A face (Avatar, or a mark holding one) keeps its own size.
  • No new tokens or APIs, and no behaviour change, so no new tests.

How I checked sizes

I measured every glyph's box, ink, opacity and margin on the Linux fixture, before and after. That covered two sets:

  • each glyph class in each shared slot (533 combinations);
  • every glyph on the live fixture surfaces: Home, Inbox, the menus, ⌘K, and every Settings page.

The ones that stay the same: the desktop's own markup, a StateGlyph in a hover card's head (14px) and rows (16px), app marks in hover-card slots (actor marks, PR marks, attention marks, file icons), and avatar-held state glyphs.

Visible changes

Each glyph now takes its component's own size where the app's default used to override it. Every change is cleanup-level:

  • Menus and ⌘K/picker rows: glyphs carrying .icon-button-glyph (15px) or .settings-icon (14px, e.g. ⌘K's task and settings rows) now draw at the menu glyph's 16px, like the lucide glyphs beside them.
  • NavItem:
    • icons carrying .settings-icon (the Settings sidebar's page icons) go from 14px to the control icon, 15px, as the main sidebar's already are;
    • the fold and menu chevrons go from 11px to nav-item.css's own 12px, the size a chip's chevron already is.
  • Button / FoldingButton: a .settings-icon glyph (e.g. the sidebar's Restart pill) goes from 14 to 15px. A .credential-check (the dictation strip's Finish) goes from 12 to 15px and stays green.
  • Menu item glyph: "Open on GitHub"'s external-link glyph goes from 9px with a 4px left margin to the 16px slot.
  • EmptyState: the call transcript's empty state draws its CallIcon at the empty-state size, 40px, like every other empty state, instead of 15px.
  • TextButton: the Integrations tools toggle's chevron is drawn at the text button's 0.8em instead of 11px.
  • Opacity is unchanged: a .settings-icon glyph keeps its 0.85 opacity everywhere.

Screenshots (Linux Xvfb, --fixture smoke, synthetic data, 2×)

Before After
Workspace menu
Workspace menu, dark
Repository actions menu
Repository actions menu, dark
⌘K
⌘K, dark
Settings navigation
Settings navigation, dark

Not verified on a Mac. The fixture has no hover cards, dictation, call transcript, or connected integration, so I measured those through the slot matrix rather than screenshots.

🤖 Generated with Claude Code

The desktop's glyph defaults (.settings-icon, .icon-button-glyph,
.settings-chevron, .credential-check, and the state glyph's box) were
unlayered, so they beat every shared component's own glyph rule and the
app had to exclude shared internals with :where(:not(.luke-…)). They now
sit in the desktop's base layer, under the components layer, so a
component's slot sizes its glyph by its own contract and the defaults
reach only the window's own markup.

- Delete the :not(.luke-…) exclusions, the dead .link-icon rule, and the
  app's .luke-menu-item-glyph and .luke-hover-card-* glyph rules.
- Menu glyph slots size a picture as they size a glyph.
- Hover-card glyph slots size whatever they hold, a face excepted.
- Menu and picker end glyphs wear the end's ink.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 18, 2026 9:51pm UTC

Request Review

devin-ai-integration[bot]

This comment was marked as resolved.

A face's picture fills its own disc, so the slot no longer reaches
through a mark into an Avatar's picture.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@charleslpan
charleslpan added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 6dfdc31 Oct 18, 2026
10 of 11 checks passed
@charleslpan
charleslpan deleted the refactor/ui-glyph-sizes branch October 18, 2026 22:01

This branch was successfully deployed

1 active deployment
Preview — 06d87a90 Deployed Oct 18, 2026 by vercel[bot]
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