Skip to content

fix: add scrollable wrapper inside sidebar content#62

Merged
j4rviscmd merged 2 commits intomainfrom
fix/sidebar-scrollbar
Mar 26, 2026
Merged

fix: add scrollable wrapper inside sidebar content#62
j4rviscmd merged 2 commits intomainfrom
fix/sidebar-scrollbar

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

Add an inner wrapper div with custom-scrollbar and overflow-y-auto classes inside SidebarContent to enable vertical scrolling when notes overflow the sidebar area.

Problem

When many notes exist, the sidebar content overflows and is visually cut off, but users cannot scroll to see hidden notes. The root cause is a WebKit (Tauri WebView) compatibility issue where SidebarContent's built-in flex-col + overflow-auto combination does not produce scrollable behavior.

Solution

Instead of modifying the shadcn/ui SidebarContent component directly, wrap the sidebar body content in a plain <div> with:

  • custom-scrollbar: VS Code-like thin scrollbar styling
  • min-h-0 flex-1: proper flex child height constraint
  • overflow-y-auto overflow-x-hidden: vertical scroll enabled, horizontal hidden

This separates the flex layout concern (handled by SidebarContent) from the scroll concern (handled by the inner div), which is a well-known pattern for fixing flex-col + scroll issues in WebKit.

Changes

  • src/features/sidebar/ui/NoteSidebar.tsx: Add scroll wrapper div inside SidebarContent

j4rviscmd and others added 2 commits March 26, 2026 22:31
Add an inner div with custom-scrollbar and overflow-y-auto classes
inside SidebarContent to enable vertical scrolling when notes overflow
the sidebar. This works around a WebKit flex-col + overflow issue where
SidebarContent's built-in overflow-auto did not produce scrollable
behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@j4rviscmd j4rviscmd added the bug Something isn't working label Mar 26, 2026
@j4rviscmd j4rviscmd merged commit 0ea1103 into main Mar 26, 2026
2 checks passed
@j4rviscmd j4rviscmd deleted the fix/sidebar-scrollbar branch March 26, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant