Repository navigation
fix: keep On me's read card still when a group joins above it - #5533
Merged
Merged
Conversation
#5318 boxed every On group and spaced the boxes with a top margin on each group but the first. A group joining at the top then gave the old first group that margin, and a margin change on an ancestor of the browser's scroll anchor suppresses anchoring, so the card being read dropped by the new group's height. The space now hangs below each group but the last, so a group arriving above leaves the anchored group's style unchanged. Spacing between groups is the same; stills of On me, Page Map and Threads show no pixel changed. Two tests still expected On me before #5318 and now follow it: - The tab-place test reads each group's band for the place's name, since under place grouping a card no longer says its place over its question. - The card-identity test unfolds Done before counting, and lets the card whose element leaves the page be redrawn: it moves into the whole page's group, which #5318 draws afresh in that group's box. It still checks that card keeps focus and every other card keeps its node. Closes #5481
This was referenced Nov 5, 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.
Three
--run-mainOn me tests have failed onmainsince #5318 gave every On group a sticky band. Two of them still expected On me as it was before #5318. The third caught a real regression: when a new group joined above the card being read, that card dropped by the new group's height (115px in the test).The regression. #5318 put each group in its own box and spaced the boxes with
margin-block-start: 10pxon each group but the first. When a group joins at the top, the group that used to be first picks up that margin. A margin change on an ancestor of the browser's scroll anchor suppresses anchoring, so the 115px the new group added went uncompensated. Only the later 57px, from the asked message filling its outlet, was corrected. The space now hangs below each group but the last (margin-block-endon:not(:last-child)incontrols.css), so a group arriving above leaves the anchored group's style as it was. The gap between groups is unchanged:leaf-dev stillsforon-me,hub-on-me,page-mapandship-threadsreports 0 px changed against main (only computed margins differ). The one visible difference is in lists where something other than a group follows the last group: Threads' "saved threads still to come" note, which shows only briefly, now has 10px of space above it.Tests updated to #5318's intent:
test_on_me_places_an_item_by_its_tab_s_title_or_label: under place grouping a card no longer says its place over its question, because the band says it (Give every On group a sticky band, and fold Done under its own #5318 changed the neighbouring grouping test the same way). The test now reads the bands' names, and these still check how a tab's title or label names the place.test_obligation_cards_keep_identity_and_walk_order_when_the_live_dom_moves: it now unfolds Done before counting five cards. When#sug-refillleaves the page, its item moves into "The whole page" group, and Give every On group a sticky band, and fold Done under its own #5318's description says such a card is "drawn afresh in its new group's box", withholdFocuscarrying focus over. The test now checks that card stands under that band and keeps focus, and that every other card keeps its node.All three failed on
53337b5e9and pass with this change (uv run pytest --run-main tests/browser/widgets/test_on_panel.py -k ...). The band contract test (test_a_band_names_the_group_passing_under_it) and the grouping tests I selected also pass, with two exceptions.test_an_answer_in_on_me_keeps_its_groups_and_the_m_walk_in_one_orderandtest_the_chosen_grouping_orders_on_me_and_the_m_walk_alikefail the same way on unmodified main and with this change. They aren't part of #5481 and this PR doesn't touch them.Closes #5481 — automated triage