Skip to content

Add card DOM data attributes to printing-tag candidate buttons - #6

Merged
WilfordGrimley merged 1 commit into
masterfrom
worktree-printing-candidate-dom-attrs
Jul 12, 2026
Merged

Add card DOM data attributes to printing-tag candidate buttons#6
WilfordGrimley merged 1 commit into
masterfrom
worktree-printing-candidate-dom-attrs

Conversation

@WilfordGrimley

Copy link
Copy Markdown

Summary

  • Candidate printing buttons in the "Who's That Planeswalker?" queue (PrintingTagQueue.tsx) and picker (PrintingTagPicker.tsx) carried none of the documented card DOM API attributes (frontend/docs/dom-api.md), making them invisible to tooling built against that contract.
  • Adds getPrintingCandidateDataAttributes in frontend/src/common/cardDom.ts (a PrintingCandidate-shaped sibling to getCardDataAttributes), spread onto the candidate <CandidateButton>/<Button> in both call sites, sourced from the card currently being tagged plus the PrintingCandidate for each button.
  • PrintingTagPicker gained a cardName prop since it previously only had cardIdentifier; CardDetailedViewModal.tsx now passes cardDocument.name through.
  • Documents the new attributes in dom-api.md, calling out explicitly that this is a different kind of hit than a normal card slot — data-card-name names the card being tagged, not necessarily what the candidate depicts.

Test plan

  • npx tsc --noEmit clean
  • npx eslint on changed files — 0 errors (pre-existing <img>-vs-next/image warnings only)
  • npx prettier@2.7.1 --check clean
  • npx playwright test tests/PrintingTagQueue.spec.ts tests/PrintingTagPicker.spec.ts --project=chromium — 7/7 passed (new assertions cover both files), including new tests asserting data-card-name/data-card-identifier/data-card-set-code/data-card-collector-number land on candidate buttons with correct values

🤖 Generated with Claude Code

Candidate printing buttons in the "Who's That Planeswalker?" queue and
picker carried none of the documented card DOM API attributes, making
them invisible to tooling built against that contract. Adds
getPrintingCandidateDataAttributes (a PrintingCandidate-shaped sibling
to getCardDataAttributes) and spreads it onto both call sites.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@WilfordGrimley
WilfordGrimley merged commit e2811ed into master Jul 12, 2026
6 checks passed
@WilfordGrimley

Copy link
Copy Markdown
Author

Landed directly on master (e2811ed) per this repo's standing direct-push workflow.

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