Repository navigation
fix: stop a walk's glide when a click opens the thread on the passage it carries - #6074
Merged
Merged
Conversation
A click on a commented passage opens its thread without travel, and the only landing that arrival makes is the thread card's. The card is anchored beside its passage, so it has no scroller of its own and its landing moves nothing. Before #6030 every arrival stopped Leaf's glides (`stopScroll`); #6030 let them run so a walk pressed mid-glide lands where the glide is headed. Nothing on the click route stopped the glide any longer, so a click on a passage still in view during a `t` walk opened its card while the walk carried the passage 2159 px above the window. The click handler now stops the glides that carry the clicked words before opening the thread, as `z` stops one: the press picked those words where they stood. Keys keep #6030's behavior. test_a_thread_trip_takes_over_an_outgoing_trip_before_its_first_frame[passage] fails on main and passes after (3 of 3). #6030's mid-glide matrix in Chromium: 63 passed, 1 xfail (the known `t` then Tab engine gap). Closes #6072
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.
Clicking a commented passage during a
twalk's glide opens that passage's thread but no longer keeps the page on it. The walk's glide keeps going and carries the clicked words out of the window. That breakstest_a_thread_trip_takes_over_an_outgoing_trip_before_its_first_frame[passage]on every run since #6030.Cause. A click on a mark opens its thread with
travel: false(surface.js). The only landing that arrival makes is the thread card's. The card is a fixed box anchored beside its passage, soscrollersOfyields no scroller for it, andscrollIntoViewon it moves nothing. Before #6030,arrivecalledstopScroll, which stopped every Leaf glide, and that is what used to end the walk. #6030 replaced it withstopBrowserScrollso thattpressed mid-glide lands where the glide is headed. After that, nothing on the click route stopped the glide. An instrumented run showed the card's landing readingalreadyShownas false (the glide would carry the card away) and then making no move.Fix. The click handler now stops the glides in the boxes that carry the clicked words (
carriersOf) before opening the thread. The press picked those words where they stood, the same reasonzstops a glide. The change is limited to the pointer route. Keys keep #6030's rule that a landing aims from the glide's goal.Verification.
assert 0 <= -2158.921875) and passes with the change (3 of 3). Its[walk]variant still passes.tests/journeys/navigation/test_reading_place.py::test_a_key_pressed_during_a_glide_acts_where_the_glide_lands, Chromium): 63 passed, 1 xfail (thet-then-Tab engine gap Land a walk pressed while a glide runs where the glide is headed #6030 recorded).pnpm run test:runtimeandpnpm run check:browserpass.test_comment_marks.pyandtest_threads.pypass, apart fromtest_color_cues_fade_to_the_live_surface[firefox_browser]. That test also fails on main with a Firefox color-serialization difference, so this change doesn't cause it.Closes #6072 — automated triage