Repository navigation
Draw the floating panel's attached images as pictures with a corner × - #3190
Merged
Merged
Conversation
Hanging above the panel and in the row beside the words, picked by a sample page's html[data-attachment-placement]; the user's pick replaces this switch. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An image attached to the panel's field, the page's or an open thread's reply, now stands on a ground of its own just over the panel's top edge, above the field's start, instead of taking a line of its own inside the panel. Attaching no longer grows the panel by a line the one thumbnail left mostly empty, and moves no words. With a view open the images hang over the view's head; the leaf's menu covers them while it is open, and folding the panel hides them with the field. The user chose this from a live comparison with today's row and with thumbnails shrunk into the row beside the words. The floating-panel test now holds the panel's size steady across the paste and the image above the panel's top edge. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/chrome.css # skills/leaf/assets/styles/floating-panel.css # tests/browser/test_render_floating_panel.py
…emoval Each image attached to the panel's field now hangs as its picture alone, at 56px tall in its own proportions with a ring and a soft shadow, and its removal is a small round mark on its top-right corner. The shared ground, the box around each image and the full-height removal press with its divider are gone. The mark shows while a pointer is over the image or a key is on it, and always under a finger, where its reach is the touch floor; the shelf's padding holds that reach and the shadows, which its sideways scroll would otherwise cut. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
The theme and its components copied sizes from each other as literal numbers: a 48px row reserve for a 44px panel row, a 32px shadow reach a script hard-coded, a 34px coarse button beside a 28px answers line, left/right paddings that only held left to right. Each copy could drift from its source, and several had. This branch gives each of those sizes one token and derives the rest from it. ## Visible fixes (each with a browser test that fails without it) - **Right-to-left tables**: outer-cell padding and cell alignment were physical (`padding-left`, `text-align: left`), so a right-to-left table's words stood 14px+ in from the prose edge. Now `padding-inline-*` and `text-align: start`. - **Page foot room**: the reserve under the floating panel is derived from the row it reserves (`--lf-fp-line` + 2 × `--lf-fp-row-pad`); the page used to end 4px further above it. - **Answers line under a finger**: `--lf-fp-press` sizes the answers line, buttons and reaches together, so an Undo arriving later no longer grows the line by 6px. - **Phone panel width**: `--lf-fp-max` / `--lf-fp-gutter` set the panel's width; the expanded phone panel kept 4px less than the collapsed one. ## Visible without a test - **Touch rail**: `--rail` is derived from `--rail-hang` and `--margin-gap`, now in the theme; the touch rail shrinks 119 → 107px to what the markers take. Mouse is unchanged. - **Attached image on the panel** (from #3190): its `0 4px 14px` shadow was off the theme's ladder and fails `test_every_lift_names_one_of_the_theme_s_heights_cast_in_the_scheme_s_ink` on `main`; it now lies at `--raise-1`. ## No visible change - Shadows are written from `--raise-N-drop` / `--raise-N-blur`; `floating-panel.js` reads the panel's shadow reach from them instead of `SHADOW_REACH = 32`. Lengths scripts read are registered with `@property` so they resolve to pixels. - `lf-shot` frame borders, `lf-draft` inset and corner, message-control and edit-button sizes, the primary reader's news-notice cap and the sample label word each read one token. - Dead or duplicated rules removed (an unused margin-entry rule, a duplicated `[data-lf-focus]` selector, `-webkit-` duplicates, a doubled input-type list). Computed styles of every element on the corpus, an open thread and progress messages were diffed against `main` in Chromium and Firefox; nothing differed beyond the changes above. Touch changes were measured in Chromium's touch emulation, not on a device. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
The floating panel's field draws an attached image as its picture alone with a round × on its corner (#3190). The anchored comment box, a card's reply and the other composers still drew the old tile: a cropped thumbnail in a bordered box, beside a full-height × press behind a divider. This makes the panel's look the one shared face of `.lf-composer-media` in `response.css`. Each picture keeps its own proportions (up to twice as wide as tall), is 56px tall unless the surface has less room, and has 8px corners, a ring and a `--raise-1` shadow. Its 18px × shows on hover or focus, always under a finger, and reaches to the aim floor. **Why the panel had its own copy.** The document layers `response.css`, while the chrome sheet is unlayered. So the panel's generic press face (`button:where(:not(.lf-fp-outlet *))`, its icon size and focus ring) beat the shelf's own rules whatever their specificity. Those rules now exclude `.lf-composer-media *`, as they already excluded outlet content. `floating-panel.css` keeps only where its shelf stands, plus its ground and ring. **Anchored comment box.** The shelf used to stand beside the field, so attaching an image widened the box from 380px to 454px at 1280px wide and moved the words 74px. Under a finger at 390px it took 92px from the field. The shelf now stands in the header row the box already keeps for the card it becomes, over the field's start, with 34px pictures (50px under touch). Attaching changes neither the box nor the words, and the card that Send opens stays where the box was (x=779 before and after; on main it jumped to 853). #3187 left that header row in place, as undrawn room. **Smaller changes.** The shelf image no longer also wears the theme's page-image frame, which drew a second ring and shadow under the press's own; in the panel that makes the shadow a touch lighter. Card-reply pictures are 56px at their own proportions instead of a 52px crop, so the reply row grows 6px more when an image is attached. Drawings keep their tile. **Tests.** `test_media`'s image-only composer test now checks that the box and field stay put and that the pictures sit above the field. It pastes six images, so the narrow shelf still overflows. `test_layout`'s in-bounds check now reads the pictures and their × rather than the shelf's unpainted padding. `test_render_threads` now checks the picture's corner and the round ×. Before and after were probed on triage-board in Chromium and Firefox: anchored box, hover, keyboard focus on the ×, dark, touch at 390px, card reply, and the panel field. All match, and the panel field's picture and × keep their geometry. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[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.
An image attached to the floating panel's field (the page's or an open thread's reply) hung above the panel as a box on a shared ground, each image framed again with a full-height × press and a divider beside it. Each image now hangs as its picture alone, 56px tall in its own proportions with a ring and a soft shadow, and its removal is an 18px round × on its top-right corner.
The × shows while a pointer is over the image or a key is on it, and always under a finger (
hover: none), where a 44px reach around it removes the image. The shelf still scrolls sideways once images outrun the field; its padding now holds the shadows and the ×'s reach, which the scroller would otherwise cut, and keeps one image's reach off the next.Checked in Chromium and Firefox: opening the image, removing it by click and by a tap 12px off the ×'s centre, light and dark, desktop and phone width.
tests/browser/threads/test_media.py,tests/browser/drafts/test_composer.pyand the panel's pasted-image test pass. Follows #3181.