Repository navigation
fix: keep a thread message the user clicked still as a message above it grows - #5693
Merged
Merged
Conversation
…it grows Since #5551 a reply box under the floating panel counts as unseen, so the keep fell back from the thread's reply box to the thread's top, and a message above the clicked one growing by 63px pushed it down by 63px. The keep now holds the caret a click on a focused container's words leaves, where it lies outside the box the container stands at and outside a text field, before the container's own place. A message the user clicked stays as a message above it grows or an answer joins below it, and the reply box moves; a thread focused with its caret in the reply box, or none in it, is held as before. test_page_holds_still.py's message-edit-above cases fail before and pass after, on Chromium and Firefox; the rest of the file holds. Closes #5687
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.
Since #5551, a reply box under the floating panel counts as unseen. When the user clicked a message's words, the keep therefore fell back from the thread's reply box to the thread's top, and a message above the clicked one that grew by 63px pushed the clicked message down by 63px. Now the keep first holds the caret that the click left in the focused container, as long as the caret lies outside the box the container stands at (
standsAt) and the container isn't a text field. So the clicked message stays put when a message above it grows or an answer joins below it, and the reply box moves instead. This matches the rulethread/reply-landing.jsalready states ("a message they stand on stays and the box below it moves down"). A thread focused with its caret in the reply box, or with no caret in it, keeps the reply box's hold as before, so a send still holds the emptied box.#5551's rule that a box under the panel counts as unseen still holds. This change gives the keep a better place than the thread's top when that rule applies.
Verification:
test_page_holds_still.py::…[message-edit-above-chromium]and[message-edit-above-firefox]fail on main0534adc7dwiththe place moved 63.0px. Both pass with this change.tests/journeys/test_page_holds_still.py --run-nightlypasses: 94 passed, and its 14 strict xfails still fail as recorded. That includes themessage-reply-belowcases, which test: update ten nightly journeys to the behavior #5448, #5508, #5537, #5551, #5552 and #5566 chose #5685 had just un-xfailed.pnpm run test:runtime(896 pass) andpnpm run check:browserpass.test_summaries.py::test_a_root_summary_keeps_thread_actions_outside_its_fold[1400-True-10](labelLines3.0 > 1.1). It fails the same way on main without this change.One known gap: if the change rewrites the very words the caret sits in, the caret's range leaves with them, so this hold keeps nothing and the browser's scroll anchoring takes over.
Closes #5687 — automated triage