From 463b7465ed3b61935c638d4f4bc2c2943796ff39 Mon Sep 17 00:00:00 2001 From: funman300 Date: Sun, 10 May 2026 20:52:12 -0700 Subject: [PATCH] fix(android): hide keyboard-hint chips on action buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The U / Esc / F1 / N caption chips next to the HUD action buttons are meaningless on a touch device and visibly clutter the narrow-viewport action row (visible as "Esc A [] N" in the v0.22.3 screenshot). `spawn_action_button` now rebinds `hotkey` to `None` under `#[cfg(target_os = "android")]` so the chip-spawn branch is skipped on touch builds. Menu / Modes chevrons are unaffected — they indicate dropdown behaviour and still apply on touch. Other hint surfaces (onboarding, pause modal Esc hint, mode-card chips, replay footer, modal toggle chips, help screen) live behind navigation and are tracked as a P3 sweep in PLAYABILITY_TODO.md. Closes P1 #1 of docs/android/PLAYABILITY_TODO.md. 855 engine tests pass; clippy clean. Co-Authored-By: Claude Sonnet 4.6 --- docs/android/PLAYABILITY_TODO.md | 13 ++++++++++--- solitaire_engine/src/hud_plugin.rs | 8 ++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/android/PLAYABILITY_TODO.md b/docs/android/PLAYABILITY_TODO.md index 0d26b7a..beba034 100644 --- a/docs/android/PLAYABILITY_TODO.md +++ b/docs/android/PLAYABILITY_TODO.md @@ -66,9 +66,16 @@ rewrites required. ## P1 — Touch UX -- [ ] **Suppress keyboard-hint labels on Android.** Gate the `Esc / A / - N / []` accelerator chips behind `#[cfg(not(target_os = "android"))]` - in the HUD spawn site(s). +- [x] **Suppress keyboard-hint labels on Android.** *Closed + 2026-05-10.* `spawn_action_button` now nulls the `hotkey` + argument on Android via a `#[cfg(target_os = "android")]` rebind, + so the U / Esc / F1 / N chips next to the action row labels + disappear on touch builds. Other hint sites (onboarding panel, + pause-modal `Esc` hint, mode-card hotkey chips on the home + screen, replay overlay footer, modal toggle hints in + 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 44–48 dp. Increase button paddings on touch builds. diff --git a/solitaire_engine/src/hud_plugin.rs b/solitaire_engine/src/hud_plugin.rs index cbb9916..95cb505 100644 --- a/solitaire_engine/src/hud_plugin.rs +++ b/solitaire_engine/src/hud_plugin.rs @@ -730,6 +730,14 @@ fn spawn_action_button( font: &TextFont, order: i32, ) { + // Hotkey hint chips ("U", "Esc", "F1", "N") are meaningless on a + // touch device — the button itself is the affordance — and they + // visibly clutter the narrow-viewport action row. Force the hint + // off on Android; the chevrons on Menu/Modes remain because they + // indicate dropdown behaviour and still apply on touch. + #[cfg(target_os = "android")] + let hotkey: Option<&'static str> = None; + let hotkey_font = TextFont { font: font.font.clone(), font_size: TYPE_CAPTION,