Skip to content
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

FB11965199: NavigationSplitView need the ability to not allow hiding the sidebar #379

Open
sindresorhus opened this issue Jan 24, 2023 · 0 comments

Comments

@sindresorhus
Copy link
Member

  • Date: 2023-01-24
  • Resolution: Open
  • Area: SwiftUI framework
  • OS: macOS 13.1
  • Type: Suggestion

Description

Currently, using NavigationSplitView adds a “toggle sidebar” toolbar button that cannot be removed. In addition, on macOS, the user is free to resize the sidebar to zero width, which hides it.

There are apps where it does not make sense to hide the sidebar. It would be nice if there was a modifier for this. Something similar to .interactiveDismissDisabled() like .sidebarCollapseDisabled(). The modifier would make it not add a “toggle sidebar” button to the toolbar and make it impossible for the user to resize to hide the sidebar on macOS.

For example, NSSplitViewItem has the ability to prevent hiding the sidebar with its .canCollapse = false property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@sindresorhus and others