Skip to content

Add play cards for each unique game lineup - #49

Draft
mattbat wants to merge 3 commits into
mainfrom
play-cards
Draft

mattbat wants to merge 3 commits into
mainfrom
play-cards

Conversation

@mattbat

@mattbat mattbat commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Summary

Adds fullscreen interactive Play Cards (Offense, Defense, and Inbounding Stack) for every unique 5-player lineup in a game, accessible from both the Plan and Game Day screens.

Highlights

  • Per-lineup persistence: Keyed by the sorted 5 player IDs (lineupKey) and saved in the optional playCards field on Game (no Dexie schema bump; included in backups and Coach ↔ Assistant handoffs).
  • Fullscreen swipeable deck: Basket-at-top half court with draggable player tokens showing name, jersey/position, and inbounder badge. Swipe left/right between Offense → Defense → Inbounding Stack; swiping past the last card (or tapping Done) returns to the lineup screen.
  • Formations & whiteboard Reset:
    • Offense: Auto-selects 1-2-2 (1 guard at top of key, 2 forwards on wings, 2 centers on low blocks) or 2-2-1 (2 guards up top, 2 forwards on wings, 1 center on low block), with a switcher.
    • Defense: 2-3 Zone (default), 3-2 Zone, and Box & 1.
    • Inbounding Stack: Defaults to a Center on the baseline and 4 players single-file starting at the 3rd lane hash mark, with Left/Right lane mirroring, toggleable directional movement Arrows (1 away from basket, 2 toward basket, 3 forward toward inbounder, 4 pop back), ▶ Play all, and Step 1→4 animations.
    • Every card includes an always-available ↺ Reset button to snap players back to standard spacing after dragging freely.
  • Zero vertical height added on Game Day: Play cards sits inline with the On court heading so Game Day still fits one screen across all 5 tested iPhone viewport sizes.

Testing

  • Ran npm run check locally: lint, type-check, unit + property tests (with coverage), production build, and all 18 Playwright E2E tests (including e2e/playcards.spec.ts and e2e/gameday-fit.spec.ts) passed.
  • Opened as a draft PR for Cloudflare beta preview testing before merge.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Deploying next5 with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd92b2e
Status: ✅  Deploy successful!
Preview URL: https://01e91836.next5-4gi.pages.dev
Branch Preview URL: https://play-cards.next5-4gi.pages.dev

View logs

This branch has not been deployed

No deployments
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