From 4fa4327a180ee96b50d731a079d3d7cd8458f335 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 7 Jul 2026 23:40:49 -0400 Subject: [PATCH] DP17: use folds Icons + named brand-color consts in UrlPreviewCard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace literal-glyph UI icons in the URL preview cards with folds Icon/Icons components, and hoist hardcoded provider brand hex values into a single named BRAND_COLORS map. Glyph -> folds icon: - TikTok/Spotify musical note (♫) -> Icons.VolumeHigh - Portrait play button (▶) -> Icons.Play - Reddit comment count (💬) -> Icons.Message - Steam gear (⚙) -> Icons.Setting All use size="Inherit" so they keep the surrounding font-size/color. Brand hex now referenced via BRAND_COLORS (tiktok, spotify, steam, twitch, reddit, discord, npm, stackOverflow) instead of scattered literals; colors are byte-for-byte identical and remain fixed brand identities (not converted to TDS theme vars). The game controller glyph (🎮) is left as-is: folds has no game/ controller icon and no close semantic match. Co-Authored-By: Claude Opus 4.8 --- .../components/url-preview/UrlPreviewCard.tsx | 64 ++++++++++++++----- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index 0bc71cb0e..c408bf3e9 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -33,6 +33,22 @@ import { const linkStyles = { color: color.Success.Main }; +// --------------------------------------------------------------------------- +// Provider brand identity colors. +// These are official brand-palette values (logos, badges), NOT theme colors, +// so they intentionally stay as fixed hex and must not become --lt-* TDS vars. +// --------------------------------------------------------------------------- +const BRAND_COLORS = { + tiktok: '#EE1D52', + spotify: '#1db954', + steam: '#c7d5e0', + twitch: '#9146ff', + reddit: '#ff4500', + discord: '#5865f2', + npm: '#cb3837', + stackOverflow: '#f48024', +} as const; + // --------------------------------------------------------------------------- // Helpers — URL parsing & variant detection // --------------------------------------------------------------------------- @@ -474,7 +490,11 @@ function TikTokCard({
{/* TikTok badge with musical note icon */} - + TikTok {username && ( @@ -512,12 +532,14 @@ function TikTokCard({ loading="lazy" />
-
+
+ +
) : (
- +
)} @@ -828,7 +850,7 @@ function TwitchCard({ width={28} height={28} viewBox="0 0 24 24" - fill="#9146ff" + fill={BRAND_COLORS.twitch} aria-hidden="true" role="img" > @@ -921,11 +943,11 @@ function RedditCard({ width={28} height={28} viewBox="0 0 24 24" - fill="#ff4500" + fill={BRAND_COLORS.reddit} aria-hidden="true" role="img" > - + {upvotes && ▲ {upvotes}} - {comments && 💬 {comments}} + {comments && ( + + {comments} + + )}
@@ -1473,7 +1499,11 @@ function SpotifyCard({ url, prev }: { url: string; prev: IPreviewUrlResponse }) justifyContent="Center" className={previewCss.IconWrapper} > - + )} @@ -1533,7 +1563,11 @@ function SteamCard({ url, prev }: { url: string; prev: IPreviewUrlResponse }) { justifyContent="Center" className={previewCss.IconWrapper} > - + )} @@ -1640,7 +1674,7 @@ function DiscordCard({ url, prev }: { url: string; prev: IPreviewUrlResponse }) width={28} height={28} viewBox="0 0 24 24" - fill="#5865f2" + fill={BRAND_COLORS.discord} aria-hidden="true" role="img" > @@ -1693,13 +1727,13 @@ function NpmCard({ url, prev }: { url: string; prev: IPreviewUrlResponse }) { > {/* npm logo — simple square mark */} @@ -1747,7 +1781,7 @@ function StackOverflowCard({ url, prev }: { url: string; prev: IPreviewUrlRespon width={28} height={28} viewBox="0 0 24 24" - fill="#f48024" + fill={BRAND_COLORS.stackOverflow} aria-hidden="true" role="img" >