refactor(nav): improve adaptive navigation#1121
refactor(nav): improve adaptive navigation#1121Cd16d wants to merge 4 commits intojarnedemeulemeester:mainfrom
Conversation
This commit refactors the adaptive navigation logic to provide a better user experience across different device sizes and orientations. The new logic introduces the following changes: - Collapsed navigation rail for landscape phones, PCs, and landscape tablets. - New navigation bar medium for portrait tablets and foldables. - Standard bottom navigation bar for portrait phones.
There was a problem hiding this comment.
Pull request overview
This PR refactors the adaptive navigation implementation to provide a more responsive and device-appropriate navigation experience across different screen sizes and orientations. The changes leverage newer Material3 Adaptive Navigation Suite APIs to select appropriate navigation patterns based on device characteristics.
- Implements device-specific navigation patterns: collapsed navigation rail for landscape phones and tablets, medium navigation bar for portrait tablets/foldables, and standard bottom navigation bar for portrait phones
- Replaces the previous adaptive logic with explicit breakpoint-based decision tree using height and width constraints
- Vertically centers navigation items in rail layouts for improved visual hierarchy
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…idth and CompactHeight
This commit updates `NavigationRoot.kt` to use fully qualified names for `WindowSizeClass` constants instead of static imports.
|
Seems like this uses the new flexible navigation bar from material 3 expressive. I am holding off from using any expressive components untill Google has released a stable version of androidx.material3 with those components. Also, should we follow the official guidelines of also using a navigation bar in landscape phone view? I do feel like using a navigation bar wastes a lot of vertical screen space. But I just wanted to ask what you think |
This commit refactors the adaptive navigation logic to provide a better user experience across different device sizes and orientations.
The new logic introduces the following changes: