Repository navigation
fix: show the preview at once when the user aims again where the pointer already rested - #6666
Merged
Merged
Conversation
A press on a dial depth puts Leaf's preview away, and its click aims at the depth again (`previewChanged` with `aim`). The preview took that aim through the pointer's dwell whenever the press had lasted longer than WARM (400 ms) since the preview hid, so the dial's sheets, which go a frame after the press is over, closed and came back 200 ms later. That is the flicker `test_pointing_at_a_depth_hangs_each_depth_s_page_under_its_button` caught intermittently on Firefox on the slow macOS runner, where the test's own steps outlast WARM. The preview now records the target the pointer's wait is over for (`rested`), and an aim inside it shows at once. A pointer that has only just come still waits its dwell, so a chart's first point keeps its dwell; after Escape the next point a resting pointer reaches reads at once, as the chart test's docstring already says. The dial test now holds its press past WARM on the page clock and records any close of the panel after release; it fails on the old code in both engines and passes with the fix. Closes #6663
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.
A press on a dial depth puts Leaf's preview away, and the click that follows aims at the depth again (
previewChangedwithaim).changedhanded that aim to the pointer'spoint(), which shows at once only while warm, withinWARM(400 ms) of the last preview hiding, and otherwise starts the 200 ms dwell. So a press held longer than 400 ms let the dial'saway(scheduled for the frame after the press is over) close the sheets, and the dwell reopened them 200 ms later. Users see this as a flicker, and it causes both failures in #6663: Firefox on the loaded macOS runner outlastsWARMbetweenmouse.downand the click, so the test read the frame while the panel was closed (None) or before it had glided back (wrong column).The preview now records the target the pointer's wait is over for (
rested: its dwell ran, or it showed at once while warm), and an aim inside that target shows at once. A pointer that has only just come still waits its dwell, so a chart's first point under a newly arrived pointer is unchanged.Behavior change outside the dial: after Escape, the next chart point a resting pointer reaches now reads at once instead of after the dwell.
test_a_chart_says_the_value_under_the_pointer_and_the_keyboardalready says it "reads at once"; that test was passing only becauseexpectwaited out the dwell.Verification.
test_pointing_at_a_depth_hangs_each_depth_s_page_under_its_buttonnow holds the press pastWARMon the page clock (dwelt(page, "WARM")), records any close of the panel after release, and runs past the dwell before checking. Locally, on Linux, both engines fail on the oldpreview.js(the panel recorded a close) and pass with the fix. Before that, a plain 500 ms hold reproduced CI'sNoneand wrong-column failures every time. The dial, chart and preview tests that exercise the pointer, Escape and aim paths (61 selected) pass, and so dopnpm run test:runtimeandcheck:framework. On the macOS runner, the Firefox case passed 54 of 54 copies at this head under--workers 3 --load 2(44925629554). The same dispatch at the base failed 4 of 18 (44922543784).Closes #6663 — automated triage