Skip to content

Keep a comment box's label whole and set every empty box's words in one quiet ink - #5842

Merged
max-sixty merged 5 commits into
mainfrom
comment-box-hints
Nov 14, 2026
Merged

max-sixty merged 5 commits into
mainfrom
comment-box-hints

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

A focused comment box says Comment… ⏎ · New line ⇧⏎. Since #4738 the label was the part that gave way: it shrank toward a 4em floor to keep both keys, so the margin comment box at roughly 270–290px read Comm… beside a full set of keys, while the same box at 240px showed Comment… whole. Now the label keeps its full width when the flex line breaks, so the new-line hint drops whole first, then the send key, and the label shortens only where it can't stand alone.

The hint was also too prominent. Every empty box's words and keys now wear the floating panel's dimmer ink (ink at 62%), which moves from the panel's stylesheet into the theme as --quiet. Leaf-text boxes, .lf-ui and Web Awesome inputs, and the file editor read it in place of --muted, and the panel's own override goes, so Leaf has one placeholder ink where it had two and adds no token. It reads 4.8:1 on paper against --muted's 5.8:1, the dimmest WCAG AA allows; the lowest measured on any surface a box sits on is 4.72:1, on the panel's ground.

Worth weighing: boxes with a single key (Add another option… ⏎) keep the old order, shortening the label to keep the key. Extending the new order to them dropped the key even where the label is cut regardless, as in a 250px option list.

Asked for by max-sixty, who chose one size for the whole hint and the panel's ink on the review page. The rewritten test_a_narrow_box_keeps_its_label_whole_and_drops_its_new_line_key fails on the old CSS and passes here; the focused placeholder, panel and anchor tests pass.

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

…ller

A focused box that holds lines says `Comment… ⏎ · New line ⇧⏎`. Since #4738
the label gave way first: it shrank toward a 4em floor so both keys could
stay, and the new-line hint left only once even that floor didn't fit. Boxes
in a band about 20px wide (the margin comment box at roughly 270–290px)
showed `Comm…` beside a full set of keys, a label too short to name the box.

Now the label keeps its whole width when the flex line breaks, so the
new-line hint drops whole as soon as keeping it would cut the label, and the
send key drops after it; the label shortens only where it can't stand alone.
Boxes with a single key keep their rule, shortening the label to keep the
key: applying the new order there too dropped the key even where the label
is cut regardless, as in a narrow option list.

`New line` is set at its key badges' size (`--t-6`), a step below the
label's, so the hint reads as secondary to the box's name. No ink or token is
added; `--muted` is already the theme's quietest text ink outside the
floating panel.

Behavior a test protects, changed:
`test_a_narrow_box_shortens_its_label_before_its_keys` becomes
`test_a_narrow_box_keeps_its_label_whole_and_drops_its_new_line_key`, at a
430px window where a seat's box has room for its label and send key but not
the hint. It fails on the old rule, which cut the label.
leaf-agent
leaf-agent previously approved these changes Nov 11, 2026
…s a font

test_every_rule_of_the_interface_names_a_declared_font refused the bare
font-size; --font-small is the theme's font for words that qualify a line,
at the same size, with the voice's italic kept.
leaf-agent
leaf-agent previously approved these changes Nov 11, 2026
The user wanted Comment… and New line at one size, both quieter, through a
style Leaf already has. New line goes back to the label's size. The floating
panel's ink at 62% moves into the theme as --quiet, and every placeholder
reads it in place of --muted: leaf-text boxes and their keys, .lf-ui and Web
Awesome inputs, and the file editor. The panel's own placeholder override and
its --lf-fp-quiet go, so Leaf has one placeholder ink where it had two. Ink at
62% reads 4.8:1 on paper against --muted's 5.8:1, as dim as WCAG AA allows.
@max-sixty max-sixty changed the title Keep a comment box's label whole and set its new-line hint a step smaller Keep a comment box's label whole and set every empty box's words in one quiet ink Nov 12, 2026
leaf-agent
leaf-agent previously approved these changes Nov 12, 2026
# Conflicts:
#	browser/styles/components/controls.css
@max-sixty
max-sixty merged commit a3d6263 into main Nov 14, 2026
5 checks passed
@max-sixty
max-sixty deleted the comment-box-hints branch November 14, 2026 18:26
max-sixty added a commit that referenced this pull request Nov 18, 2026
Conflicts resolved:
- base.css: the held-keys notice's rule stays removed; main had only renamed its tokens.
- floating-panel.js: keeps main's draft count in the On Me mark's name and its
  `lead` in the field's parts beside the held keys; `offeredPress` is gone on main.
- floating-panel.css: the panel's placeholder ink moved into the theme as
  `--lf-quiet` (#5842), so the stand-in's held words read that token; the
  stand-in's lift reads `--lf-raise-2`.
- test_render_startup.py: main's `selected` attribute with the branch's
  `.lf-held-key` badge.

The decision prose drops its dates, which main's headers no longer carry.
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