refactor: adaptive UI components for Navigation 3#4891
Merged
jamesarich merged 7 commits intomainfrom Mar 23, 2026
Merged
Conversation
…ve UI - Update KMP status and developer guides to reflect the adoption of Navigation 3 Stable Scene-based architecture. - Integrate Material 3 Adaptive UI guidelines, specifically targeting Large (1200dp) and Extra-large (1600dp) breakpoints for desktop and external displays. - Mandate the use of `currentWindowAdaptiveInfo(supportLargeAndXLargeWidth = true)` in `AGENTS.md`, `GEMINI.md`, and Copilot instructions to ensure high information density on large screens. - Refine the project roadmap to include adaptive density optimizations and WindowSizeClass V2 adoption. - Update `kmp-status.md` to reflect progress in shared UI logic and multi-pane layout support.
… User" scenes - Update `AGENTS.md`, `GEMINI.md`, and `copilot-instructions.md` to include guidance for investigating 3-pane layouts (e.g., Node List + Detail + Map) on screens ≥ 1200dp. - Mandate the use of Navigation 3 Scenes and `ThreePaneScaffold` to support high-density interactions for Desktop and Android 16 QPR3 external displays. - Refine `docs/roadmap.md` to explicitly prioritize 3-pane scene architecture within the Navigation 3 migration.
- Introduce `AdaptiveListDetailScaffold` in `core:ui` to centralize Material 3 adaptive layout logic, including back handling, focus management, and pane transitions. - Refactor `AdaptiveContactsScreen` and `AdaptiveNodeListScreen` to utilize the new shared component, significantly reducing redundant navigation and scaffold boilerplate. - Add Material 3 Adaptive (layout and navigation) and `navigationevent-compose` dependencies to the `core:ui` module. - Standardize adaptive navigation behavior for tab-switching and "scroll to top" events across messaging and node features.
- Migrate `DeviceConfig`, `PositionConfig`, `SecurityConfig`, and `ExternalNotificationConfig` screens from platform-specific modules (`androidMain`, `jvmMain`) to `commonMain`. - Introduce `expect`/`actual` patterns to handle platform-specific logic, including time zone POSIX string generation, GPS location retrieval, ringtone playback/importing, and security key exporting. - Add iOS stubs and no-op implementations for the new common configuration screens. - Update `AdaptiveTwoPane` to use `currentWindowAdaptiveInfo` and standard window size breakpoints instead of hardcoded width checks. - Refine `Main` navigation to support large and extra-large width adaptive layouts. - Clean up deleted platform-specific files and update screen references in `SettingsMainScreen`.
- Remove redundant `expect`/`actual` declarations for `DeviceConfigScreen`, `PositionConfigScreen`, `SecurityConfigScreen`, and `ExternalNotificationConfigScreen`. - Update `commonMain` navigation logic to invoke `*ConfigScreenCommon` components directly. - Clean up unused platform-specific implementations and stubs in Android, JVM, and iOS modules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for adaptive layouts across the codebase, focusing on improved multi-pane experiences for large and extra-large screens (such as desktop and external displays). It adopts the stable Navigation 3 Scene-based architecture, updates documentation to reflect these architectural changes, and enhances the code and dependencies to support Material 3 Adaptive features. The main code changes include new adaptive scaffolds, updated usage of adaptive info, and improved breakpoint handling.
Key changes:
Adaptive Layout & Multi-pane Support:
AdaptiveListDetailScaffoldcomposable tocore/ui/component, enabling flexible list-detail layouts that adapt to window size and support three-pane navigation for large screens.AdaptiveTwoPaneto usecurrentWindowAdaptiveInfo(supportLargeAndXLargeWidth = true)and improved breakpoint logic for seamless transitions between compact and expanded layouts. [1] [2]MainScreeninapp/ui/Main.ktto passsupportLargeAndXLargeWidth = truetocurrentWindowAdaptiveInfo, ensuring correct navigation suite type selection for large displays.AdaptiveContactsScreento use the new adaptive scaffold, simplifying and modernizing the implementation. [1] [2]Navigation Architecture:
Material 3 Adaptive Integration:
core/ui/build.gradle.ktsto support adaptive layouts and navigation.Documentation Updates:
Roadmap & Status:
These changes collectively modernize the UI architecture, improve cross-platform consistency, and set the foundation for advanced desktop and multitasking experiences.