From 77a9ef27a955347cb0a317fba2a1a8ec72345c35 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 1 Aug 2026 10:28:51 +0000 Subject: [PATCH] Make Spotlight's wishlist heart hover-only, matching the shop grid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was always visible in ProductSpotlight.tsx, unlike ProductGrid.tsx's cards — inconsistent for what's still a single card in a hoverable context. The `group` ancestor needed for revealOnHover already exists there (used for the image's hover-zoom effect), so this is just the prop. --- app/components/ProductSpotlight.tsx | 2 +- app/components/WishlistButton.tsx | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/components/ProductSpotlight.tsx b/app/components/ProductSpotlight.tsx index bd2b848..9242b3b 100644 --- a/app/components/ProductSpotlight.tsx +++ b/app/components/ProductSpotlight.tsx @@ -74,7 +74,7 @@ export async function ProductSpotlight() { ) )} {wishlistEnabled && product.spotlightShowWishlist && ( - + )} diff --git a/app/components/WishlistButton.tsx b/app/components/WishlistButton.tsx index 8ad4ea3..a2c146d 100644 --- a/app/components/WishlistButton.tsx +++ b/app/components/WishlistButton.tsx @@ -19,14 +19,15 @@ export function WishlistButton({ productId: number; variant?: string; className?: string; - /** false (default): always visible — right for single-product contexts - * (ProductSpotlight, /konto/merkliste, the product detail page) where - * there's no "wall of hearts" to thin out. true: invisible until the - * card is hovered/focused, unless the product is already wishlisted (a - * filled heart stays as a permanent status indicator) — right for a - * multi-card grid (ProductGrid.tsx), where a heart on every single card - * reads as visual noise. Relies on the parent card already carrying - * `group`/`focus-within` (see ProductGrid.tsx). + /** false (default): always visible — right for /konto/merkliste (every + * card there is already-wishlisted, so hover-reveal would be pointless) + * and the product detail page. true: invisible until the card is + * hovered/focused, unless the product is already wishlisted (a filled + * heart stays as a permanent status indicator) — right for any grid or + * card-like feature (ProductGrid.tsx, ProductSpotlight.tsx) where a + * heart sitting there unprompted reads as visual noise. Relies on the + * parent card already carrying `group`/`focus-within` (see + * ProductGrid.tsx/ProductSpotlight.tsx). * * On coarse-pointer (touch) devices, hover-reveal can't work at all — * touch has no persistent `:hover`, so a tap on the card never reliably