Repository navigation
Have a card's room and the New reply placement re-read their distance as the page glides - #6908
Merged
Merged
Conversation
… as the page glides Two glides still aimed at a distance measured once, so layout that changed during the 140 ms glide left them short. A comment card opening under its passage while a landing glided made its room by replacing the landing's glide with a glide to the landing's goal plus the room, which also dropped the landing's aim: with 150px grown above the passage as the page glided, the card had 150px less room than it asked for, and 80px less where the passage itself grew by 80px, in Chromium and Firefox. The thread card's glide that brings the user's turn into sight above New reply left the turn 140px under New reply when a message above it grew by 150px during the glide. Since #6904 holds scroll anchoring off while a glide moves its box, anchoring no longer made up either move. A glide now keeps its base, where its landing puts the box or the offset a glide toward a distance asked for, apart from one placement distance on top of it. At each frame the landing reads the page with the box at the base, so a nearest landing doesn't take the placement's distance for its own, and the placement (`glideBy`) reads its distance with the box at the base as the box can now stand and adds it there. A later landing clears the placement, a later placement replaces it, and it ends once it reads null. `makeRoom` takes a function that re-reads what the card stands clear of (`attachmentClearance`, split out of `commentAttachment` so a frame reads no margin rows), which thread-preview.js answers with false once the card's session ends and null while the subject isn't drawn, which asks for no move until it is. It joins any glide holding the box (`gliding`), even one whose room asks for no move yet. The New reply placement glides by `glideBy` too, reading the card's scale with the rest. Codex reviewed four rounds. The first version wrapped the landing's aim in each placement's, which kept a removed subject's or a closed card's room, let a glide toward a distance keep room it no longer needed, and tracked the subject's top rather than its attachment. Left as it was: a placement whose goal clamps at the box's end leaves the box to it when a keeper asks for the end, as a landing's glide does. Tests: the new room cases in test_glides.py (growth above the passage, of the passage, and above a passage briefly not drawn) and the new card case in test_card_reply.py fail on main in Chromium and Firefox and pass here. scrolling.test.mjs covers glideBy after a landing's glide, a glide toward a distance and from rest, room given back, a placement whose subject leaves, a nearest-style landing, and a box that shrinks under the glide.
leaf-agent
approved these changes
Nov 23, 2026
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.
Two glides still aimed at a distance measured once: the comment card's room-making glide (
makeRoom) and the thread card's glide that brings the user's turn into sight above New reply (#fitAnswer). With scroll anchoring held off during glides since #6904, layout that changed during the glide left each short: a card opening under its passage during a landing's glide got 150px less room than it asked for when 150px grew above the passage, and the turn ended 140px under New reply when a message above it grew 150px.makeRoomalso replaced the landing's glide with a numeric one, dropping the landing's aim.Now a glide keeps its base (where its landing puts the box, or the offset asked for) apart from one placement distance (
glideBy), which it reads with the box at the base at each frame. A later landing clears the placement, a later placement replaces it, andmakeRoomre-reads what the card stands clear of (attachmentClearance, split out ofcommentAttachmentso a frame scans no margin rows) through a function that answers false once the card closes.To weigh: a placement whose goal clamps at the box's end still leaves the box to it when a keeper asks for the end, as a landing's glide already did.
Max asked for this after #6904. Tests: the new cases in
test_glides.pyandtest_card_reply.pyfail on main in Chromium and Firefox and pass here;scrolling.test.mjscovers the base and placement arithmetic.