Skip to content

tabViewStyle(.sidebarAdaptable)#387

Open
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:sidebar-adaptable
Open

tabViewStyle(.sidebarAdaptable)#387
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:sidebar-adaptable

Conversation

@dfabulich
Copy link
Copy Markdown
Contributor

@dfabulich dfabulich commented Apr 4, 2026

There are a lot of indentation changes in this PR. It's best viewed in a whitespace-ignoring diff tool, even just git diff -w.

This PR adds a dependency on androidx.compose.material3:material3-adaptive-navigation-suite. We're not using the top-level NavigationSuiteScaffold, but we are using its NavigationSuiteScaffoldLayout.

Before/After

Screenshot_20260403_210724 Screenshot_20260403_205950

It was a judgment call to decide what Material component(s) to use for this

Google's Material 3 guidelines on navigation are a bit confusing right now, because the documentation is about the new Material 3 Expressive upgrade, which is not part of the current stable Compose Bill of Materials. In Material 3 Expressive, "Navigation Drawer" was deprecated in favor of a new "expanded" mode for Navigation Rail.

On iOS 18 and iOS 26, sidebarAdaptable shows a bottom tab bar on iPhone, and, on iPad, shows UI that I think is more comparable to a Material 3 "Navigation Drawer" or a Material 3 Expressive "Wide Navigation Rail," with a button to switch between a wide sidebar and a top tab bar.

Google's default NavigationSuiteScaffold prefers to use a "collapsed" Navigation Rail on large screens, even in the new Material 3 Expressive version. And Google's apps tend to follow that pattern, e.g. the Google Play Store (which has been updated to adopt Material 3 Expressive components in Android 16) uses a collapsed, non-expandable Navigation Rail.

So, we're forced to decide what behavior the sidebar should have by default: collapsed Navigation Rail or expanded Navigation Rail(/Drawer)?

And we also have to decide whether to give the user a toggle, and what the toggle would do. On SwiftUI, users can toggle between a sidebar and a top tab bar. Material 3 Expressive recommends a toggle between a collapsed Navigation Rail and an expanded Navigation Rail.

I opted not to give the user any toggle at all, and to prefer a collapsed Navigation Rail by default, matching NavigationSuiteScaffold and the Google Play Store in Android 16 (which has been upgraded to Material 3 Expressive). Perhaps we could add a setting to give the user a toggle in a future PR.

Skip Pull Request Checklist:


  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Cursor mostly did the whole thing; I manually tested it on Android phones and tablets.

@dfabulich
Copy link
Copy Markdown
Contributor Author

dfabulich commented Apr 4, 2026

Oops, I pushed the wrong branch… fixed

@dfabulich dfabulich force-pushed the sidebar-adaptable branch from fae7e52 to 381aeae Compare April 4, 2026 04:08
@dfabulich dfabulich marked this pull request as ready for review April 4, 2026 04:08
@dfabulich dfabulich mentioned this pull request Apr 4, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant