Skip to content

feat(packs): fit the whole pack on screen, and reveal batches pack by pack - #27

Merged
DLinacre merged 1 commit into
mainfrom
arena/8b2a0b28-pokeguru
Nov 14, 2026
Merged

DLinacre merged 1 commit into
mainfrom
arena/8b2a0b28-pokeguru

Conversation

@DLinacre

Copy link
Copy Markdown
Owner

The problem

  • You could never see the whole pack. The reveal was a horizontal filmstrip: 10 cards × 118px inside overflow-x-auto. On a 390px phone that is ~1180px of content, so most of the pack was off-screen, you had to swipe sideways to find each card, and there was no auto-scroll to follow along.
  • Batches skipped the fun. Opening 5, 10 or a full box generated the packs and jumped straight to a table-like summary. Only a single pack got the flip, glow, sounds and climax.

What changed

Opening screen — everything on one screen

  • One fixed 4-column grid on phones / 5-column from sm replaces the filmstrip. A 10-card pack is ~600px tall including controls, so it fits a 624px phone content area with no horizontal scrolling; the whole pack is visible at once.
  • Every card keeps a caption (name once flipped, "Tap to reveal" on the next one), and the card waiting to be flipped gets an accent ring.
  • Auto-scroll to the card you are on via scrollIntoView({ block: "nearest", inline: "nearest" }), so it only scrolls when a card is genuinely off-screen (small landscape phones) and never fights the page.
  • One primary action drives the flow — Reveal next → Reveal final card → Open pack N of M → See summary — with → as the keyboard shortcut and a progress bar for the pack.

Multiple packs — same ceremony as one

  • After the tear, pack 1 is revealed exactly like a single pack; "Open pack 2 of 5" tears the next wrapper (with the tear animation and sound) and reveals it. Per-pack reveal state is kept, so moving between packs never loses flipped cards.
  • Progress dots plus "Pack N of M", a spotlight banner for the chase card you just flipped, and Reveal pack / Skip to summary shortcuts (36 packs stays fast).
  • With reduced motion, packs show face up immediately and a finished pack stays put until you ask for the summary, rather than flashing away.
  • Summary: each pack now gets a row with its best three pulls visible and the full pack expanding into the same grid as the reveal, so batches read like the single-pack summary instead of a bare table.

Tidy-up

  • One exported CHASE_TIERS/isChase in PackCard now drives the card's gold treatment, the reveal cue and the summary badge — previously three separate lists that disagreed (the card glowed for tiers the reveal treated as ordinary).
  • Added a .btn-compact utility so the reveal control bar stays short enough to keep the pack on screen.

Verification

  • npm run lint, npm run typecheck, npm test → 24 files / 201 tests passing.
  • New tests pin the behaviour: the reveal list is a grid (not flex/overflow-x-auto/snap-x), all cards are rendered at once, a batch steps pack 1 → 5 with the same reveal before reaching the summary, skip-to-summary still works, and one-at-a-time revealing keeps exactly one tappable face-down card.

Notes

  • The dev server is running on port 5173 if you want to click through it. I could not screenshot it — there is no headless browser in this sandbox — so the layout figures above are measured from the built CSS (4 cols → ~79 × 109px cards, ~600px stage), not from a rendered capture.

…pack

Opening screen
- Replace the horizontally scrolling filmstrip (10 x 118px, so half the pack
  was always off-screen) with one fixed 4/5-column grid. A whole 9-11 card
  pack now fits on a phone screen (roughly 600px tall incl. controls) with no
  sideways scrolling, and every card keeps a name caption.
- Still auto-scrolls to the card you are on, using scrollIntoView with
  block: 'nearest', so it only moves when a card really is off-screen.
- One primary action drives the whole flow: reveal the next card, then open
  the next pack, then show the summary. Arrow-right does the same on desktop.
- Added a reveal progress bar, a 'Reveal pack' shortcut, a chase-card
  spotlight banner, and a highlight ring on the card waiting to be flipped.

Multiple packs
- A batch now reveals pack by pack with the same flip, rarity glow, sounds and
  spotlight as a single pack, instead of jumping straight to the summary.
- Pack progress dots plus 'Open pack N of M'; per-pack reveal state is kept so
  stepping back and forth never loses cards you already flipped.
- 'Skip to summary' keeps the fast path for people opening 36 packs.
- Summary: every pack is a card row with its best three pulls visible and the
  full pack expanding in the same grid as the reveal, so a batch reads like the
  single-pack summary.

Shared/other
- One exported CHASE_TIERS/isChase (PackCard) used by the card treatment, the
  reveal cues and the summary, replacing three copies that disagreed.
- New .btn-compact utility so the reveal control bar stays short.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@DLinacre
DLinacre merged commit eaf164d into main Nov 14, 2026
2 checks passed
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