fix(layout): enable independent scrolling for sidebar and content area#1052
Open
manaskng wants to merge 2 commits into
Open
fix(layout): enable independent scrolling for sidebar and content area#1052manaskng wants to merge 2 commits into
manaskng wants to merge 2 commits into
Conversation
The content ResizablePanel used min-h-screen which pushed the layout beyond viewport height, causing full-page scrolling instead of panel- scoped scrolling. This made it impossible to scroll the sidebar course navigation independently of the main content area. Changes: - Replace min-h-screen with h-full + overflow-hidden on the content ResizablePanel to constrain it within the viewport - Add h-full to SidebarInset so flex children respect viewport bounds - Switch inner content div from overflow-hidden to overflow-y-auto so the content area scrolls independently within its panel Closes vicharanashala#979
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #979
The content ResizablePanel used
min-h-screenwhich pushed the layout beyond viewport height,causing the entire page to scroll instead of the sidebar and content area scrolling independently.
Changes
min-h-screenwithh-full overflow-hiddenon content ResizablePanelh-fullto SidebarInset to constrain flex children within viewportoverflow-hiddentooverflow-y-autofor independent scrollingBefore
Scrolling anywhere on the right panel or sidebar would scroll the entire page.
After
Sidebar and content area scroll independently within their own containers.