Merge pull request #4472 from JoeJoeflyn/fix/hide-sidenav-scrollbar-collapsed

fix: hide sidebar scrollbar when collapsed
This commit is contained in:
Mike Cao authored and GitHub committed 2026-09-15 14:18:22 -07:00
commit 81895a9a53
2 files changed
+9 -1

No files matched your search

+5 -1
View File
@@ -14,6 +14,7 @@ import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav';
import { IconLabel } from '@/components/common/IconLabel';
import Link from '@/components/common/Link';
import { OverlayScrollArea } from '@/components/common/OverlayScrollArea';
import styles from '@/components/common/OverlayScrollArea.module.css';
import { useGlobalState, useMessages, useNavigation } from '@/components/hooks';
import {
Globe,
@@ -104,7 +105,10 @@ export function SideNav(props: any) {
<PanelButton />
</Row>
</Row>
<OverlayScrollArea style={{ flexGrow: 1, minHeight: 0 }}>
<OverlayScrollArea
className={isCollapsed ? styles.collapsed : undefined}
style={{ flexGrow: 1, minHeight: 0 }}
>
{websiteId ? (
<WebsiteNav websiteId={websiteId} isCollapsed={isCollapsed} />
) : pathname.includes('/settings') ? (
@@ -6,6 +6,10 @@
--overlay-scrollbar-vertical-margin-right: 2px;
}
.collapsed > [data-orientation] {
display: none;
}
.root > :first-child {
padding-right: var(--overlay-scrollbar-viewport-padding-right);
}