fix: file browser scrolling and layout overflow issues#89
Conversation
The file list page was scrolling the entire main content area when there were many files, which caused the toolbar (breadcrumbs, action buttons, sync indicator) to scroll out of view. Now only the file list body scrolls while the toolbar and header remain fixed on screen. - Add overflow: hidden to .file-browser-content to contain overflow - Add flex: 1 and min-height: 0 to .file-list so it fills remaining space - Add overflow-y: auto to .file-list-body for isolated scroll https://claude.ai/code/session_01BCBTX9Dk4k9WVcfWUKvqmD
WalkthroughUpdated CSS layout properties in the file browser stylesheet to improve flex container behavior. Added overflow constraints and flex growth rules to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the file browser’s flex/overflow CSS so the file list can scroll correctly within a constrained layout, avoiding page-level overflow.
Changes:
- Set the main
.file-browser-contentcontainer tooverflow: hiddento prevent unintended overflow outside the file browser area. - Updated
.file-listand.file-list-bodywithflex: 1andmin-height: 0to allow flex shrinking and enable inner scrolling. - Enabled vertical scrolling on
.file-list-bodyviaoverflow-y: auto.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Fixed layout and scrolling issues in the file browser component by properly configuring flex containers and overflow behavior.
Key Changes
overflow: hiddento the main file browser container to prevent unintended overflow.file-listwithflex: 1andmin-height: 0to allow proper flex shrinking and enable scrolling in child elements.file-list-bodywith:flex: 1to fill available spacemin-height: 0to enable scrolling within flex containersoverflow-y: autoto enable vertical scrolling for file itemsImplementation Details
These changes follow the CSS flexbox pattern for scrollable containers within flex layouts. The
min-height: 0property is necessary to allow flex items to shrink below their content size, which is required for scrolling to work properly in nested flex containers. This ensures the file list can scroll independently while maintaining the overall layout structure.https://claude.ai/code/session_01BCBTX9Dk4k9WVcfWUKvqmD
Summary by CodeRabbit