NavigationSplitView sidebar animation lag with minimum width

Hi, when I run NavigationSplitView as shown below, the sidebar opens and closes smoothly.

struct TestingView: View {
    var body: some View {
        NavigationSplitView {
            Text("Sidebar")
        } detail: {
            Text("Detail")
        }
    }
}

However, when I add a minimum width, the sidebar animation starts to lag. I tried various wapping solutions, but I couldn’t get rid of the stutter.

struct TestingView: View {
    var body: some View {
        NavigationSplitView {
            Text("Sidebar")
        } detail: {
            Text("Detail")
        }
        .frame(minWidth: 800)
    }
}

As a solution, I had to disable the animation completely:

.animation(nil, value: columnVisibility)

Is there a way to keep the animation without the stuttering?

@captmagnus You should try using navigationSplitViewColumnWidth(min:ideal:max:) to set the preferred width for the column and .windowResizability(.contentSize) for the resizability strategy.

For example:

   WindowGroup {
       ContentView()
   }
    .windowResizability(.contentSize)


struct ContentView: View {
    @State private var columnVisibility =
    NavigationSplitViewVisibility.all
    
    var body: some View {
        NavigationSplitView(columnVisibility: $columnVisibility) {
            Text("Sidebar")
                .navigationSplitViewColumnWidth(min: 300, ideal: 300)
        } detail: {
            Text("Detail")
                .navigationSplitViewColumnWidth(
                           min: 600, ideal: 600, max: 900)
        }
        .onChange(of: columnVisibility) {
            print(columnVisibility)
        }
    }
}

It's also worth filling a bug report for the animation hitch. Bug Reporting: How and Why? has tips on creating your bug report. Post the FB number here once you file the bug report.

NavigationSplitView sidebar animation lag with minimum width
 
 
Q