Repository navigation
sidebar scrollbar always visible — should only appear when content overflows #3280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9811,6 +9811,8 @@ struct VerticalTabsSidebar: View { | |
| } | ||
| .background( | ||
| SidebarScrollViewResolver { scrollView in | ||
| scrollView?.scrollerStyle = .overlay | ||
| scrollView?.autohidesScrollers = true | ||
| dragAutoScrollController.attach(scrollView: scrollView) | ||
| } | ||
| .frame(width: 0, height: 0) | ||
|
|
@@ -12189,7 +12191,7 @@ private struct SidebarEmptyArea: View { | |
| var body: some View { | ||
| Color.clear | ||
| .contentShape(Rectangle()) | ||
| .frame(maxWidth: .infinity, maxHeight: .infinity) | ||
| .frame(maxWidth: .infinity) | ||
| .onTapGesture(count: 2) { | ||
|
Comment on lines
12192
to
12195
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Removing Useful? React with 👍 / 👎. |
||
| tabManager.addWorkspace(placementOverride: .end) | ||
| if let selectedId = tabManager.selectedTabId { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SidebarEmptyAreachange is a no-op —maxHeight: .infinitystill applied at call siteRemoving
maxHeight: .infinityfrom insideSidebarEmptyArea.bodyhas no effect because the call site inworkspaceScrollContent(line 9882) immediately re-applies.frame(maxWidth: .infinity, maxHeight: .infinity)to the same view:The outer frame modifier wraps the view, so the
SidebarEmptyAreastill requests unlimited height inside theScrollView. If the goal is to remove artificial height inflation that causes unneeded scroll overflow, themaxHeight: .infinityat the call site also needs to be removed. The actual scrollbar visual fix (.overlay+autohidesScrollers) addresses the symptom, but the underlying content sizing issue described in the PR remains.