Skip to content

Ring what an undo took back, and hold its notice until the next input - #6447

Merged
max-sixty merged 2 commits into
mainfrom
undo-take-at-once
Nov 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
undo-take-at-once

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

What ⌘Z, or a notice's Undo, takes back now takes a ring: an outline twice the focus band's width, in the accent, held for about half a second and faded by 1.2 s. It plays once the page shows the withdrawal, and where the gesture was out of view, once the page has gone there. The undo's notice now stands until the user's next key, press, wheel or touch rather than for 4 s, which is the rule a notice with a press already follows (notice(…, {holds: true})). max-sixty picked this on the undo design page, after #6429, over keeping the 4 s notice, holding it in ink, and darkening the panel's field.

The ring is the box's own outline at the box's --lf-ring-at, so it stands where the box's other marks stand (tokens.css lists it among them). A message the undo took away rings the thread that held it. An exact control's withdrawal, such as a widget's Undo, rings nothing, since the user pressed it where the gesture is drawn. Under reduced motion motion plays nothing, and the held notice alone says what was taken. Two weaknesses: a box that states no --lf-ring-at gets a region's gap, even where it is a control, and a box drawn with display: contents shows no ring.

test_inline_retirement_is_resolved_before_its_pixels_finish froze the first animation on the thread once it went inert. After an undo of a Resolve, that was the ring rather than the fold, so it now picks the fold by its blockSize keyframes.

Checks: a new browser test checks the ring after an out-of-view undo, and that the notice outlasts NOTICE_MS until a key; each half fails without its change. The 117 browser tests that press undo or read notices pass, as do pnpm run test:runtime and check:browser. Firefox stills of the built ring are on max-sixty's page.

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

max-sixty picked this on the undo design page today, over keeping the notice
that leaves after 4 s, holding it in ink, and darkening the panel's field. He
had found the muted notice too quiet for a change to his work, and neither a
longer time nor darker ink makes it louder.

What ⌘Z, or a notice's Undo, takes back now wears an outline twice the focus
band's width, in the accent, held for about half a second and faded by 1.2 s
(`--lf-motion-flash`). It plays once the page shows the withdrawal, and where
the gesture was out of view, once the page has gone there. It is the box's own
outline at the box's `--lf-ring-at`, so it stands where the box's other marks
stand: on an option group's frame, a region's gap out from a paragraph. A
message the undo took away rings the thread that held it. An exact control's
withdrawal, pressed where its gesture is drawn, rings nothing. Under reduced
motion `motion` plays nothing, and the notice alone says what was taken.

The undo's notice takes the hold a notice's press already had
(`notice(…, {holds: true})`): it stands until the next key, press, wheel or
touch rather than for 4 s.

A new browser test checks the ring after an out-of-view undo, and that the
notice outlasts NOTICE_MS until a key; each half fails without its change.
# Conflicts:
#	browser/runtime/notifications.js

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking: ring keeps its own copy of where a mark stands, var(--lf-ring-at, var(--lf-focus-region-gap)). surfaces.css already owns that rule, in the :where([data-lf-aimed]), … block, which falls back to --lf-focus-ring-gap for controls and is reached through shownParts (target-paint.js, markOne). Because the ring animates outline straight on the node, it misses both. A control with no --lf-ring-at gets a region's gap, as the description notes. A box drawn with display: contents, such as an author's wrapper section, has no outline box, so it shows no ring at all. The cheaper home would be one more paint attribute on the existing mark path, wider and fading, so surfaces.css still decides where it stands. That fix stays inside ring, so it can follow later.

@max-sixty
max-sixty merged commit c865c3e into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the undo-take-at-once branch November 19, 2026 01:06
max-sixty added a commit that referenced this pull request Nov 19, 2026
#6447 holds an undo's notice until the next input. Its comment in
notifications.js now points at field-readings.js for the press the field's end
says, and the readings' header and the guide's table of the panel's line say
that an undo's notice, like one offering a press, holds until the next input;
so does the guide's Notices lede, which still said four seconds for every
notice.
max-sixty added a commit that referenced this pull request Nov 19, 2026
…box's rows (#6449)

What ⌘Z, or a notice's Undo, took back now takes the yellow tint a newly
arrived message and a revision's changed block already take
(`backgroundFlash`), in place of the outline #6447 added. The held
notice stays. max-sixty asked for this after #6447 landed, judging the
tint better to look at for a mark that lasts a moment, so the page now
marks every change it shows the same way.

The tint needed a fix to show on a widget at all: `backgroundFlash`
animated only the element's own background, and an option row paints its
own ground over the box's, so on the options box (the most common thing
an undo marks) the tint was invisible. A revision changing such a widget
showed no tint either. It now also tints each box drawn inside the
element that paints a background, and those animations end with the
element's, which is still the one it returns, so `lf-tabs` and the
public `backgroundFlash` keep their contract.

To weigh: the walk reads one computed style per descendant of the tinted
element, once per flash, so a revision that changes a large block pays
for its size once.

Checks: the undo test now waits for the rows' tint as well as the box's,
and times out against the old `backgroundFlash`.
`test_a_decided_change_folds_away_rather_than_vanishing` now allows the
undo's tint on the struck paragraph after its last undo, and still
requires its fold to be gone. Of the 215 browser tests that flash, tint,
undo or read notices, all pass but
`test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure`,
which fails on main too; `pnpm run test:runtime` and `check:browser`
pass. Firefox stills, light and dark, are on max-sixty's page.

> _This was written by Claude Code on behalf of max-sixty_
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