-
Notifications
You must be signed in to change notification settings - Fork 108
Update Navigation 3 library #160
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 @sashalukin, 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 Navigation 3 library to version 1.0.0-SNAPSHOT and integrates the adaptive navigation components. This includes adding the adaptive navigation dependency, updating the maven repository URL to the latest snapshot build, and refactoring the Main.kt
file to use the new adaptive navigation APIs. The custom ListDetailPaneScaffoldSceneStrategy
has been removed, replaced by the library's implementation.
Highlights
- Navigation 3 Library Update: The Navigation 3 library is updated to version 1.0.0-SNAPSHOT, providing the latest features and fixes.
- Adaptive Navigation Integration: The pull request integrates adaptive navigation components, allowing the app to adapt to different screen sizes and form factors.
- Code Refactoring: The
Main.kt
file is refactored to use the new adaptive navigation APIs, improving code readability and maintainability. The customListDetailPaneScaffoldSceneStrategy
is removed.
Changelog
Click here to see the changelog
- app/build.gradle.kts
- Added implementation dependency for
androidx.navigation3.adaptive
.
- Added implementation dependency for
- app/src/main/java/com/google/android/samples/socialite/ui/Main.kt
- Added imports for
ListDetailPaneScaffoldSceneStrategy
andrememberListDetailSceneStrategy
fromandroidx.compose.material3.adaptive.navigation3
. - Removed imports for custom
ListDetailPaneScaffoldSceneStrategy
andrememberListDetailSceneStrategy
fromcom.google.android.samples.socialite.ui.navigation
. - Replaced
ListDetailPaneScaffoldSceneStrategy.listPaneMetadata()
withListDetailPaneScaffoldSceneStrategy.listPane()
. - Replaced
ListDetailPaneScaffoldSceneStrategy.detailPaneMetadata()
withListDetailPaneScaffoldSceneStrategy.detailPane()
.
- Added imports for
- com/google/android/samples/socialite/ui/navigation/ListDetailPaneScaffoldScene.kt
- Removed the file as the functionality is now provided by the updated Navigation 3 library.
- com/google/android/samples/socialite/ui/navigation/ListDetailPaneScaffoldSceneStrategy.kt
- Removed the file as the functionality is now provided by the updated Navigation 3 library.
- gradle/libs.versions.toml
- Updated
navigation3
version to1.0.0-SNAPSHOT
. - Added
androidx-navigation3-adaptive
library with versionnavigation3
.
- Updated
- settings.gradle.kts
- Updated maven repository URL to the latest snapshot build
13489476
.
- Updated maven repository URL to the latest snapshot build
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 library's update,
Brings features anew and great,
Code adapts with grace.
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 3 library and introduces adaptive navigation components. The changes seem well-structured and aim to improve the app's responsiveness on different screen sizes. However, there are a few areas that could be improved for clarity and consistency.
Summary of Findings
- Deprecated methods: The methods
listPaneMetadata()
anddetailPaneMetadata()
are deprecated and should be replaced withlistPane()
anddetailPane()
respectively. - Unused imports: There are unused imports in
Main.kt
that should be removed to improve code clarity. - Snapshot build verification: The snapshot build number in
settings.gradle.kts
has been updated. Ensure that this is the correct and most recent snapshot required for the Navigation 3 library.
Merge Readiness
The pull request introduces important updates to the Navigation 3 library. Before merging, ensure that the deprecated methods are replaced, unused imports are removed, and the snapshot build number is verified. I am unable to approve this pull request, and recommend that others review and approve this code before merging. At a minimum, the high severity issues should be addressed before merging.
@@ -54,7 +54,7 @@ secrets = "2.0.1" | |||
generativeai = "0.9.0" | |||
datastore = "1.1.4" | |||
lifecycleViewmodel = "1.0.0-SNAPSHOT" | |||
navigation3 = "0.1.0-SNAPSHOT" | |||
navigation3 = "1.0.0-SNAPSHOT" |
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.
@@ -21,7 +21,7 @@ pluginManagement { | |||
gradlePluginPortal() | |||
maven { | |||
// Currently need to use a snapshot build to get Navigation 3 library | |||
url = uri("https://androidx.dev/snapshots/builds/13467503/artifacts/repository") | |||
url = uri("https://androidx.dev/snapshots/builds/13489476/artifacts/repository") |
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.
@@ -33,7 +33,7 @@ dependencyResolutionManagement { | |||
google() | |||
mavenCentral() | |||
maven { | |||
url = uri("https://androidx.dev/snapshots/builds/13467503/artifacts/repository") | |||
url = uri("https://androidx.dev/snapshots/builds/13489476/artifacts/repository") |
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.
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.
Looks good other than the two version naming things
@@ -125,6 +125,7 @@ generativeai = { group = "com.google.ai.client.generativeai", name = "generative | |||
datastore = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "datastore"} | |||
androidx-lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "lifecycleViewmodel" } | |||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodel" } | |||
androidx-navigation3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive-navigation3", version.ref = "navigation3" } |
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.
Since this is under the androidx.compose.material3.adaptive
group, I'd probably have the library name be adaptive-navigation3
@@ -54,7 +54,7 @@ secrets = "2.0.1" | |||
generativeai = "0.9.0" | |||
datastore = "1.1.4" | |||
lifecycleViewmodel = "1.0.0-SNAPSHOT" | |||
navigation3 = "0.1.0-SNAPSHOT" | |||
navigation3 = "1.0.0-SNAPSHOT" |
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.
I think we should have a new version number for adaptive-navigation3
, I don't think there's any guarantee it will match the navigation3
version number.
Will update the versioning info in a follow-up PR |
No description provided.