Repository navigation
fix: land a tall destination's opening when travel goes to it - #5560
Merged
Merged
Conversation
#5361 gated every travel landing on `alreadyShown`, which asks whether a nearest landing would move nothing. Travel lands at a destination's start or centre, and for a box taller than its room a nearest landing moves nothing once the box fills the window. So `t` to a thread on a section the user is reading inside, and a diff's file chosen in its tree after reading down, no longer brought in the destination's opening, where `readableDestination` before #5361 always landed it. `alreadyShown` now takes the landing's `block`, and for a box taller than its room asks whether that landing would move nothing. Travel's gates and its departure plan, the queue walk and the change walk pass theirs. Nearest callers are unchanged. test_the_obligation_walk_keeps_its_place_when_a_version_lands ran at a 400px window, where the decision the user stands on is taller than its room and stood under the floating panel. It passed before #5361 only because the decision read as unseen there, so the version's restore didn't land it. Since #5468 a key lets go of a focused control the user can't see, so that setup now tests a different case. At 600px the decision fits its room and stays on screen, with the earlier obligation's words above it, which is the case the test describes. Refs #5486
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.
Travel and the walks land a destination at its start or centre, but since #5361 they decided whether to land by asking
alreadyShown, which asks whether a nearest landing would move nothing. A nearest landing moves nothing for a box taller than the window that already fills it. Sotto a thread on a long section the user is reading inside, and a diff file chosen in its tree after reading down, stopped bringing in the destination's opening. Before #5361,readableDestinationalways landed a tall destination's opening. #5361's description lists no such change, and two tests that protect it went red.alreadyShownnow takes theblockof the landing that follows. A box taller than its room counts as shown only where that landing would move nothing. Travel's start and centre gates, its departure plan, the queue walk and the change walk pass their block. Every nearest caller (Tab arrivals, entering a reply, returning to a thread,scrollIntoView's own nearest check) keeps today's answer. For a box that fits its room, the block changes nothing.This fixes three of the seven tests #5486 tracks. Each fails on
main(19e31482b) and passes here:test_render_aim.py::test_a_pointed_comment_keeps_the_rows_still_owed[thread]:tlands the thread's section at its top again.test_render_diff_controls.py::test_file_tree_lands_at_the_file_start_after_reading_down[pane]and[document]: choosing a file in the tree lands its first line again.test_current_location.py::test_the_obligation_walk_keeps_its_place_when_a_version_lands: a test-only change. Its 400px window left the decision the user stands on taller than its room and under the floating panel. It passed before Ask one question of whether the user sees a box, and land only what it says isn't shown #5361 only because that hid the decision, so the version's restore didn't land it. Since Let a key go of focus the user can't see, and read where they are by one rule #5468 a key lets go of a focused control the user can't see, so that setup tests something else. At 600px the decision fits and stays on screen with the earlier obligation's words above it, which is the case the test describes. It still tells the kept walk place from the viewport's reading, since a walk from the reading block would step tot-baffles, nott-bath.Verification.
pnpm run test:runtime(819) andcheck:browserpass. The landing change also ran withtest_obligation_walk.py,test_threads.py,test_render_navigation.py,test_render_diff_controls.py,test_render_aim.py,test_current_location.py,test_reading_place.py,test_changes_in_place.py,test_seated_threads.pyandtest_go_to.py. Every failure there also fails on unchangedmain.#5551 fixes three of the other four tests, through the floating panel's cover. The last one,
test_sample_host_view_changes_leave_its_scroll_and_keyboard_position, stays open on #5486.Refs #5486 — automated triage