From c4f68bb00c807a254759b97fc1cd0e70f46e1479 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sun, 14 Sep 2025 21:53:42 +0200 Subject: [PATCH] feat: add swimlanes view toggle to Kanban board - Introduced `swimlanesByTags` filter in `KanbanFilters` to toggle between swimlanes and standard Kanban view. - Updated `BoardContainer` to conditionally render `SwimlanesBoard` or `KanbanBoard` based on the selected filter. - Enhanced UI with a button to switch views, improving task organization and user experience. --- components/kanban/BoardContainer.tsx | 32 ++++-- components/kanban/KanbanFilters.tsx | 30 ++++++ components/kanban/SwimlanesBoard.tsx | 156 +++++++++++++++++++++++++++ 3 files changed, 208 insertions(+), 10 deletions(-) create mode 100644 components/kanban/SwimlanesBoard.tsx diff --git a/components/kanban/BoardContainer.tsx b/components/kanban/BoardContainer.tsx index 8b45c47..f4c9463 100644 --- a/components/kanban/BoardContainer.tsx +++ b/components/kanban/BoardContainer.tsx @@ -2,6 +2,7 @@ import { useState } from 'react'; import { KanbanBoard } from './Board'; +import { SwimlanesBoard } from './SwimlanesBoard'; import { KanbanFilters } from './KanbanFilters'; import { EditTaskForm } from '@/components/forms/EditTaskForm'; import { useTasksContext } from '@/contexts/TasksContext'; @@ -53,16 +54,27 @@ export function KanbanBoardContainer() { onFiltersChange={setKanbanFilters} /> - + {kanbanFilters.swimlanesByTags ? ( + + ) : ( + + )} { + onFiltersChange({ + ...filters, + swimlanesByTags: !filters.swimlanesByTags + }); + }; + const handleClearFilters = () => { onFiltersChange({}); }; @@ -86,6 +94,28 @@ export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps) /> + {/* Bouton swimlanes par tags */} + + {/* Bouton vue compacte */}