From 2887a6a750ad504d8aa55601d6e91053f1e3215f Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sun, 21 Dec 2025 13:25:27 +0100 Subject: [PATCH] feat: enhance Sidebar and TransactionTable components with improved accessibility and layout adjustments; add SheetTitle for navigation context and refine padding and width for better responsiveness --- components/dashboard/sidebar.tsx | 3 +- components/layout/page-layout.tsx | 2 +- components/transactions/transaction-table.tsx | 37 ++++++++++--------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/components/dashboard/sidebar.tsx b/components/dashboard/sidebar.tsx index 0f125ad..05f62d9 100644 --- a/components/dashboard/sidebar.tsx +++ b/components/dashboard/sidebar.tsx @@ -18,7 +18,7 @@ import { LogOut, } from "lucide-react"; import { toast } from "sonner"; -import { Sheet, SheetContent } from "@/components/ui/sheet"; +import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet"; import { useIsMobile } from "@/hooks/use-mobile"; import { useLocalStorage } from "@/hooks/use-local-storage"; @@ -165,6 +165,7 @@ export function Sidebar({ open, onOpenChange }: SidebarProps) { return ( + Navigation
-
+
{children}
diff --git a/components/transactions/transaction-table.tsx b/components/transactions/transaction-table.tsx index 5c09eb1..501078d 100644 --- a/components/transactions/transaction-table.tsx +++ b/components/transactions/transaction-table.tsx @@ -155,7 +155,7 @@ export function TransactionTable({ const parentRef = useRef(null); const isMobile = useIsMobile(); - const MOBILE_ROW_HEIGHT = 120; + const MOBILE_ROW_HEIGHT = 140; const virtualizer = useVirtualizer({ count: transactions.length, @@ -227,17 +227,17 @@ export function TransactionTable({ ); return ( - - + + {transactions.length === 0 ? (

Aucune transaction trouvée

) : isMobile ? ( -
+
-
-
+
+
{ onToggleSelectTransaction(transaction.id); }} onClick={(e) => e.stopPropagation()} + className="mt-0.5 hidden md:flex" />
-

+

{transaction.description}

{isDuplicate && ( - +

@@ -312,7 +313,7 @@ export function TransactionTable({ )}

{transaction.memo && ( -

+

{transaction.memo}

)} @@ -320,7 +321,7 @@ export function TransactionTable({
= 0 ? "text-emerald-600" : "text-red-600" @@ -331,18 +332,18 @@ export function TransactionTable({
-
- +
+ {formatDate(transaction.date)} {account && ( - + • {account.name} )}
e.stopPropagation()} - className="flex-1 relative" + className="flex-1 relative min-w-[120px]" > {updatingTransactionIds.has(transaction.id) && (
@@ -370,9 +371,9 @@ export function TransactionTable({