From 356d22da4c852acabd65585d667f881311219c03 Mon Sep 17 00:00:00 2001 From: Richie Date: Thu, 16 Apr 2026 21:36:22 +1000 Subject: [PATCH] Refine ComparisonColumnCard recommended state and CTA alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace recommended banner with floating badge (star + primary fill) so CTA buttons align across recommended and non-recommended columns. - Inline verified icon on recommended cards only (left of provider name, brand-600). Non-recommended verified providers keep the top badge alone. - Override recommended card border to brand-600 for consistency with the rest of the primary system (token default is brand-500). - Show dash in rating slot when provider has no rating — keeps heights consistent across the row. - Invisible Remove placeholder on recommended card so primary CTAs align with cards that have a visible Remove link. - Remove link dropped from body2 to caption (12px). Co-Authored-By: Claude Opus 4.6 (1M context) --- .../ComparisonColumnCard.tsx | 126 +++++++++++------- 1 file changed, 77 insertions(+), 49 deletions(-) diff --git a/src/components/molecules/ComparisonColumnCard/ComparisonColumnCard.tsx b/src/components/molecules/ComparisonColumnCard/ComparisonColumnCard.tsx index cd084dd..22ec8d7 100644 --- a/src/components/molecules/ComparisonColumnCard/ComparisonColumnCard.tsx +++ b/src/components/molecules/ComparisonColumnCard/ComparisonColumnCard.tsx @@ -36,10 +36,11 @@ function formatPrice(amount: number): string { /** * Desktop column header card for the ComparisonTable. * - * Shows provider info (verified badge, name, location, rating), package name, - * total price, CTA button, and optional Remove link. The verified badge floats - * above the card's top edge. Recommended packages get a copper banner and warm - * selected card state. + * Shows provider info (verified/recommended badge, name, location, rating), + * package name, total price, CTA button, and optional Remove link. The badge + * floats above the card's top edge — "Recommended" (primary fill) replaces + * "Verified" (soft) when the package is recommended. Recommended packages + * also get a warm selected card state with a brand-600 border. * * Used as the sticky header for each column in the desktop comparison grid. * Mobile comparison uses ComparisonPackageCard instead. @@ -61,13 +62,19 @@ export const ComparisonColumnCard = React.forwardRef - {/* Floating verified badge — overlaps card top edge */} - {pkg.provider.verified && ( + {/* Floating badge — Recommended (primary fill) takes priority over Verified (soft) */} + {(pkg.isRecommended || pkg.provider.verified) && ( } + icon={ + pkg.isRecommended ? ( + + ) : ( + + ) + } sx={{ position: 'absolute', top: -12, @@ -77,7 +84,7 @@ export const ComparisonColumnCard = React.forwardRef - Verified + {pkg.isRecommended ? 'Recommended' : 'Verified'} )} @@ -85,24 +92,16 @@ export const ComparisonColumnCard = React.forwardRef - {pkg.isRecommended && ( - - - Recommended - - - )} - - {/* Provider name (truncated with tooltip) */} - - + )} + - {pkg.provider.name} - - + + {pkg.provider.name} + + + {/* Location */} {pkg.provider.location} - {/* Rating */} - {pkg.provider.rating != null && ( + {/* Rating (or dash placeholder to keep card heights consistent) */} + {pkg.provider.rating != null ? ( + ) : ( + + — + )} @@ -182,10 +205,10 @@ export const ComparisonColumnCard = React.forwardRef - {!pkg.isRecommended && onRemove && ( + {!pkg.isRecommended && onRemove ? ( onRemove(pkg.id)} @@ -193,6 +216,11 @@ export const ComparisonColumnCard = React.forwardRef Remove + ) : ( + /* Invisible spacer keeps CTA aligned with cards that show Remove */ + + Remove + )}