Repository navigation
feat(packs): fit the whole pack on screen, and reveal batches pack by pack - #27
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
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.What changed
Opening screen — everything on one screen
smreplaces 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.scrollIntoView({ block: "nearest", inline: "nearest" }), so it only scrolls when a card is genuinely off-screen (small landscape phones) and never fights the page.Multiple packs — same ceremony as one
Tidy-up
CHASE_TIERS/isChaseinPackCardnow 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)..btn-compactutility 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.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