Repository navigation
fix: choose a comment's side again when its side runs out of room, and carry it from its subject's whole left edge - #7383
Merged
Merged
Conversation
…d carry it from its subject's whole left edge #7363 keyed `commentPlacement`'s fresh side choice on the subject's width, so a sideways scroll of a box around the log keeps the side. That also kept the side when a transform carried the paragraph 600 px toward the right rail, leaving the box on a side with no room. `choose` now also chooses afresh when the room beside the subject on the side it holds no longer holds the least width, the same test `commentSide` chose it by. Without the old edge key, a box beside a part of a scrolled diagram is no longer placed afresh as the part's left edge passes under its scroller's edge, so the carried offset, measured from the clipped `clear.left`, lagged the part by 6 px. The offset is now measured from `extent.left`, the whole box, which moves with its content. Behavior protected: test_a_side_comment_rechooses_its_rail_after_horizontal_target_motion and test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone, which fail on main and pass here. Closes #7380
This was referenced Nov 27, 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 browser tests about a comment box beside words that move sideways have failed on
mainsince #7363. This fixes both incommentPlacement(comment-placement.js) and keeps #7363's intent: a sideways scroll of a box around the log still carries the comment box with its words, on the side it already holds.A held side is chosen again when it runs out of room. #7363 keyed the fresh side choice on the subject's width instead of its left and right edges, so motion the words share with their box no longer jumps the box. It also stopped the choice when a transform carried the paragraph 600 px toward the right rail, which left the box
right-starton a side with no room.choosenow also chooses afresh when the room beside the subject on the held side no longer fits the least card width. That is the testcommentSidealready chose the side by, now shared asbesideFits. A sideways scroll that leaves room keeps the side, as #7363 intended.The carried offset is measured from the subject's whole box. #7363 removed the old edge key, so a box beside a part of a scrolled diagram is no longer placed afresh when the part's left edge slides under its scroller's edge. Its carried offset was measured from
clear.left, the clipped edge, which stops moving once clipped, so the box lagged the part by 6 px. The offset is now measured fromextent.left, the unclipped box, which moves with its content. Quoted passages still measure from their column. Both callers ofoptionsnow passextent.What a user sees differently from current
main:Nothing else should change. Every other placement keeps its side and offset.
Verification:
main,test_render_aim.py::test_a_side_comment_rechooses_its_rail_after_horizontal_target_motion[inline]and[ancestor], andtest_render_reactions.py::test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone, all fail. On this branch all three pass.pnpm run test:runtimepasses 1176/1176, including Move a comment box with words scrolled sideways, start it at a right-to-left quote's first word, and keep a slim card's news count whole #7363's runtime cases for a sideways scroll of the log and of a box around it.pnpm run check:frameworkpasses.Closes #7380 — automated triage