Repository navigation
fix: read a thread card's message when its placement moves it into view, and adapt two journeys to the end room - #7288
Merged
Merged
Conversation
…ew, and adapt two journeys to the end room Read tracking ran a pass on scrolls, room changes and body size changes, but not when a body moved without any of them. With #7188's end room, `t` on a page scrolled below its top now scrolls the page (at once, under reduced motion) and the card's placement then holds the card at the window's foot, carrying its message from mostly below the window to wholly in it. No pass followed, so the message stayed unread until the next scroll. An IntersectionObserver on each observed body, at thresholds 0 and 1, now brings a pass as a body enters the window or comes wholly into it. The new browser test fails without it. Two journeys read coordinates the room moved: - The bottom-chrome journey asserts the body keeps no panel room; it now reads the page without the end room, as `without_end_room` does for the browser tests #7244 adapted. - The hidden-annotations journey pressed `t` from wherever reading the document's last lines left the reader; with the room that place is past the link, so `t` reached the document's thread. It now scrolls to the top first. Closes #7282
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.
All three nightly journeys that #7188's end room turned red now pass. One of them caught a real defect: a thread card could stay unread after the user opened it.
Product fix: a card the placement brings into view is read.
records/thread/read.jsran an exposure pass on scrolls, room changes (watchRoom) and body resizes, but not when a body moved without any of those. With the end room, pressington a page scrolled below its top scrolls the page, which is instant under reduced motion. The card's floating placement then moves the card from its anchor to the window's foot. Its message goes from 818–997 px (24 px seen) to 504 px and up, wholly in view, and no pass runs after that move. So the message, its thread's "1 unread" and On Me's "1 thread with news" stayed until the next scroll, and the render gate saw the second open mark it read. Each observed body now also has an IntersectionObserver at thresholds 0 and 1, so a pass runs when a body enters the window or comes wholly into it. This is the same primitivewhenChangesindom/geometry.jsuses for layout moves.test_a_card_its_placement_brings_into_view_is_read(browser tier) fails onmain(the news dot stays shown) and passes here. The render gate'sthread-choice-hintscase fails before and passes after.Two journeys read a place the room moved. #7188 meant the room for these column pages, so both tests keep what they protect:
test_the_page_end_clears_the_bottom_chrome_around_a_workspace: its first page is a column document with a pane, not a workspace. Its assertion that the body keeps no panel room read the end room's 584.8 px. It now reads the page throughwithout_end_room, the helper Adapt the browser tests to a document's end room, and keep the room off the root headers' observer #7244 introduced. The workspace pages in the test are unchanged and still pass.test_hiding_annotations_gives_marked_words_their_own_colours_back:twalks from the reader's place. Before the room, centring the document's last line clamped at the page's end. Now it centres exactly, andtreached the document's"resend now"thread instead of the link's. The test now scrolls to the top beforet. It passes in Chromium, Firefox and WebKit.Checked: each of the three tests run alone with
--run-nightly(failing onab811b350, passing here), the neighbouring read-state browser tests,pnpm run test:runtime,pnpm run checkand pre-commit.#7245, the sidebar track's end-of-scroll decision, is separate and untouched.
Closes #7282 — automated triage