Skip to content

feat(question-feed): credit each illustration cluster via ArtistSupportLink - #688

Merged
WilfordGrimley merged 1 commit into
masterfrom
question-feed-artist-credit
Aug 4, 2026
Merged

feat(question-feed): credit each illustration cluster via ArtistSupportLink#688
WilfordGrimley merged 1 commit into
masterfrom
question-feed-artist-credit

Conversation

@WilfordGrimley

Copy link
Copy Markdown

Summary

Adds an artist credit to each Level 2 illustration cluster in the "What's
That Card?" question feed, reusing the existing ArtistSupportLink MTGAC
applet rather than plain text - the same applet already used for the
artist question type's post-answer moment and the /display rail's
Artist section.

Each IllustrationGroup (candidates sharing a Scryfall illustrationId)
now renders, once, above its CandidateGrid:

  • Illustration by <Name> (plain text)
  • the ArtistSupportLink applet for that name (MTGAC page link + any
    commerce links), wrapped in a caller-side max-width container so one
    full-bleed CTA per cluster doesn't read as page-width inside a grid that
    can hold several clusters.

The artist name is drawn from the first non-blank candidate.artist
across the group's members; a cluster whose members carry no artist name
renders no credit block at all (no empty applet, no link to a blank
page).

Wording deliberately diverges from the two existing callers'
"Art by <Name> - support them" copy: this credit describes a candidate
printing's
artist, sourced from canonical Scryfall reference data,
before the voter has picked anything - not a claim about the voter's own
scanned card. "Illustration by <Name>" reads as a fact about the
artwork shown, not an assertion about the user's card.

The per-tile candidate.artist caption becomes redundant once its
cluster has its own credit, so it's dropped inside grouped clusters via a
new optional third parameter on the shared renderCandidateTile helper
(showArtistCaption, additive, defaults to true). Ungrouped candidates
are unaffected - they keep the existing plain-text caption unchanged and
do not get the applet treatment, since a flat grid can hold many
candidates by many different artists and a per-tile applet there would be
disproportionately heavy.

No wire-contract change: PrintingCandidate.artist already existed.
useGetArtistExternalLinksQuery is RTK Query and dedupes by its string
argument automatically, so multiple clusters sharing one artist collapse
to a single request with no code change needed.

Refs #385 for context (the MTGAC data-endpoint integration this reuses);
does not close it.

Test plan

  • npx tsc --noEmit clean
  • npx eslint on QuestionFeed.tsx (0 errors, 5 pre-existing
    no-img-element warnings on untouched lines, unrelated to this
    change)
  • Jest: QuestionFeed.test.tsx (18 passed) and
    ArtistSupportLink.test.tsx (13 passed), run individually and
    combined (31 passed) - no order-dependence found (issue Test suite is order-dependent: leaked fetch-failure window trips the envelope across files (8 failures on master) #679)
  • Playwright: QuestionFeed.spec.ts + QuestionFeedResponsive.spec.ts
    run against a live dev server with mocked network (42 passed),
    including the 44px tap-target guards (WCAG 2.5.5) and the
    illustration-grouping suite
  • pre-commit run --files <touched files> (prettier + eslint) clean
  • lsp_diagnostics - not available in this worktree
    (typescript-language-server not installed); tsc --noEmit +
    eslint + the test runs substitute, per this task's own guidance
  • Full-suite context: a previous session's note that npm test
    carries 22 pre-existing failures in
    src/features/searchSettings/comparison.test.ts
    (Set.prototype.symmetricDifference unavailable on Node v20.20.2)
    was not re-investigated - confirmed unrelated to this change, not
    touched by it

Task-end checks (CLAUDE.md)

  • Docs convention: docs/features/artist-support-links.md's
    "Surfaces" section updated in place (three → four), no dated section
    appended.
  • Policy text dates: N/A, no on-site policy text touched.
  • Wiki maintenance: this changes what a user sees (question feed now
    credits each illustration cluster's artist). Wiki: the "What's That
    Card?" user-guide page could note that illustration clusters now show
    an MTGAC artist credit - flagging for the merge-time checklist rather
    than editing directly from this worktree.
  • Extractable-primitives ledger: no extraction here - this modifies
    QuestionFeed.tsx directly and reuses ArtistSupportLink unmodified,
    no new independent primitive produced.
  • Constant renames: none.

…rtLink

Each Level 2 illustration cluster (candidates sharing a Scryfall
illustrationId) now shows an artist credit sourced from the group's own
candidate.artist, reusing the existing ArtistSupportLink applet (MTGAC
page link + commerce links) rather than plain text - the same applet
already used for the confirmed-artist post-answer moment and the
/display rail.

Gating and wording deliberately diverge from those two existing
callers: this credit describes a candidate printing's artist from
canonical Scryfall reference data, not a vote the user has cast, so it
reads "Illustration by <Name>" rather than "Art by <Name> - support
them" to avoid implying an assertion about the user's own scanned
card. A cluster whose members carry no artist name renders no credit
at all.

Compactness (one applet per cluster, potentially several per grid) is
achieved via a caller-side max-width wrapper rather than forking or
restyling the shared component, per its own "stretch to fill" design
rule. The per-tile artist caption becomes redundant once a cluster has
its own credit, so it's dropped inside grouped clusters via a new
optional renderCandidateTile parameter (additive, doesn't touch the
shared data-card-* attributes or testids) while staying on ungrouped
tiles, which have no cluster-level credit.

Ungrouped candidates keep their existing plain-text artist caption
unchanged: a flat grid can hold many candidates by many different
artists, so a per-tile applet there would be disproportionately heavy
next to a still-unconfirmed flat list.

useGetArtistExternalLinksQuery already dedupes by its string arg (RTK
Query's default cache-key behaviour), so multiple clusters sharing one
artist collapse to a single request with no code change needed.

Refs #385 for context (data-endpoint integration); does not close it.
@WilfordGrimley
WilfordGrimley merged commit 19f7199 into master Aug 4, 2026
18 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