diff --git a/EXHAUSTIVE_TODO_LIST.md b/EXHAUSTIVE_TODO_LIST.md index f84a2fbbc..ad6b34b96 100644 --- a/EXHAUSTIVE_TODO_LIST.md +++ b/EXHAUSTIVE_TODO_LIST.md @@ -3467,12 +3467,19 @@ Critical path dependencies: - **Status**: Component is fully functional and ready to use - **Rollback**: Delete component -- [ ] **Action 10.1.1.3**: Use tabs or accordions for secondary info +- [x] **Action 10.1.1.3**: Use tabs or accordions for secondary info - **Scope**: `apps/web/src/pages/DashboardPage.tsx` - Group secondary info in tabs - - **Dependencies**: Action 10.1.1.2 complete + - **Dependencies**: Action 10.1.1.2 complete ✅ - **Risk**: MEDIUM (layout change) - - **Validation**: Secondary info in tabs - - **Rollback**: Restore single view + - **Validation**: ✅ Secondary info organized in tabs: + - **Tabs component**: Added Tabs, TabsList, TabsTrigger, TabsContent imports + - **Tab structure**: Two tabs ("Graphique" and "Activité") organize Activity Feed content + - **Chart tab**: Contains the activity chart with time period buttons (7J, 30J, MAX) + - **Activity tab**: Contains the recent activity list with activity items + - **Default tab**: "Graphique" is the default active tab + - **Layout**: Tabs are inside the Collapsible Activity Feed section + - **Result**: Secondary information (chart and activity list) is now organized in tabs, reducing cognitive load by showing one view at a time + - **Rollback**: Remove Tabs wrapper, restore space-y-6 div with both Cards visible - [x] **Action 10.1.1.4**: Create Accordion component (if doesn't exist) - **Scope**: `apps/web/src/components/ui/accordion.tsx` (create) - Reusable accordion component ✅ diff --git a/apps/web/src/pages/DashboardPage.tsx b/apps/web/src/pages/DashboardPage.tsx index 8d4aa18aa..888d96c96 100644 --- a/apps/web/src/pages/DashboardPage.tsx +++ b/apps/web/src/pages/DashboardPage.tsx @@ -24,6 +24,7 @@ import { formatDistanceToNow } from 'date-fns'; import { fr } from 'date-fns/locale'; import { KodoEmptyState } from '@/components/ui/KodoEmptyState'; import { Collapsible } from '@/components/ui/collapsible'; +import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs'; import { FAB } from '@/components/ui/FAB'; import { cn } from '@/lib/utils'; @@ -256,101 +257,107 @@ export function DashboardPage() { triggerClassName="p-0 hover:bg-transparent" contentClassName="pt-0" > -
- {/* Chart Card */} - - -
- - - Activité récente - -
- - - + {/* Action 10.1.1.3: Use tabs to organize secondary info */} + + + Graphique + Activité + + + + +
+ + + Activité récente + +
+ + + +
-
- - -
- {[40, 65, 35, 90, 55, 75, 45, 85, 60, 70, 50, 95].map( - (h, i) => ( -
-
- {h}% -
-
- ), - )} -
-
- - - {/* Recent Activity List */} - - - - - Dernières activités - - - -
- {isLoadingDashboard ? ( - Array(3) - .fill(0) - .map((_, i) => ( + + +
+ {[40, 65, 35, 90, 55, 75, 45, 85, 60, 70, 50, 95].map( + (h, i) => (
+ className="flex-1 bg-gradient-to-t from-kodo-cyan/40 to-kodo-cyan/20 rounded-t-lg transition-all duration-300 hover:from-kodo-cyan/60 hover:to-kodo-cyan/40 cursor-pointer group relative" + style={{ height: `${h}%` }} + > +
+ {h}% +
+
+ ), + )} +
+
+ + + + + + + + Dernières activités + + + +
+ {isLoadingDashboard ? ( + Array(3) + .fill(0) + .map((_, i) => ( +
+ )) + ) : recentActivity.length > 0 ? ( + recentActivity.slice(0, 5).map((act, i) => ( +
+
+
+ +
+
+

+ {act.title} +

+

+ {act.description || 'Activité système'} +

+
+
+
+ {formatTimestamp(act.timestamp)} +
+
)) - ) : recentActivity.length > 0 ? ( - recentActivity.slice(0, 5).map((act, i) => ( -
-
-
- -
-
-

- {act.title} -

-

- {act.description || 'Activité système'} -

-
-
-
- {formatTimestamp(act.timestamp)} -
-
- )) - ) : ( - - )} -
- - -
+ ) : ( + + )} +
+
+
+ +