Skip to content

Show margin labels on a phone only while held or reached by keyboard - #3451

Merged
max-sixty merged 1 commit into
mainfrom
agent-a63a7c2203561cdfb
Oct 21, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a63a7c2203561cdfb

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

On a phone, a tap on a margin entry no longer leaves its label up over the margin. Press-and-hold (#3341) is the way to read a label there, and the label goes when the finger lifts. With a mouse, and from the keyboard on any device, labels show as before.

This is Max's decision #30 on the overnight report (option A, "Show hover labels only with a real pointer").

A phone browser leaves the entry a finger last pressed both hovered and focused until the next tap elsewhere. The label reveal answered to both: :hover, and [data-lf-focus], which marks any focus, a tap's included. Gating only the hover part on (hover: hover) still left the label up after a tap in Chromium under touch, because the tap had also focused the entry. So on a device without real hover ((hover: none)), focus reveals the label only where the keyboard placed it (:focus-visible). Tab and the Left/Right route between a target's entries both match it.

  • theme.css: the hover reveal sits under @media (hover: hover), and under (hover: none) a focus that isn't :focus-visible hides the label unless a press holds it. The held and focused reveals share one rule.
  • margin-layout.js: the label's placement reads the same rule, from hoveringPointer in pointer.js, so it doesn't place or count a label the theme hides.
  • test_a_finger_holding_a_margin_entry_reads_its_label_above_it now asserts that a tap leaves the label hidden and that the label hides when the hold ends. Against the base runtime, the tap assertion fails.

Checked with leaf-dev probe on a page with a status entry and an action entry, base against this branch:

Arm Base This branch
Touch, Chromium and Firefox: tap each entry label shown label hidden
Touch, both: Tab, then Left/Right shown shown
Mouse, Chromium and Firefox: hover, click, pointer leaves, click elsewhere, Tab shown, shown, shown, hidden, shown same

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

A phone browser leaves the entry a finger last pressed hovered and focused
until the next tap elsewhere, and the label reveal answered to both. Hover now
reveals a label only under (hover: hover), and under (hover: none) focus
reveals it only where the keyboard placed it (:focus-visible). Press-and-hold
reads a label on a phone; mouse and keyboard behavior is unchanged.

The touch label test now asserts a tap leaves no label and the label hides
when the hold ends.

Max's decision #30 on the overnight report.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit b030032 into main Oct 21, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a63a7c2203561cdfb branch October 21, 2026 07:24
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