Skip to content

feat(decks): sort modes, copy-count badge and price toggle in the deck editor - #447

Draft
dmoptimal wants to merge 2 commits into
Git-Romer:mainfrom
dmoptimal:feat/deck-builder-view
Draft

dmoptimal wants to merge 2 commits into
Git-Romer:mainfrom
dmoptimal:feat/deck-builder-view

Conversation

@dmoptimal

Copy link
Copy Markdown

User problem

When building a planned deck from a physical collection, the deck editor gallery is hard to use as a pick list:

  • Complete tiles show only a green check, so you cannot see that you need 3 Flaaffy or 4 Mareep without opening each card. When sorting through a binder by artwork, the copy count is the number you need.
  • Entries are always ordered by category then name. Grouping Basics before Stage 1 before Stage 2 (and Supporters / Items / Tools / Stadiums) is how people lay a deck out on the table, and rarity sorting helps younger collectors find the pulls.
  • Every tile shows a market price, which turns the page into a valuation view when the task at hand is building.

Change

  • sortDeckEntries(entries, mode) gains type (unchanged default), stage, rarity (rarest first), and name modes, exported as DECK_SORT_MODES. Unknown modes fall back to type.
  • Deck editor gets a small toolbar above the gallery: a sort select and a "Hide prices" / "Show prices" toggle. Both persist in localStorage under the existing pokecollector.deckEditor.* prefix.
  • CardRequirementProgress renders ×N beside the green check when the requirement is complete and N > 1. Single-copy tiles are unchanged.
  • CardListGallery tolerates a null formatPrice so the builder view can suppress prices without touching CardDisplay.
  • New decks.* keys in en.js; other bundles fall back to English.
  • Docs: docs/CARD_LISTS.md describes the controls.

Tests

  • deckProgress.test.js: stage ordering across all three categories, rarity-first ordering, name ordering, unknown-mode fallback.
  • CardSystem.test.js: ×N shown for a complete multi-copy requirement, not shown for a single copy.
  • npm run check:translations passes; vitest run src 51 files / 341 tests pass; vite build passes.
  • Note: scripts/configure-public-mode.test.mjs fails on macOS because the entrypoint uses GNU sed -i syntax. That is pre-existing and unrelated; it passes on Linux.

Screenshots

Will add once the branch is deployed on my own instance, if useful.

🤖 Generated with Claude Code

ChiggerChug and others added 2 commits October 27, 2026 20:29
…k editor

Deck editor gallery gains a sort control (card type, type and stage,
rarity, name) persisted in localStorage, a "Hide prices" toggle for a
builder-focused view, and complete planned tiles now show ×N when more
than one copy is required so physical copies are easy to count out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…opy badge

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dmoptimal
dmoptimal marked this pull request as draft October 27, 2026 21:21
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.

2 participants