Skip to content

fix(gift-cards): show mint name when card has no image#1079

Open
orveth wants to merge 1 commit into
masterfrom
fix/offer-image-fallback-mint-name
Open

fix(gift-cards): show mint name when card has no image#1079
orveth wants to merge 1 commit into
masterfrom
fix/offer-image-fallback-mint-name

Conversation

@orveth

@orveth orveth commented May 18, 2026

Copy link
Copy Markdown
Contributor

What

Make the mint name visible when a gift-card-purpose mint has no image configured.

  • app/features/gift-cards/offer-item.tsx — swap text-card-foregroundtext-foreground (1 line). The imageless overlay was already there but rendered white-on-white in :root.
  • app/features/gift-cards/offers-section.tsx — same swap on the inlined OfferCardButton overlay JSX (the duplicate of OfferItem's imageless branch).
  • app/features/gift-cards/gift-card-item.tsx — when !image && hideOverlayContent (the selected card on /gift-cards/<id> with no configured mint image), early-return a card with a centered name overlay and no balance. The existing stack-style overlay logic is unchanged for every other case.

Why

In the default :root:

  • --card: hsl(0 0% 100%)
  • --card-foreground: hsl(0 0% 98%)

So text-card-foreground on bg-card rendered the offer card's name invisible. --foreground: hsl(0 0% 3.9%) gives contrast in :root and remains a sensible foreground in every defined theme.

For the gift-card details page, the selected card passes hideOverlayContent=true to suppress the stack-style overlay so an image can identify the card cleanly. With no image, the overlay being suppressed meant nothing identified the card. The early-return covers that one case with a name-only overlay — no balance (the balance is shown separately below on the details page), no gradient, just the name centered on the blank card. Every other call site (the stack list, non-selected cards in details) is unaffected.

@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Jun 5, 2026 10:17pm

Request Review

@supabase

supabase Bot commented May 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 39cc6e9 to 386fcfc Compare May 19, 2026 17:17
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from e28b5b2 to 405c7be Compare May 19, 2026 17:48
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 405c7be to 1670e30 Compare May 19, 2026 17:58
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 1670e30 to 8938ae3 Compare May 19, 2026 18:08
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 8938ae3 to 9fa3e11 Compare May 19, 2026 18:17
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 9fa3e11 to 07e3fda Compare May 19, 2026 18:37
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 07e3fda to e1fff4d Compare May 19, 2026 18:40
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from e1fff4d to a565bbf Compare May 28, 2026 17:58
@orveth orveth changed the title fix: offer card falls back to mint name when image is missing fix(gift-cards): show mint name when card has no image May 28, 2026
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from a565bbf to 143b608 Compare May 28, 2026 18:10
@orveth orveth force-pushed the fix/offer-image-fallback-mint-name branch from 143b608 to 5f48e00 Compare May 28, 2026 19:49
Both OfferItem and the selected-state GiftCardItem now render the
mint name centered over a blank card when no image is available.
Previously OfferItem used text-card-foreground (invisible on the
blank card's foreground background) and the selected GiftCardItem
overlay's opacity:0 + transparent background left the card fully
blank.
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