From 09d43f1e9b235c37f3e2c736ec9997870c16102d Mon Sep 17 00:00:00 2001 From: Steven RYDELL Date: Wed, 29 Jul 2026 08:55:57 +0200 Subject: [PATCH] Stretch sidebar hover full-width with a separated footer in square mode --- src/components/layout/Sidebar.tsx | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index e707e45..f3ee83f 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -121,6 +121,11 @@ function AccordionCollapsible({ const sidebarItemClass = 'w-full justify-start gap-2 font-normal text-muted-foreground hover:bg-accent/50 hover:text-foreground'; +// In square mode the sidebar follows documentation conventions (better-auth): +// full-bleed rows with a barely-there hover wash instead of inset pills. +const sidebarItemSquareClass = + "[[data-radius='square']_&]:hover:bg-foreground/[0.03] [[data-radius='square']_&]:hover:text-foreground/90"; + function checkLinkVisible(viewName: string): boolean { const schema = useSchemaStore.getState().schema; if (!schema) return true; @@ -170,6 +175,7 @@ function SidebarSubItem({ item, depth, sectionName, currentPath, navigate, editi data-sidebar-active={isActive || undefined} className={cn( sidebarItemClass, + sidebarItemSquareClass, isActive && 'bg-accent text-accent-foreground hover:bg-accent', depth > 0 && 'text-sm', )} @@ -197,7 +203,7 @@ function SidebarSubItem({ item, depth, sectionName, currentPath, navigate, editi