Skip to content

Wear one face per kind of control: symbols, tags and the unread dot - #4571

Merged
max-sixty merged 9 commits into
mainfrom
canonicalize-element-faces
Oct 28, 2026
Merged

max-sixty merged 9 commits into
mainfrom
canonicalize-element-faces

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Several controls and marks drew a look of their own where Leaf already has one, so two controls of one kind stood side by side drawn differently, as a message's Edit did beside the thread's own controls. This moves each duplicate that has a canonical face onto it.

Symbols wear the symbol face (.lf-icon-action), sized to their surface through --lf-icon-action-face where they need it:

  • The floating panel's Show, Undo, Find, Show on page, Resolve/Reopen and More room were .lf-fp-icon-btn presses in the panel's 72% ink with a 5% grey wash. They now rest in the muted ink and take the chip under the pointer, as the open thread's controls beside them do. Resolve and Reopen take the thread card's face, which the panel's copy had drifted from.
  • A recording's Play and Full screen, a heading's Copy link, and About this page's Copy. A symbol on Web Awesome's copy button draws its face on the host, and its inner button fills it, as a mark's already does; the host stretches Web Awesome's unparted wrapper so the button, its focus ring and its reach fill the face rather than shrinking to the 16px icon. A Copy symbol is 28px, so About this page's copy rows stand a few pixels taller.
  • lf-motion's Play draws Leaf's play and pause symbols (showAction) instead of an SVG it built and stroked itself.

A toggled symbol, such as Find while it searches or More room while it widens, wears the toggle's selected face (the accent frame a word toggle wears) instead of only turning full ink.

Counts wear .tag: lf-tally's count (.tag.ok once answered), and a tab's and a settled decision's count of changed passages, which share .tag.lf-change-count. They look as before; three hand copies of the chip are gone.

The unread dot is one class, .lf-unread-dot, on a reply, a row of Threads, the On me mark and the folded leaf.

Smaller moves: an activity row's link takes the page's link underline, the tab strip's edge presses draw the previous and next symbols rather than ‹ and › glyphs, and lf-file-editor's icons take Leaf's stroke.

The comment in controls.css that exempted whole surfaces ("the floating panel keeps its own family") now exempts only the families that differ by task: the panel's rows, answers and row end, margin entries, reaction chips and the response bar. A to-do's Done on the On me card, which #4560 drew with .lf-fp-icon-btn, is a framed answer whose symbol the answer family now centres; it looks as it did on main.

Overlap with other branches

Checked

pnpm run test:runtime, pnpm run check:browser, tests/browser/test_interact_layer.py, about 25 focused browser tests on the panel, video controls, heading links, tabs, tally and the to-do's Done, and before/after hover captures of each moved control.

This was written by Claude Code on behalf of max-sixty

Several controls and marks drew a look of their own where Leaf already has one,
so two of a kind stood side by side drawn differently, as a message's Edit did
beside the thread's own controls.

Symbols now wear the symbol face (`.lf-icon-action`), set to their surface's
height through `--lf-icon-action-face` where they need one:

- The floating panel's Show, Undo, Find, Show on page, Resolve/Reopen and More
  room were `.lf-fp-icon-btn` presses in the panel's 72% ink with a 5% wash;
  now they rest in the muted ink and take the chip under the pointer, as the
  open thread's own controls beside them do. Resolve and Reopen take the card's
  face (response.css), which the panel's copy had drifted from, and a view's
  symbols follow the panel's press height, a line under a finger.
- A recording's Play and Full screen, a heading's Copy link, and the Copy of
  About this page's diagnostics. A symbol on Web Awesome's copy button draws its
  face on the host, and its button fills it and takes the press, as a mark's
  already does.
- lf-motion's Play draws its action's symbol (`showAction`) instead of an SVG it
  built and stroked itself.

A toggled symbol, such as Find while it searches or More room while it widens,
wears the toggle's selected face that a word toggle wears.

Counts wear `.tag`: lf-tally's count (`.tag.ok` once answered), and a tab's and
a settled decision's count of changed passages, which share
`.tag.lf-change-count` in the tint of the changed words. The unread dot is one
class, `.lf-unread-dot`, on a reply, a row of Threads, the On me mark and the
folded leaf. An activity row's link takes the page's link underline, the tab
strip's edge presses draw the previous and next symbols rather than ‹ and ›
glyphs, and lf-file-editor's icons take Leaf's stroke.

The panel's rows, answer choices and row end, margin entries, reaction chips and
the response bar keep their own families (controls.css).
# Conflicts:
#	dist/kernel/kernel.json
Main's On me card drew a to-do's Done with .lf-fp-icon-btn, which this branch deleted; the answer family now centres a symbol answer in the panel's muted ink, as that class did.
Building it by role gave it the action's name, Show on page, which the tests that find it and the card's tooltip called Show.
leaf-agent
leaf-agent previously approved these changes Oct 28, 2026
# Conflicts:
#	browser/runtime/floating-panel.js
#	browser/runtime/video-controls.js
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
#	dist/kernel/runtime/bundle-data.js
leaf-agent
leaf-agent previously approved these changes Oct 28, 2026
# Conflicts:
#	browser/styles/floating-panel.css
#	dist/kernel/kernel.json
leaf-agent
leaf-agent previously approved these changes Oct 28, 2026
leaf-agent
leaf-agent previously approved these changes Oct 28, 2026
Web Awesome's copy button wraps its button in an unparted div, which the symbol
face's centring shrank to the icon, so the button, its focus ring and its reach
measured 16px inside the 32px face. The host now stretches that wrapper, and the
button fills the face (30px inside its 1px border on a heading's Copy link).

Found by the computed-face census; the heading-link and menu Copy link browser
tests pass.
# Conflicts:
#	dist/kernel/kernel.json
@max-sixty
max-sixty merged commit 5cc38c5 into main Oct 28, 2026
5 of 6 checks passed
@max-sixty
max-sixty deleted the canonicalize-element-faces branch October 28, 2026 10:30
max-sixty added a commit that referenced this pull request Oct 28, 2026
…-control entry

Main's #4571 gives a vendor Copy that wears a symbol its face and its button part's
reach (`wa-copy-button.lf-icon-action`, `.lf-icon-action.lf-ui::part(button)`), so a
message's Copy no longer restates them. Every message control is now built by role,
so `.lf-msg-control` leaves the reach list: its buttons reach through
`button.lf-icon-action` or `.lf-compose-submit`, and Copy's host no longer takes a
reach that would take the press from its button. Copy's computed face matches Edit's,
resting and hovered.
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.

2 participants