feat: add compact view and swimlanes toggle to HomePageContent

- Introduced toggle buttons for compact view and swimlanes by tags in HomePageContent, enhancing user preferences management.
- Removed redundant compact view toggle from KanbanFilters to streamline functionality.
This commit is contained in:
Julien Froidefond
2025-09-17 11:39:48 +02:00
parent ed001ea74a
commit 60a9d0807e
2 changed files with 50 additions and 27 deletions

View File

@@ -90,12 +90,6 @@ export function KanbanFilters({ filters, onFiltersChange, hiddenStatuses: propsH
});
};
const handleCompactViewToggle = () => {
onFiltersChange({
...filters,
compactView: !filters.compactView
});
};
const handleSwimlanesToggle = () => {
onFiltersChange({
@@ -243,27 +237,6 @@ export function KanbanFilters({ filters, onFiltersChange, hiddenStatuses: propsH
)}
</div>
{/* Bouton vue compacte */}
<Button
variant={filters.compactView ? "primary" : "ghost"}
onClick={handleCompactViewToggle}
className="flex items-center gap-2"
title={filters.compactView ? "Vue détaillée" : "Vue compacte"}
>
<svg
className="w-4 h-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
{filters.compactView ? (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 10h16M4 14h16M4 18h16" />
) : (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
)}
</svg>
{filters.compactView ? 'Détaillée' : 'Compacte'}
</Button>
{/* Bouton de tri */}
<div className="relative" ref={sortDropdownRef}>