Skip to content

Commit 8022b5a

Browse files
committed
feat: add debug logging for sidebar visibility; update button styles and adjust list height calculation
1 parent a9e52ba commit 8022b5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/ui-vite/src/components/SpecsNavSidebar.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ export function SpecsNavSidebar({ mobileOpen = false, onMobileOpenChange }: Spec
262262
};
263263

264264
const sidebarVisible = mobileOpen || !collapsed;
265+
console.debug('sidebarVisible', sidebarVisible);
265266

266267
return (
267268
<TooltipProvider delayDuration={700}>
@@ -418,7 +419,7 @@ export function SpecsNavSidebar({ mobileOpen = false, onMobileOpenChange }: Spec
418419
<Button
419420
variant="ghost"
420421
size="sm"
421-
className="hidden lg:flex h-6 w-6 p-0 fixed z-20 top-20 -translate-x-1/2 left-[calc(var(--main-sidebar-width,240px))] bg-background border"
422+
className="hidden lg:flex h-10 w-5 p-0 absolute z-50 top-2 left-0 bg-background border border-l-0 rounded-r-md rounded-l-none shadow-md hover:w-6 hover:bg-accent transition-all items-center justify-center"
422423
onClick={() => setCollapsed(false)}
423424
title={t('specSidebar.expand')}
424425
>
@@ -433,6 +434,6 @@ export function SpecsNavSidebar({ mobileOpen = false, onMobileOpenChange }: Spec
433434
function calculateListHeight() {
434435
if (typeof window === 'undefined') return 600;
435436
const headerHeight = 56; // top navigation bar
436-
const controlsHeight = 180;
437-
return Math.max(window.innerHeight - headerHeight - controlsHeight, 320);
437+
const controlsHeight = 100;
438+
return window.innerHeight - headerHeight - controlsHeight;
438439
}

0 commit comments

Comments
 (0)