From a32f41b91d1eb49e9a5c7a25290cbbfda21dfd38 Mon Sep 17 00:00:00 2001 From: Matt Ciaccio Date: Sun, 3 May 2026 16:15:20 +0200 Subject: [PATCH] fix(dashboard): scope h-full to xl + tighter mobile sizing on KPIs The Alerts rail and Reminders rail were using h-full unconditionally, which worked at xl: where the dashboard grid pairs them with a sibling chart column, but produced weirdly stretched empty cards in the single-column mobile stack (no fixed-height context to fill). alert-rail / my-reminders-rail: h-full -> xl:h-full KPI tiles + skeleton rendered the same desktop padding (p-5) and font sizes on phone, leaving the value cramped against a wide white frame. Tighter mobile defaults that scale up at sm: KPITile p-3 sm:p-5, label text-[10px] sm:text-xs, value mt-1 text-lg sm:mt-2 sm:text-2xl, value truncates KpiTileSkeleton: matching p-3 sm:p-5 + smaller skeleton bars on mobile Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/alerts/alert-rail.tsx | 6 +++++- src/components/dashboard/kpi-cards.tsx | 7 +++---- src/components/dashboard/my-reminders-rail.tsx | 5 ++++- src/components/ui/kpi-tile.tsx | 8 +++++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/alerts/alert-rail.tsx b/src/components/alerts/alert-rail.tsx index fabdfc5..cf3ff66 100644 --- a/src/components/alerts/alert-rail.tsx +++ b/src/components/alerts/alert-rail.tsx @@ -22,7 +22,11 @@ export function AlertRail() {

Alerts

diff --git a/src/components/dashboard/kpi-cards.tsx b/src/components/dashboard/kpi-cards.tsx index f3a5d59..c40f91f 100644 --- a/src/components/dashboard/kpi-cards.tsx +++ b/src/components/dashboard/kpi-cards.tsx @@ -28,11 +28,10 @@ function formatPercent(value: number): string { function KpiTileSkeleton() { return ( -
+
- - - + +
); } diff --git a/src/components/dashboard/my-reminders-rail.tsx b/src/components/dashboard/my-reminders-rail.tsx index f903757..2ecca84 100644 --- a/src/components/dashboard/my-reminders-rail.tsx +++ b/src/components/dashboard/my-reminders-rail.tsx @@ -67,8 +67,11 @@ export function MyRemindersRail() { return `/${portSlug}/reminders`; } + // `h-full` only at xl: where the dashboard grid pairs this rail with + // a sibling chart column. On mobile (stacked) it produced a weirdly + // tall empty card. return ( - +
diff --git a/src/components/ui/kpi-tile.tsx b/src/components/ui/kpi-tile.tsx index 0805870..f87b269 100644 --- a/src/components/ui/kpi-tile.tsx +++ b/src/components/ui/kpi-tile.tsx @@ -45,7 +45,7 @@ export function KPITile({
-
+
{title}
-
{value}
+
+ {value} +
{typeof delta === 'number' ? (
{deltaPrefix}