Skip to content

feat: shuffle overlay redesign (UX-04) - #208

Merged
bri-b-dev merged 1 commit into
mainfrom
b/shuffle-v2
Oct 10, 2026
Merged

bri-b-dev merged 1 commit into
mainfrom
b/shuffle-v2

Conversation

@bri-b-dev

Copy link
Copy Markdown
Owner

Summary

  • One reel (1 s instead of 3 identical reels at ~1.8 s) with Überspringen; reduced motion shows the result immediately
  • No auto-spin, no auto-navigation: the overlay opens ready with filters visible, you press Drehen; after the stop a result card shows category, duration, difficulty (●●●○○) and the target for your current HCP ("Ziel bei HCP 24,0: ...", or a hint to enter the HCP)
  • Buttons: Starten (opens the drill with the session already running, via ui.requestStart), Nochmal (any number of times, no navigation), Details
  • Filters as chips: category, place (Putting/Kurzspiel/Bunker/Range/Platz), duration (≤10/20/30 min), pool count, empty state with reset. Favorites bias is a switch with an explanation (disabled with a hint until a favorite exists). The list's active tag filter is kept as a removable chip
  • Avoids repeats: drills of the last 5 sessions and the picks of this overlay are excluded (falls back gracefully in small pools); logic in src/shuffle/pick.ts
  • Accessibility: dialog semantics, Tab trap, Escape / ✕ / Android back close it, focus returns to the opener, result announced via live region, haptic feedback on stop, closes on route change
  • The overlay is lazy-loaded: start chunk 146 KB (below the pre-merge 152.9 KB)

Interpretation to confirm

The spec says "no auto-start". I implemented it as "no automatic spin when the overlay opens", so filters can be set before drawing; the cost is one extra tap (Drehen). If you prefer an immediate spin on open (the opener press already is the user action), that is a one-line change.

Test plan

  • npm test (239), npm run lint, npm run typecheck, npm run build (local)
  • CI
  • Manual: open via the tab bar button and from Heute; Drehen / Überspringen; 5x Nochmal; filters incl. empty pool; Starten lands in the drill with a running session; Details; Escape and focus return; Android back button; VoiceOver/TalkBack announcement; light/dark; reduced motion

🤖 Generated with Claude Code

- one reel (1 s) with "Überspringen"; no automatic spin and no automatic navigation
- result card: category, duration, difficulty, target for the current HCP; Starten (opens the drill with a
  running session), Nochmal, Details; announced to screen readers; haptic feedback on stop
- filter chips for category, place and duration; favorites switch with explanation; pool count; empty state
- avoids drills of the last 5 sessions and earlier picks (src/shuffle/pick.ts)
- dialog semantics, Tab trap, Escape/close/Android back, focus returns to the opener,
  closes on route change; reduced motion shows the result instantly
- overlay is lazy-loaded (start chunk 146 KB); tests (239)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bri-b-dev
bri-b-dev merged commit cfa12f8 into main Oct 10, 2026
1 check passed
@bri-b-dev
bri-b-dev deleted the b/shuffle-v2 branch October 10, 2026 18:53
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.

1 participant