-
Notifications
You must be signed in to change notification settings - Fork 136
Update navigation3 to latest snapshot #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @alexvanyo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request updates the navigation3 library to the latest snapshot and integrates it with the latest prototype from the material3-adaptive library. The primary changes involve updating the compileSdk version, modifying dependencies for navigation3, and adjusting the MainNavigation composable to use the new NavDisplay and metadata structures for pane roles.
Highlights
- Navigation3 Update: The navigation3 library is updated to the latest snapshot, which includes changes in how navigation components are structured and used.
- Material3-adaptive Integration: The pull request integrates with the latest prototype of material3-adaptive, adapting the UI for different screen sizes and layouts.
- Dependency Changes: The dependencies for navigation3 are updated to use
navigation3-runtimeandnavigation3-uiinstead of a singlenavigation3dependency. - ListDetailPaneScaffoldScene Implementation: A new file
ListDetailScene.ktis added, which implements aListDetailPaneScaffoldSceneto manage the layout and back navigation behavior for list-detail scenarios. - Metadata Updates: The metadata for
NavEntryis updated to uselistPaneMetadataanddetailPaneMetadatainstead ofpaneRolefor specifying pane roles in theListDetailPaneScaffold.
Changelog
Click here to see the changelog
- app/build.gradle.kts
- Updated
compileSdkto 36. - Replaced
implementation(libs.androidx.navigation3)withimplementation(libs.androidx.navigation3.runtime)andimplementation(libs.androidx.navigation3.ui).
- Updated
- app/src/main/java/com/google/android/samples/socialite/ui/Main.kt
- Removed unused import
androidx.compose.material3.adaptive.layout.ListDetailPaneScaffoldRole. - Replaced
androidx.navigation3.NavEntrywithandroidx.navigation3.runtime.NavEntry. - Replaced
androidx.navigation3.SceneNavDisplaywithandroidx.navigation3.ui.NavDisplay. - Replaced
ListDetailPaneScaffoldSceneStrategy.paneRolewithListDetailPaneScaffoldSceneStrategy.listPaneMetadataandListDetailPaneScaffoldSceneStrategy.detailPaneMetadata.
- Removed unused import
- app/src/main/java/com/google/android/samples/socialite/ui/navigation/ListDetailScene.kt
- Added new file implementing
ListDetailPaneScaffoldSceneto handle adaptive layouts and back navigation within a list-detail scaffold.
- Added new file implementing
- app/src/main/java/com/google/android/samples/socialite/ui/navigation/ListDetailSceneStrategy.kt
- Updated package level TODO comment.
- Modified the
calculateScenefunction to return aScene<T>?instead ofSceneStrategyResult<T>?. - Replaced
paneRolewithlistPaneMetadata,detailPaneMetadata, andextraPaneMetadatafor setting pane roles. - Removed the
ListDetailPaneScaffoldSceneclass from this file and moved it toListDetailScene.kt.
- gradle/libs.versions.toml
- Replaced
androidx-navigation3withandroidx-navigation3-runtimeandandroidx-navigation3-ui.
- Replaced
- settings.gradle.kts
- Updated the snapshot build URL for Navigation 3 library to
https://androidx.dev/snapshots/builds/13467503/artifacts/repository.
- Updated the snapshot build URL for Navigation 3 library to
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A shifting scene,
Panes adapt, a graceful dance,
UI finds its form.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request updates the navigation library to the latest snapshot and integrates it with material3-adaptive. The changes involve updating dependencies, modifying imports, and adjusting the code to use the new navigation APIs. Overall, the changes seem reasonable, but there are a few areas that could be improved.
Summary of Findings
- Dependency Updates: The pull request updates the navigation3 dependency to the latest snapshot. It's important to ensure that these updates are thoroughly tested and don't introduce any regressions or compatibility issues.
- API Changes: The code has been modified to use the new navigation APIs. It's crucial to verify that these changes are correct and that the application's navigation behavior is as expected.
- ListDetailPaneScaffoldScene: The ListDetailPaneScaffoldScene class has been added to handle list-detail layouts. It's important to ensure that this class is well-documented and that its functionality is clear.
- ListDetailSceneStrategy: The ListDetailSceneStrategy class has been updated to use the new navigation APIs. It's crucial to verify that these changes are correct and that the application's navigation behavior is as expected.
Merge Readiness
The pull request updates the navigation library to the latest snapshot and integrates it with material3-adaptive. While the changes seem reasonable, it's important to ensure that the dependency updates are thoroughly tested and don't introduce any regressions or compatibility issues. I am unable to approve this pull request, and users should have others review and approve this code before merging. Given the medium severity comments, I recommend that the pull request not be merged until those are addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It's great we can add a placeholder now.
47e4bbe to
b217132
Compare
|
Please update documentation https://developer.android.com/guide/navigation/navigation-3/get-started |
Updates to use the latest snapshot of navigation3, which moves a couple things around. This also uses the latest prototype from the WIP integration with material3-adaptive.