Skip to content

Keep an option's figure at its own size: options holding pictures read down - #4517

Merged
max-sixty merged 3 commits into
mainfrom
option-captures-stack
Oct 27, 2026
Merged

max-sixty merged 3 commits into
mainfrom
option-captures-stack

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

An lf-ask whose 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-visual widget. 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. The packages/default/styles/ask.css header records the reversal.

  • A control the runtime draws inside an option, such as a nested group's Send, is not counted as a figure (:not(.lf-ui *)). Without that exclusion, an option holding a nested group stopped figure-framed cards from laying across.
  • test_options_holding_pictures_lay_across becomes test_options_holding_pictures_read_down. It covers a drawing, a capture and an x-visual widget, in the column and in a widened group.
  • The feature gallery's pictured section now describes the cards reading down.

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.

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

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.
@max-sixty
max-sixty merged commit 22884f8 into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the option-captures-stack branch October 27, 2026 22:25
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_
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