Repository navigation
Wait 500 ms for the first hover preview, then follow the pointer without a fade - #7264
Merged
Merged
Conversation
…out a fade Leaf's previews came quickly and plainly: a pointer passing over a control showed its preview after 200 ms, and each preview faded in, even one that followed another along a row. Desktop tooltips wait about half a second for the first and then follow the pointer at once (Windows 500 ms with a 100 ms reshow, Radix 700 ms with a 300 ms skip window, Wikipedia's link previews about 650 ms). The maintainer asked for a slower, calmer hover, for the Threads tab to preview as Threads rather than "Threads 2", and for Copy in a thread to hover as its neighbours do. Behaviour changes: - The first preview a resting pointer reads waits 500 ms (`DWELL`, was 200). Leaving a control for nothing still keeps its preview 200 ms, now its own constant (`LINGER`), so the pointer can cross onto the preview. - A preview that replaces another in place, or comes within the 400 ms warm window after the last one went, shows with no fade. Only the first one a pointer or finger reads fades in (`data-lf-fade`, read by chrome.css); focus never fades, as before. - Only a preview the user saw starts the warm window. One that found no place to stand, such as a point scrolled out of the window, used to let the next control's preview skip its dwell. - An element saying its preview changed while the pointer's dwell counts on it keeps the dwell's deadline. Each change used to restart the dwell, so news more often than every 500 ms kept the preview from ever showing. - A preview redrawn while the pointer leaves for nothing still goes after `LINGER`. The leave check compared records, and a redraw makes a new one, so the preview stayed until the pointer reached another target. - A panel tab is named for its list alone, with its count as its `aria-description`: a screen reader hears "Threads", then "2", and the tab's preview reads "Threads g T", not "Threads 2 g T". - A message's Copy and Copy link, Web Awesome copy buttons wearing the symbol face, had their inner button inset by the host's 1 px border, so their previews stood 1 px right of and above where Edit's stands. The button part now fills the host's border box. At fractional zoom it can still overhang by under a pixel; moving the face onto the part would need a part form of every face-state rule. Tests: the shared-row crossing test asserts the first preview fades in and the one a crossing shows doesn't; the redraw-in-place test now also redraws as the pointer leaves; new tests hold the dwell's deadline through frequent news and keep a preview that never showed from warming the next. The panel test that found On Me by the name "On Me 2" now finds it as "On Me", described by "2". The On panel test asserts the On <agent> tab previews its name without a count. Stills gain `panel-tab-hover` and `message-copy-hover`, and wait out the dwell the runtime under test states rather than a fixed 400 ms, through a shared `CHECK_API` import that `choose_threads_in_panel` uses too.
leaf-agent
previously approved these changes
Nov 26, 2026
The comment on the copy button's inset named webawesome-native.css for the wrapper's position, which the vendor's .copy-button__trigger sets; that sheet sets the face's border.
leaf-agent
previously approved these changes
Nov 26, 2026
Main's new reaction-resting state waited the fixed PREVIEW_DWELL_MS this branch replaced with the dwell the runtime under test states.
leaf-agent
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hover previews now wait 500 ms for the first one, as desktop tooltips do (Windows 500 ms, Radix 700 ms), and a preview that follows another along a row shows at once without fading in again. A panel tab is named for its list alone with its count as its description, so Threads previews as "Threads g T" rather than "Threads 2 g T". A message's Copy and Copy link, Web Awesome buttons, now fill their face, so their previews stand where Edit's does rather than 1 px off.
Review of the area fixed three timing faults in
preview.js: a redraw while the pointer left kept the preview open; news from the element under a resting pointer restarted its dwell each time, so news more often than every 500 ms never let it show; and a preview that found no room to stand still let the next control's preview skip its dwell. Each has a test that fails without its fix.To weigh: the 500 ms value, and keeping key-chip previews on worded controls (the longer wait keeps them off a passing pointer). At fractional zoom Copy's button can still overhang its face by under a pixel; fixing that would need a part form of every face-state rule.
The maintainer asked for this; Codex reviewed the diff; four of its five findings are fixed here, and the fifth is the zoom overhang above. Focused browser tests (167),
pnpm run test:runtimeandpnpm run check:browserpass.