Skip to content

Raise MeatSpace log-row icon buttons to the 44px tap-target floor - #5901

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-5703
Sep 2, 2026
Merged

Raise MeatSpace log-row icon buttons to the 44px tap-target floor#5901
atomantic merged 2 commits into
mainfrom
claim/issue-5703

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Raises every icon-only <button> in client/src/components/meatspace/ that was styled p-0.5/p-1/p-1.5 from a 22-26px hit area to the 44px floor the rest of the app enforces, by adding min-h-[44px] min-w-[44px] inline-flex items-center justify-center. Icon sizes are unchanged — growing the glyph would change the log tables' density; growing the invisible box does not.
  • Widens the action rows that hold two of those targets from gap-1 to gap-2 so adjacent Save/Cancel no longer butt up against each other (nicotine + alcohol edit rows, the eye-exam row, the memory speed-run row).
  • Applies the same fix to the seven single controls the audit named outside MeatSpace: settings/LocalLlmTab.jsx, wiki/tabs/GraphTab.jsx, wiki/tabs/LogTab.jsx, sharing/ConflictsTab.jsx, media/PromptFromMedia.jsx, pages/Loops.jsx, pages/Review.jsx.
  • Also fixes Review's inline Save, which sits directly beside the named Cancel. The issue's acceptance grep missed it because <button[^>]* stops at the > inside an arrow function — the same blind spot hid four more controls in NicotineTab.jsx, which are fixed here too. Re-running the grep without that prefix is what produced the final offender list.
  • New regression guard in client/src/a11yConventions.test.js, which already owned the 44px close-button scan. isIconOnlyButton is split out of isUnnamedIconOnlyButton so the naming rule and the touch-target rule read one definition of the shape (an aria-label makes a 22px button announceable, not tappable).

Deliberately out of scope

The LocalLlmTab.jsx edit is the two tap-target attributes on one line, so it stays trivially rebaseable under the pending component split (#5720). The guard is scoped to components/meatspace/ and to the tight-padding shape — icon buttons that reach 44px through generous padding, or that carry no padding class at all, are a different question and a handful survive in desktop-first views; widening the rule here would turn one regression guard into a tree-wide sweep.

Test plan

  • cd client && npx vitest run src/a11yConventions.test.js — 50 passed, including the new rule. It probes itself against a synthetic offender before scanning, and asserts the file filter actually selected the tree, so a green run means "none left" rather than "matcher went blind" or "scanned zero files".
  • cd client && npx vitest run src/components/meatspace src/components/settings/LocalLlmTab src/components/wiki/tabs src/components/sharing/ConflictsTab src/components/media/PromptFromMedia src/pages/Loops src/pages/Review — 551 passed. PostDrillConfig.test.jsx hit five 5s hook timeouts in the batch run; it passes 41/41 in isolation and the file is untouched by this change (this worktree lives under data/, which the suite walks).
  • cd client && npm run lint — clean.
  • Issue acceptance grep returns nothing; the broadened grep (no <button[^>]* prefix) leaves only two <div> padding wrappers in calendar/LifeGrid.jsx, which are not controls.

Closes #5703

…floor (#5703)

The health-logging tabs are the app's most phone-centric surface — a drink
or a nicotine entry gets logged one-handed — yet their inline row controls
shipped as a bare `p-1`/`p-1.5` around a 12-14px icon: a 22-26px hit area,
half the floor the other 163 files in client/src enforce. Save and Cancel
sit adjacent in the edit rows, so a mis-tap commits or discards the wrong
edit.

Every icon-only button in `components/meatspace/` with that padding now
carries `min-h-[44px] min-w-[44px] inline-flex items-center justify-center`,
and the action rows that hold two of them widen from `gap-1` to `gap-2` so
the targets don't butt up against each other. Icon sizes are untouched:
growing the glyph would change the log tables' density, growing the
invisible box does not.

Also fixes the same shape in the seven single controls the audit named
outside MeatSpace (LocalLlmTab, wiki GraphTab/LogTab, sharing ConflictsTab,
media PromptFromMedia, Loops, Review) plus Review's inline Save, which sits
next to the named Cancel and would otherwise have been left mismatched.

Guarded by a new rule in `a11yConventions.test.js`, which already owned the
44px close-button scan and the icon-only-button matcher: `isIconOnlyButton`
is split out of `isUnnamedIconOnlyButton` so both rules read one definition
of the shape. The new rule is scoped to `components/meatspace/` and to the
`p-0.5`/`p-1`/`p-1.5` padding shape, and probes itself against a synthetic
offender first so a green run means "none left", not "matcher went blind".
…#5703)

Review pass flagged the `startsWith('src/components/meatspace/')` filter as a
silent-zero-files hazard: if trackedJsxFiles() ever changes its path shape the
rule would pass over nothing. Count the selection before scanning it.
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.

Inline edit controls in the health-logging tabs are 22px tap targets, half the 44px floor the rest of the app enforces

1 participant