fix(android): 48dp min hit targets on action buttons
Release / Build · Linux x86_64 (push) Has been cancelled
Release / Build · Android APK (push) Has been cancelled
Release / Publish GitHub Release (push) Has been cancelled

Action buttons sized to text + 8 px padding made "Undo" end up
~46 x 33 px — fine for a mouse but at the threshold of a finger.
Adds `min_width: 48 px` and `min_height: 48 px` to the button
Node so every button meets Material's 48 dp thumb-target guideline.

Applied universally; the floor is a no-op for buttons whose
content already exceeds 48 px on either axis (Menu, Modes,
New Game, Pause, Help all clear 48 px wide; height was the
binding constraint at ~33 px).

Closes P1 #2 of docs/android/PLAYABILITY_TODO.md. Engine tests
pass; clippy clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-10 20:53:40 -07:00
parent 463b7465ed
commit e107f5e218
2 changed files with 16 additions and 3 deletions
+8 -3
View File
@@ -76,9 +76,14 @@ rewrites required.
profile/stats/leaderboard/settings, help screen) survive — they
live behind navigation and a touch user reaches them less often.
Track as a P3 sweep when more screens are audited on hardware.
- [ ] **Thumb-sized hit targets.** HUD buttons sized for mouse;
Material guideline minimum is 4448 dp. Increase button paddings
on touch builds.
- [x] **Thumb-sized hit targets.** *Closed 2026-05-10.* Action
button Node carries `min_width: Val::Px(48.0), min_height:
Val::Px(48.0)` — meets Material's 48 dp baseline on touch and is
a no-op for buttons whose content already exceeds 48 px in
either axis. Applied universally rather than cfg-gated since
Material's guideline applies to all input modes. Cards, pile
markers, modal close buttons not yet audited — track as P3 if
they fall below threshold on hardware.
- [ ] **Portrait-first card spacing.** Stretch tableau piles vertically
to fill height; reduce inter-pile gaps so 7 columns fit in 360 dp.
- [ ] **Double-tap auto-move visible feedback.** `handle_double_tap`
+8
View File
@@ -764,6 +764,14 @@ fn spawn_action_button<M: Component>(
// companion commit). Vertical padding stays at VAL_SPACE_2
// so button height tracks the rest of the chrome band.
padding: UiRect::axes(VAL_SPACE_2, VAL_SPACE_2),
// 48 px floors meet Material's recommended thumb-target
// size on touch and are a no-op on desktop for buttons
// whose content already exceeds 48 px in either axis
// (Menu, Modes, New Game, etc.). Without these, "Undo"
// ends up ~46 × 33 px — comfortably tappable with a mouse
// but right at the threshold for a finger.
min_width: Val::Px(48.0),
min_height: Val::Px(48.0),
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
border_radius: BorderRadius::all(Val::Px(RADIUS_MD)),