Repository navigation
test: click an attachment clear of the fold mark, and count the export's gallery against its samples - #6637
Merged
Conversation
…t's gallery against its samples Two browser tests on main broke on changes that moved the interface on purpose (ci run 44843074595 on 1b70176): - test_looking_at_an_attached_image_keeps_the_draft_where_it_stands clicked the draft attachment at its foot's start. Since #6622 the panel's fold mark rides the box's top-left corner and shows under a pointer there, and its top edge reaches the picture's lowest three pixel rows, so the click landed on the mark. The test now clicks the foot's middle, clear of both the removal mark and the fold mark. - test_an_export_reveals_its_widgets_and_releases_readable_failure_fallback asserted 23 margin-entry gallery items; #6627 added a News sample, so the gallery draws 24. Instead of moving the literal again (#6347 moved it to 23), the test asserts that both galleries draw the same non-empty set of samples with one face each, as #6393 did for the journey test. Both fail on main and pass with this change. Refs #6636
This was referenced Nov 21, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
Closes #6639 #6622 stood the floating panel's fold mark (−) on the box's top-left corner and promised: "With a picture attached, the mark under a pointer at the corner stands just below the picture's left edge, without overlap." It overlapped. The mark stood 9px out past the corner, and its press area reaches 2px past its 20px face, so it took presses from 11px above the box, while a draft's pictures stand 8px above the box (`--lf-media-gap`). With a wrapping draft and a pasted 40×30 picture in a 1440×900 window, the mark covered the picture's lowest 3 rows across its first 13 columns, and a press there folded the panel instead of opening the picture's viewer. The mark also showed whenever the pointer was within the box's left 64px at any height, so it appeared over the picture itself, and the picture lost its hover, removal mark included. | | Before | After | | --- | --- | --- | | Pointer on the picture's foot, 3px in |  |  | | Pointer at the box's top-left corner |  |  | Two changes: - **One overhang for every corner mark.** `--lf-media-mark-overhang` (6px) moves from `response.css` into `tokens.css` as `--lf-mark-overhang`, beside `--lf-mark-size`, and the fold reads it for its `top` and `left`. The fold, reach included, now ends at the picture's foot. It sits 3px further into the corner; on a long draft its face meets the field's first glyph only at a corner point. The attachments' marks don't move. - **Near means the box or the mark.** `readCorner` (`floating-panel.js`) keeps whether the pointer event's target is the mark, and counts the pointer as near only while it is over the box's corner or over the mark where the mark stands out past the box. A pointer on a picture above the corner shows the picture's own marks and leaves the press to the picture. Touch is unaffected: the fold shows only under `@media (hover: hover)`, so it stays hidden under a finger on both versions. Measured with a probe journey on both versions, in the test's setup: | | main | this branch | | --- | --- | --- | | Fold shown with the pointer on the picture's foot | yes | no | | Picture pixels whose press goes to the fold, fold shown at the corner | 39 | 0 | | Press at the picture's foot start | folds the panel | opens the viewer | Tests: - `test_a_pointer_folds_the_panel_from_its_corner` reads the offset from the token: the mark's top-left stands `--lf-mark-overhang` out past the box's corner. It used to assert the mark's centre on the corner within 2px. - `test_looking_at_an_attached_image_keeps_the_draft_where_it_stands` presses the picture's foot start again, where it pressed before #6637 moved the press to the mid-foot. It also checks that, with the fold shown at the corner, the picture's lowest row takes the picture's press, and that a pointer on the foot shows no fold. Reverting either change alone fails it. - A new stills state, `page-comment-photo-corner`, shows the fold beside an attached picture. Run: those two tests and `test_the_leaf_paints_inside_its_focus_ring_after_folding` by node id (pass); `pnpm run test:runtime` (1083 pass); `pnpm run check:browser`; `tests/model/test_theme_tokens.py`; pre-commit on the changed files. `leaf-dev stills` against main changes `page-comment-photo-corner` and `panel-corner-hover` (the mark 3px into the corner) and leaves the pixels of `page-comment-photo`, `page-comment-photo-hover`, `thread-reply-photo`, `drawing-photo-comment`, `drawing-comment-hover`, `drawing-comment-keyboard` and `plan-card-reply-photo` unchanged. > _This was written by Claude Code on behalf of max-sixty_
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 that fail on
mainsince push run 44843074595 (1b70176f1) broke on changes that moved the interface on purpose. This PR updates both tests to the new behavior and changes no product code.test_looking_at_an_attached_image_keeps_the_draft_where_it_standsclicked the draft's attached picture at its foot's start (3 px in, 3 px up). Since Ride the panel's fold mark on its top-left corner #6622 the panel's fold mark rides the box's top-left corner and shows while the pointer is near it. Measured in Chromium, the mark's box (y 833–853) reaches into the picture's bottom edge (y 804–834), andelementFromPointreturns the mark for the picture's lowest three pixel rows at that x. So the click hit the mark, and Playwright timed out after 120 s. The test now clicks the middle of the picture's foot, which is clear of the removal mark on its top-right corner and of the fold mark.test_an_export_reveals_its_widgets_and_releases_readable_failure_fallbackasserted 23 margin-entry gallery items. Keep a control's dot on its corner whether or not a count shows #6627 added a News sample on purpose, so the gallery now draws 24. This is the second time the literal has moved (test: expect the feature gallery's 23 samples in the export test after #6336 #6347 set it to 23). The test now checks what that count protected: both of the page's galleries draw the same non-empty set of samples, with one face per item. test: count the margin-entry gallery's faces against its samples, not a fixed 44 #6393 made the same change to the journey test.Both tests fail on current
mainand pass with this change.The run's third failure,
test_resolving_a_thread_restyles_what_focus_marks(255 restyles at 4 sections, 313 at 24), did not reproduce locally. It is tracked separately from #6636.One finding for #6622's author: its description says the fold mark stands "just below the picture's left edge, without overlap". The measurement above shows the mark overlapping the picture by about 3 px, so a press on the bottom-left corner of an attached picture folds the panel instead of opening the viewer. This PR doesn't move the mark, because where the mark stands is a placement choice for #6622's author.
Refs #6636 — automated triage