From a0912fd09a13549aa3da67cc3f1dd6421cd32c46 Mon Sep 17 00:00:00 2001 From: owain Date: Thu, 18 Jun 2026 22:00:42 +0100 Subject: [PATCH] frontend: dashboard recent-activities widget no longer scrolls Rows now flex to fill the card height so the list always fits exactly, removing the vertical scrollbar that appeared once rows carried a route line, and the spurious horizontal scrollbar caused by overflow-auto + the -mx-2 hover bleed. Empty state preserved. Co-Authored-By: Claude Opus 4.8 --- frontend/src/pages/DashboardPage.jsx | 48 +++++++++++++++------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/frontend/src/pages/DashboardPage.jsx b/frontend/src/pages/DashboardPage.jsx index aa8570d..a9c2e26 100644 --- a/frontend/src/pages/DashboardPage.jsx +++ b/frontend/src/pages/DashboardPage.jsx @@ -459,28 +459,32 @@ function RecentActivities({ activities }) { const unit = useUnit() return ( -
- {activities?.slice(0, 6).map(activity => ( - - {sportIcon(activity.sport_type)} -
-

{activity.name}

- {activity.named_route_name && ( -

📍 {activity.named_route_name}

- )} -

{formatDate(activity.start_time)}

-
-
-

{formatDistance(activity.distance_m, unit)}

-

{formatHeartRate(activity.avg_heart_rate)}

-
- - ))} - {!activities?.length && ( -

No activities yet — import some data

- )} -
+ {activities?.length ? ( + // Rows flex to fill the card height so the list always fits exactly — + // no scrollbars (and never a spurious horizontal one). The visible count + // adapts to the widget's height rather than a fixed slice overflowing. +
+ {activities.slice(0, 6).map(activity => ( + + {sportIcon(activity.sport_type)} +
+

{activity.name}

+ {activity.named_route_name && ( +

📍 {activity.named_route_name}

+ )} +

{formatDate(activity.start_time)}

+
+
+

{formatDistance(activity.distance_m, unit)}

+

{formatHeartRate(activity.avg_heart_rate)}

+
+ + ))} +
+ ) : ( +

No activities yet — import some data

+ )}
) }