From 651a529cdd60ae05bb8269616de24789a415ffe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 22:14:47 +0200 Subject: [PATCH] fix(insights): collapse BP tile to single secondary row at =sm` for users with the screen real-estate. Closes Design-H2. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/charts/trend-card.tsx | 72 ++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/src/components/charts/trend-card.tsx b/src/components/charts/trend-card.tsx index d696bbd3c..ea67d6f50 100644 --- a/src/components/charts/trend-card.tsx +++ b/src/components/charts/trend-card.tsx @@ -230,9 +230,23 @@ export function TrendCard({ line below the latest value so the tile stays scannable on mobile viewports (no horizontal-scroll, no overlap with the existing 7d/30d row). Suppressed when comparison is off OR - we don't have enough data to compute a delta. */} + we don't have enough data to compute a delta. + + v1.4.22 W5 reconcile (Design-H2) — on `=sm`. */} {compareBaseline !== "none" && compareDelta != null && ( -
+
=sm`; on ` + {t(avgAllTimeLabelKey)}:{" "} )}
+ {/* v1.4.22 W5 reconcile (Design-H2) — combined secondary row + for `=sm` because the full layout above takes over. */} + {avgAllTime !== undefined && ( +
+ + {t(avgAllTimeLabelKey)}:{" "} + + {avgAllTime !== null ? formatValue(avgAllTime) : "—"} + + + {compareBaseline !== "none" && compareDelta != null && ( + <> + + + {`Δ ${formatDelta(compareDelta)}${unit ? ` ${unit}` : ""} ${t( + compareBaseline === "lastMonth" + ? "comparison.captionLastMonth" + : "comparison.captionLastYear", + )}`} + + + )} +
+ )}
);