Repository navigation
test: aim the composer-attachment drafts at a contents link the outline shows - #7502
Merged
Merged
Conversation
…ne shows Since #7473, the test page's 240px sidebar shows the contents map as the open outline, which hides its title row (`.lf-toc-start`). The tests took the first `#bg-contents a`, the hidden title link, so Tab never focused it. They now aim at the "First section" link, which the outline shows and Tab reaches. The draft's anchor stays the map's section, so what the tests protect, drafts on a subject CSS later hides, is unchanged. Closes #7496
This was referenced Nov 28, 2026
This was referenced Nov 28, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 28, 2026
…a block's top (#7536) This fixes four of the eight journeys #7528 tracks: both `column` cases of the placement sweep, and both cases of the responsive-draft aim journey. **Placement sweep, product fix.** #7442 moved where a bounded block's top starts cutting a margin card. The cut now starts a head line (`--lf-card-line`, 33px) and a gap above the row's line, so a card beside its row, whose top now stands that far above the line, is cut from nothing. `commentBoundary` applied that lead to every side. A card over or under its row has no head line level with the row, so the block's top cut it while the row still showed whole. At 1000px the sweep opened a card above `#in-4`, a row 39px inside the `#inner` log, and 379px of the card's 402 were cut away. The boundary's `cut` is now asked with the side (`thread-preview.js`). A card beside its row keeps #7442's lead, and a card over or under it is cut once the row's line comes within a gap of the edge, as before #7442. **Placement sweep, test update.** At 1440px the card stands beside the row, held up by the window's foot, and is cut 35.7px while the row shows whole. That is #7442's intended lead. The sweep's `uncut-while-shown` allowance assumed a beside card's top stood a gap above the line. It now allows a gap and a head line for a card beside its row, and still allows only a gap for a card over or under it. **Aim journey, test update.** `test_open_draft_retains_words_when_responsive_layout_hides_its_target` aimed at the first `#bg-contents a`. Since #7473 that is the outline's hidden title link, which Tab never reaches. #7473 landed after #7442, so this pair is a #7473 casualty, the same one #7502 repaired in five browser tests. The journey now aims at `#bg-contents a[href='#first']`, as #7502 did. Evidence, by node id on Linux Chromium: - `test_every_card_keeps_the_placement_rules[column-1000]` and `[column-1440]` fail on `6313a6f59`, and pass with this change. `[column-1000]` still fails with the test update alone, which shows the product fix is needed. - `test_open_draft_retains_words_when_responsive_layout_hides_its_target[False]` and `[True]` fail on `6313a6f59` and pass with this change. - The other four sweep cases still pass, and so does `test_a_card_on_a_log_row_stands_beside_the_log_and_leaves_with_its_row`, #7442's test of a beside card's cut growing from nothing. `tests/runtime/comment-placement.test.mjs` passes. The other four journeys in #7528 (two margin-draft journeys, the thread walk and the long text document) are not touched here. Refs #7528 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
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.
#7473 stopped the Layout from narrowing a sidebar to the contents map's spine unless the page asks for it. So
COMPOSER_ATTACHMENT_PAGE's 240px sidebar now shows the map as the open outline, and the outline hides its title row (.lf-toc-start,packages/default/styles/toc.css). The five tests took the first#bg-contents a, which is now that hidden title link with no box. Tab can't focus it, so_open_attachment_draftgave up after 50 presses. The other contents links are still reachable: a Tab walk on the page focuses First section, Second section, A tabbed section and Reading space in turn. The failure came from what the test aimed at; it is not a regression for users.The tests now aim at
#bg-contents a[href='#first'], a link the outline shows. The draft's anchor is still the map's section ({"section": "bg-contents"}), so the tests protect the same behavior as before: a draft whose subject CSS later hides at 480px stays reachable and keeps its words. This keeps #7473's intent and changes no interface.The five tests in #7496 fail on
d0618e073and pass with this change when run by node id with-n 3:test_a_withheld_draft_restores_editing_and_deliberate_dismissaltest_explicit_reopening_keeps_a_css_hidden_subject_draft_reachable[resume|reload|withheld|comment]Closes #7496 — automated triage