From c5bfcc50f8d1066ed47801b8eed622b2fb274072 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sun, 21 Sep 2025 06:42:26 +0200 Subject: [PATCH] fix: refine loading states in MetricsTab - Simplified loading logic by removing unnecessary trends loading check. - Enhanced UI feedback by disabling the weeks selection during trends loading and added a loading state for the trends chart. - Improved user experience by displaying a message when no velocity data is available. --- components/dashboard/MetricsTab.tsx | 52 ++++++++++++++++++----------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/components/dashboard/MetricsTab.tsx b/components/dashboard/MetricsTab.tsx index d75bb16..8ce4a91 100644 --- a/components/dashboard/MetricsTab.tsx +++ b/components/dashboard/MetricsTab.tsx @@ -93,7 +93,7 @@ export function MetricsTab({ className }: MetricsTabProps) { - {metricsLoading || trendsLoading ? ( + {metricsLoading ? (
@@ -207,27 +207,39 @@ export function MetricsTab({ className }: MetricsTabProps) {
{/* Tendances de vélocité */} - {trends.length > 0 && ( - - -
-

🚀 Tendances de vélocité

- + + +
+

🚀 Tendances de vélocité

+ +
+
+ + {trendsLoading ? ( +
+
+
+
+
- - + ) : trends.length > 0 ? ( - -
- )} + ) : ( +
+ Aucune donnée de vélocité disponible +
+ )} + + {/* Analyses de productivité */}