Repository navigation
fix: re-place a walk's card after the walk scrolls the box that holds its line - #7601
Merged
Merged
Conversation
… its line A thread walk opens its card before its landing scrolls the card's words into view. The card counted only moves Leaf started in the boundary's scroller (the page), so a walk that scrolled a long document's own `<pre>` never reopened the card. The card kept the spot it took while its line was clipped, 35,000 px from where the line now stood, and stood out of sight. A second `t` then found focus out of view and walked back to the same line. A card now counts moves Leaf starts in every box that carries its subject, out to the boundary's scroller. When the walk's landing reopens it, it drops the held spot, so it is placed again where the landing leaves its words, on the side it chose. Behavior protected: `test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole` (both engines), which fails on 6e1977a and passes here. #7442's 20 px taller card exposed the defect; on the shorter card, limitShift's lower bound happened to win. Refs #7528
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 thread walk opens its card before its landing scrolls the card's words into view.
commentPlacement'schoosereopened the card only for moves Leaf started in the boundary's scroller, which is the page. In a long text document the walk scrolls the document's own<pre>, so the card never reopened. It kept the spot it took while line 840 was clipped (held.top = -35438from the line), and limitShift stood it at −35,067 px. A secondtin the same frame found focus out of sight, and the walk returned to line 840 instead of moving on to 880. #7442's taller card exposed the defect: with the card 20 px shorter, limitShift's lower bound happened to win, so the card landed in view by luck.choosenow counts moves Leaf started in every box that carries the subject, out to the boundary's scroller (startsUnder, built onscrollersOf). When the walk's landing reopens the card, the card drops its held spot and is placed again where the landing left its words. It keeps the side it chose, as the module header already said it should. A scroll frommakeRoomstill resets the count throughscrolled(), so the card's own room-making never reopens it.Verification, by node id on Linux:
tests/journeys/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[browser]and[firefox_browser]fail on6e1977ac0(assert 1 == 2onsteps) and pass on this branch.tests/journeys/margin/test_card_placement.py, the thread-walk and pane-walk browser tests,test_a_thread_walk_card_leaves_and_returns_with_its_anchor, andtests/runtime/{comment,floating,margin,scroll}-placement.test.mjspass.browser/typestype check and eslint are clean.This was the last of the eight journeys #7528 tracks. #7535, #7536 and #7537 fixed the other seven.
Closes #7528 — automated triage