Repository navigation
Keep an option's figure at its own size: options holding pictures read down - #4517
Merged
Merged
Conversation
An lf-ask whose options held a picture laid its cards across, each at least 14rem wide. A capture is drawn at one scale, so a card's share of the row shrank it, words and all: on a recent decision page a panel captured 580px wide stood 248px wide in one of two cards, and the user found these too small to read on several pages. Across nine recent pages with captures in options, four showed them at a third to a half of their size. Options holding an image or a video now keep reading down, each capture at the width the lf-ask gives it. Charts and drawings still lay their cards across: a chart redraws at its width, and a drawing's author fits it to the width it is shown at. This narrows the arrangement #2634 chose, and ask.css's header records the change. A new browser test holds two captures at their 600px size, one card above the other; it fails on the base, where the cards stand side by side.
Widen the previous commit from captures to every figure an option holds: a drawing, a table, a video, or a widget that draws a picture. Laid across, drawings shrank too: on a recent page three drawings authored 300px wide stood 207px wide. So an lf-ask now lays its cards across only for options of words under a figure before the list; options holding a figure of their own read down, each figure at its authored size. This reverses #2634's choice to lay pictured cards across so their pictures compared in one row. ask.css's header records the reversal, the feature gallery's pictured section describes the cards reading down, and `test_options_holding_pictures_lay_across` becomes `test_options_holding_pictures_read_down`, covering a drawing, a capture and an `x-visual` widget in the column and in a widened group. A runtime control inside an option, such as a nested group's Send, is not a figure (`.lf-ui`); without that, an option holding a nested group stopped the figure-framed cards from laying across.
leaf-agent
approved these changes
Oct 27, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 30, 2026
…art (#4777) Options that each hold pictures were hard to tell apart: in the joined control, a 1px hairline was the only boundary between one option's capture and the next option's title. Reviewers in three head-to-head rounds read such groups more easily as separate cards, and the user chose that, plus leaving side by side to the author. **Pictured groups stand apart.** A live `choose` group whose options hold an image, figure, SVG, table, video or a `data-lf-visual` widget anywhere inside them draws each option as its own bordered card, 16px apart. Groups of words stay one joined control with hairlines. Hover, keyboard and picked faces are shared by both, so only the frame differs; two variables, `--lf-cell-gap` and `--lf-cell-edge`, carry that difference (`options.css`). **The author lays cards across.** `ask.css` no longer decides from an lf-ask's content whether its options lie across, and `--lf-options-across` is gone. Leaf had re-decided that rule four times in 23 days (#1724, #2634, #3609, #4517), each version suiting the pages that prompted it and failing the next. The new boolean `across` on `lf-options` gives the same arrangement: one row where each card gets at least 14rem, all stacked otherwise, and always stacked at seven or more. The row's width now counts the gaps between cards. The `lf-option` registry entry and `authoring-on-me.md` ("On the page") say when to use it: when each option's pictures, or the evidence above the list, still read at a card's share of the row and the question then fits the window. Pages that relied on the automatic layout now stack until they say `across`. In this tree that was `alert-review.html` (three groups), the feature gallery's question around a chart and the `thread-choice-hints` fixture, which now say it. Testing: two tests in `tests/browser/widgets/test_obligations.py` changed to assert the new behavior (`test_options_holding_pictures_stand_apart`, `test_options_marked_across_lay_across`), and the focused option tests pass. Stills in light, dark and phone show text-only groups measuring as on main. The `decision-options-fit-the-window` eval, three routes whose options hold captures, fit every option in one desktop window in 3/3 candidate runs, each of which wrote `across`, against 2/3 on main. > _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.
An
lf-askwhose options held a picture of their outcome laid its cards side by side, each at least 14rem wide, so every figure shrank to its card's share of the row, words and all. On a recent decision page, a panel captured 580px wide stood 248px wide in one of two cards. On another, three drawings authored 300px wide stood 207px wide. Across nine recent pages with captures in options, four showed them at a third to a half of their size, and the user found them too small to read.Options holding a figure of their own now read down, each figure at the size its author gave it. A figure here is an image, drawing, table, video or
x-visualwidget. Cards laid across remain only for options of words under a figure before the list, where the question, its figure and every option still share a window. This reverses #2634's choice to lay pictured cards across so their pictures compared in one row. Thepackages/default/styles/ask.cssheader records the reversal.:not(.lf-ui *)). Without that exclusion, an option holding a nested group stopped figure-framed cards from laying across.test_options_holding_pictures_lay_acrossbecomestest_options_holding_pictures_read_down. It covers a drawing, a capture and anx-visualwidget, in the column and in a widened group.The selectors were checked in Chromium and Firefox: figure-framed text options still share one row, and pictured options stack at full size. An Astra (Codex) review found nothing.