NavigationSplitView automatically places a `Toggle Sidebar` button in the toolbar on macOS. Is there really just no way to not show this button? If there isn't, this is just another gotcha in SwiftUI.
@marioguzman I’ve been looking for an answer on this myself! No luck so far.
@brentsimmons the only way to get this behavior of no Sidebar Toggle is to use the now deprecated NavgationView.
¯\_(ツ)_/¯
@marioguzman Don’t think you can get rid of it without inspecting the underlying hierarchy and spelunking. This came up in at least one of the recent dev Slack convos and they suggested filing feedback with the use case. Seems obvious but I guess still worth doing.
@marioguzman @brentsimmons If you want more control, gotta use the deprecated NavigationView with a List {}.listStyle(.sidebar) in the first column, then you have more options, including adding that sidebar button via .toolbar {}. (Maybe there'll be a fix before NavigationView disappears.) But it's still not going to satisfy longtime AppKit folks (or macOS interaction aficionados). For example, no cool slide animation if you disappear the detail view, etc. How do you grab a collapsed column? No control of the sliders. If SwiftUI doesn't save the state, well....

"How can I do all the cool AppKit things in SwiftUI" will drive you crazy. "How can I design to work within SwiftUI constraints" might be kind of fun if you enjoy a "constraints spur creativity" mode. Another gotcha: You MUST have a sidebar when you use NavigationSplitView.
@marioguzman if you’ve filed a bug report I can pull it up & try poking the appropriate people.
@alanQuatermain I’ll do so tonight and send you an FB # in a DM.
@alanQuatermain I have filed a report about this earlier, in case it helps with additional reports: FB11965199 (https://github.com/feedback-assistant/reports/issues/379)
FB11965199: NavigationSplitView need the ability to not allow hiding the sidebar · Issue #379 · feedback-assistant/reports

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 remo...

GitHub
@sindresorhus Excellent, thanks. Looks like that was duped to something in the same wheelhouse. I've given it a prod.
@marioguzman As far as I know, you can’t get rid of it. And if you make the toolbar editable, that button doesn’t appear in the edit pane. It does get around the long standing bug/feature of sidebars not being able to be re-shown with a drag, but adding a compulsory workaround is an odd way to go about this.
@marioguzman As far as I know, you can’t get rid of it. And if you make the toolbar editable, that button doesn’t appear in the edit pane. It does get around the long standing bug/feature of sidebars not being able to be re-shown with a drag, but adding a compulsory workaround is an odd way to go about this.
@marioguzman ultimately I went with a design that has no toolbar in my current project, partly because of this limitation.