Skip to content

test: aim the composer-attachment drafts at a contents link the outline shows - #7502

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7496
Nov 28, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7496

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#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_draft gave 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 d0618e073 and pass with this change when run by node id with -n 3:

  • test_a_withheld_draft_restores_editing_and_deliberate_dismissal
  • test_explicit_reopening_keeps_a_css_hidden_subject_draft_reachable[resume|reload|withheld|comment]

Closes #7496 — automated triage

…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
@leaf-agent
leaf-agent merged commit fee455a into main Nov 28, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7496 branch November 28, 2026 07:44
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Five render_aim tests fail since #7473 let a page narrow its sidebar to the contents map's spine

1 participant