Skip to content

Grow the comment box's card paint out of its field, on its own layer - #3161

Merged
max-sixty merged 2 commits into
mainfrom
composer-growth-direction
Oct 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
composer-growth-direction

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

The comment box's card paint now opens out of its field when writing starts, bringing back the growth #3157 removed from Send. The paint moves to its own layer beneath the box, which also fixes three compositor-frame tests #3157 broke.

The growth

Before #3157, Send opened the card out of the comment box with a 240ms clip (growOut). #3157 painted the box at its card's size while it is written, so Send had nothing left to grow and the animation went. The user asked for the growth back. It now plays where the box becomes the card: the first time its field takes focus or holds words. Every edge reaches the box's edge together, then the clip opens past the shadow's reach so nothing pops when it lifts. Send still swaps the box for its card in place.

The paint's own layer

The card paint (ground, border, shadow) moves from .lf-fab-bar to its ::before, beneath the box's grip and controls:

  • Growing a clip on the bar itself also clipped its presses and outline, so a press in the frame's rows during the growth fell through to the page (test_a_dropped_surface_keeps_its_box_until_placement_commits[composer]) and frame tests lost the box's marker. On the pseudo-element the growth moves only paint.
  • will-change: transform keeps the layer's raster while a scroll carries the box out of the window. Rastered again on return, the 36px shadow missed the frame that brought the box's words back, so the first returning frame showed the field without its card (test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[document-target] and [code-target], failing on main since Draw the comment box as its card while it is written #3157).

Behavior changes

  • Writing starts: the card paint opens out of the field over 240ms (nothing under reduced motion). One run per writing session: none on typing, wrapping, a grip press or blur with words, checked in Firefox and Chromium.
  • test_a_wheel_return_…[pane-selection] wheeled with the pointer over the box's top row. Since Draw the comment box as its card while it is written #3157 that row is the painted card's grip, which takes the wheel as the thread card does, so the pane no longer scrolled. The test now wheels the pane above the passage.

This was written by Claude Code on behalf of max-sixty

The growth Send used to play (growOut, removed in #3157) now plays where the
box becomes its card: when its field first takes focus or holds words. Only
the clip moves; the frame was already reserved, so no word does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 19, 2026
The card paint moves to the bar's ::before, beneath its grip and controls,
so the growth clips only paint: presses in the frame's rows land from the
start, and frame tests keep the box's marker. The layer is promoted so its
raster survives a scroll out of the window; re-rastered on return, the
shadow missed the frame that brought the words back (wheel-return
document-target and code-target, failing since #3157).

The pane wheel-return case wheeled over the box's top row, which since
#3157 is the painted card's grip and takes the wheel as the thread card
does; it now wheels the pane above the passage.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty max-sixty changed the title Open the comment box's card paint out of its field Grow the comment box's card paint out of its field, on its own layer Oct 19, 2026
@max-sixty
max-sixty merged commit f71f00d into main Oct 19, 2026
3 checks passed
@max-sixty
max-sixty deleted the composer-growth-direction branch October 19, 2026 19:35
leaf-agent added a commit that referenced this pull request Oct 19, 2026
The two remaining browser failures in [main CI run
39295617122](https://github.com/max-sixty/leaf/actions/runs/39295617122)
came from test presses landing on the comment card rather than their
intended page targets.
[#3157](#3157) deliberately made
the card’s painted rows a drag grip while writing; the adjacent button
and passage in these fixtures now sit behind that grip.

Move the newer button above the composer’s area and give the draft
test’s second passage its own clear line. The tests still use real
presses to check that a later control keeps focus and that each passage
keeps its own unsent words. Both cases failed on current `main` before
this change and pass after it; the focus test’s other parameter also
passes.

The run’s other five failed cases are addressed by merged
[#3161](#3161),
[#3162](#3162), and
[#3163](#3163); those cases passed
in the focused current-main run.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 20, 2026
… it at Send (#3187)

While a comment is written, its box paints only its field again, and
Send grows the sent card out of that field, as before #3157.

The user preferred the box as a field that opens into its card at Send
to a box painted as the card while it is written (#3157, #3161). The
frame still reserves the card's name and Reply rows unpainted around the
field, and placement still holds that whole frame inside the window
(#3157's revert of #3139's overhang stays), so the card Send opens
stands where the frame stood and no word moves.

- `annotation-chrome.css`: the frame's `::before` paint and its growth
on writing (#3161) go, as do the frame-wide grip and its accent; the
grip is again the band around the field. The card's `lf-comment-grow`
returns on `.lf-margin-preview[data-lf-grows]`, keeping #3161's ending
past the shadow's reach so the shadow is whole when the clip lifts.
- `thread-preview.js`: `growOut` returns. The card keeps opening at its
box's width (#3166).
- The reading region's cut, which `placeThreadPreview` wrote as the
card's inline `clip-path`, is now four properties (`--lf-cut-*`) that
the card's clip and its growth both read. The growth animates
`clip-path` too and overrode the inline cut while it ran, so a card sent
in a pane painted itself and its shadow past the pane's edge for 240ms
(`test_a_sent_card_grows_inside_its_reading_region`, which fails without
this). Each growth edge now stops at the cut, and the growth ends on the
cut it rests at.
- `comment-placement.js` header: records both rejected designs.

## Behavior changes

- Writing: the box shows only its field. Near the window's foot the
field rises while empty room still shows below it, since that room is
kept for the card's Reply row.
- Send: the card opens out of the field over 240ms (whole at once under
reduced motion). `test_send_grows_thread_around_the_words` asserts the
box paints nothing beyond its field and that the card grows, besides its
existing checks that the card takes the box's rectangle and no word
moves.
- The reserved rows take no presses or wheel turns: they reach the page
beneath. The wheel-return test keeps wheeling the pane above its
passage, since its old spot now lies on the box's field.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[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.

2 participants