Skip to content

Let the author lay option cards across, and stand pictured options apart - #4777

Merged
max-sixty merged 3 commits into
mainfrom
option-card-separation
Oct 30, 2026
Merged

max-sixty merged 3 commits into
mainfrom
option-card-separation

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

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

…ons apart

Two changes to `lf-options` that the user chose on 29 October after a design
review.

The author decides whether a group's cards stand side by side. A new boolean
`across` on `lf-options` sets the titled cards in one row where each gets at
least 14rem, and stacks them where the row can't hold them all, as the old
arrangement did. The content test in `ask.css` is gone: an `lf-ask` with a
figure before its options no longer lays them across on its own, and a group
with no `across` reads down whatever it holds. That rule was re-decided four
times in 23 days (#1724, #2634, #3609, #4517), because whether pictures still
read at a card's share of the row depends on the pictures, which only the
author sees. The `--lf-options-across` property the holder set is gone with it;
the attribute is read where the arrangement is drawn. The goal for choosing it
is in the `lf-options` instructions and in `authoring-on-me.md`, "On the page".
`alert-review`, the feature gallery's figure-framed question and the
`thread-choice-hints` fixture, whose cards the content rule had laid across,
now say `across`.

A live choice whose options hold a picture (an image, drawing, table, video or
`x-visual` widget anywhere in an option, not counting runtime controls) draws
its options as standalone cards 16px (`--sp-3`) apart, instead of joining them
into one framed control with 1px hairlines. Joined, the hairline was the only
boundary between one option's picture and the next option's title. Joined or
apart decides only the frame: the group's frame and hairlines, or each card's
border, radius and gap. Every live cell keeps the same state faces either way,
so a pick still fills the card with the ok tint and rings it in green, and the
pointer or keyboard deepens its ground; `options.css` states each face once over
every live cell. The add field takes a card's frame, and a bare row, which
draws no frame standing alone, takes one too; Done keeps its press's own frame.
Groups of words are unchanged. The joined frame applies to groups without
pictures and the apart frame is stated on its own, so neither undoes the other,
and the add cell's pre-upgrade reserve includes the cards' border, so the page
holds still on upgrade. The settled group's hover wash now names `settled`,
the only case it was true of.

Tests:
- `test_an_obligation_framing_a_figure_lays_its_options_across` becomes
  `test_options_marked_across_lay_across`, and adds the same figure-framed
  obligation without `across`, whose cards now read down.
- `test_options_holding_pictures_read_down` becomes
  `test_options_holding_pictures_stand_apart`: each pictured group, bare rows
  included, draws no frame of its own, frames every option and its add field,
  and sets them `--sp-3` apart, across or down, while a titled group of words
  keeps its frame and hairlines; a picked pictured card wears the same fill
  and ring as a picked word cell.
- The other `across` tests mark their groups `across`.
# Conflicts:
#	packages/default/styles/options.css
@max-sixty
max-sixty merged commit 4049267 into main Oct 30, 2026
4 checks passed
@max-sixty
max-sixty deleted the option-card-separation branch October 30, 2026 19:41
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