feat: Add rail navigation for fold and small tablet#633
feat: Add rail navigation for fold and small tablet#633aymericmariaux wants to merge 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a “medium” window classification and uses it to switch navigation UI to a rail on foldables/small tablets while keeping a drawer for large screens, plus related adaptive-layout tweaks across scaffolds and top app bar usage.
Changes:
- Introduce
isWindowMedium()and adjust small/medium/large window classification thresholds and helpers. - Update main navigation selection to use Drawer (large) / Rail (medium) / Bottom bar (small) and add a custom
AppNavigationRail. - Expand two-pane behavior to medium windows and update
SwissTransferTopAppBarto accept amodifier(updating call sites accordingly).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/swisstransfer/ui/utils/WindowAdaptativeInfoExt.kt | Adds “medium” window detection and adjusts size breakpoints / small-window logic. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt | Updates SwissTransferTopAppBar call to use named title arg. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/MyAccountScreen.kt | Updates SwissTransferTopAppBar call to use named title arg. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt | Updates SwissTransferTopAppBar call to use named title arg. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt | Updates SwissTransferTopAppBar call to use named title arg. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/MainScaffold.kt | Switches adaptive nav type mapping to Drawer (large) / Rail (medium) / Bar (small). |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt | Adds a custom rail implementation (with FAB + divider) and wires it into the scaffold. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt | Enables 2 horizontal partitions and updated selection behavior for medium windows. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt | Adds modifier parameter to the string-title overload and makes forwarding call-site-safe via named args. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallWindowScreenTitle.kt | Displays the “small window” title for medium windows as well. |
Comments suppressed due to low confidence (1)
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/MainScaffold.kt:123
calculateFromAdaptiveInfonow maps large windows toNavigationDrawer, butNavigationLargeWindowPreviewin this file still renders the scaffold withNavigationRail. Consider updating the preview(s) to reflect the new large-window behavior so previews remain accurate.
private fun calculateFromAdaptiveInfo(context: Context, windowAdaptiveInfo: WindowAdaptiveInfo): NavigationSuiteType {
return if (windowAdaptiveInfo.isWindowLarge(context)) {
NavigationSuiteType.NavigationDrawer
} else if (windowAdaptiveInfo.isWindowMedium(context)) {
NavigationSuiteType.NavigationRail
} else {
NavigationSuiteType.NavigationBar
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds adaptive navigation behavior for foldables/small tablets by introducing a “medium” window tier and rendering a NavigationRail in that tier, while updating related UI scaffolds/app bars accordingly.
Changes:
- Introduce
isWindowMediumwindow classification and update “small”/pane behavior to account for medium devices. - Render
NavigationRail(instead of bottom bar) for medium windows; use drawer for large windows. - Update top app bar call sites + add
modifiersupport toSwissTransferTopAppBar.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/swisstransfer/ui/utils/WindowAdaptativeInfoExt.kt | Adds “medium” window helper and updates small-window detection. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt | Updates SwissTransferTopAppBar call to use named title. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/MyAccountScreen.kt | Updates SwissTransferTopAppBar call to use named title. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt | Updates SwissTransferTopAppBar call to use named title. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt | Updates SwissTransferTopAppBar call to use named title. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/MainScaffold.kt | Chooses Drawer for large, Rail for medium, Bar for small. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt | Implements AppNavigationRail variant and wires it into the scaffold. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt | Expands two-pane behavior to include medium windows. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt | Adds modifier param and makes arg passing explicit. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallWindowScreenTitle.kt | Displays title on medium windows too. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt | Uses auto-sizing BasicText for app name in the top bar. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2b41cef to
db0d8db
Compare
There was a problem hiding this comment.
Pull request overview
Adds “medium window” support to improve adaptive navigation on foldables and smaller tablets by switching from bottom navigation to a navigation rail, and updates related UI components to behave correctly across window sizes.
Changes:
- Introduces
isWindowMedium()window classification and updatesisWindowSmall()logic accordingly. - Updates main navigation to use
NavigationRailfor medium windows andNavigationDrawerfor large windows. - Adjusts top app bar/title components and branding app bar to better support the new adaptive layouts.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/swisstransfer/ui/utils/WindowAdaptativeInfoExt.kt | Adds isWindowMedium() and refines small/medium/large window classification. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt | Updates SwissTransferTopAppBar call site to use named title param. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/MyAccountScreen.kt | Updates SwissTransferTopAppBar call site to use named title param. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt | Updates SwissTransferTopAppBar call site to use named title param. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt | Updates SwissTransferTopAppBar call site to use named title param. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/MainScaffold.kt | Maps medium windows to NavigationRail and large to NavigationDrawer. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt | Implements the custom AppNavigationRail and integrates it into the scaffold. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt | Uses the renamed small/medium window screen title component. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt | Enables 2 horizontal partitions for medium windows as well as large windows. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt | Adds modifier parameter and updates overload to use named arguments. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallOrMediumWindowScreenTitle.kt | Renames and expands title visibility to small + medium windows. |
| app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt | Switches app name rendering to auto-sizing text for better fit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import androidx.compose.foundation.layout.wrapContentSize | ||
| import androidx.compose.foundation.text.BasicText | ||
| import androidx.compose.foundation.text.TextAutoSize | ||
| import androidx.compose.foundation.text.TextAutoSize.Companion.StepBased |
| import androidx.compose.material3.CenterAlignedTopAppBar | ||
| import androidx.compose.material3.ExperimentalMaterial3Api | ||
| import androidx.compose.material3.LocalTextStyle | ||
| import androidx.compose.material3.Text |
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.ColorProducer | ||
| import androidx.compose.ui.graphics.toColorLong |
db0d8db to
6edd393
Compare
|



No description provided.