10000 Update Navigation 3 library by sashalukin · Pull Request #160 · android/socialite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
May 16, 2025
Merged

Conversation

sashalukin
Copy link

No description provided.

Copy link
@gemini-code-assist gemini-code-assist bot left a 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 custom ListDetailPaneScaffoldSceneStrategy is removed.

Changelog

Click here to see the changelog
  • app/build.gradle.kts
    • Added implementation dependency for androidx.navigation3.adaptive.
  • app/src/main/java/com/google/android/samples/socialite/ui/Main.kt
    • Added imports for ListDetailPaneScaffoldSceneStrategy and rememberListDetailSceneStrategy from androidx.compose.material3.adaptive.navigation3.
    • Removed imports for custom ListDetailPaneScaffoldSceneStrategy and rememberListDetailSceneStrategy from com.google.android.samples.socialite.ui.navigation.
    • Replaced ListDetailPaneScaffoldSceneStrategy.listPaneMetadata() with ListDetailPaneScaffoldSceneStrategy.listPane().
    • Replaced ListDetailPaneScaffoldSceneStrategy.detailPaneMetadata() with ListDetailPaneScaffoldSceneStrategy.detailPane().
  • 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 to 1.0.0-SNAPSHOT.
    • Added androidx-navigation3-adaptive library with version navigation3.
  • settings.gradle.kts
    • Updated maven repository URL to the latest snapshot build 13489476.
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

  1. 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.

Copy link
@gemini-code-assist gemini-code-assist bot left a 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() and detailPaneMetadata() are deprecated and should be replaced with listPane() and detailPane() 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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Updating the navigation3 version from 0.1.0-SNAPSHOT to 1.0.0-SNAPSHOT is a significant change. Ensure that all dependencies and usages are compatible with this new version.

@@ -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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The snapshot build number is updated. Verify that this is the correct and most recent snapshot required for the Navigation 3 library.

@@ -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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The snapshot build number is updated. Verify that this is the correct and most recent snapshot required for the Navigation 3 library.

Copy link
@alexvanyo alexvanyo left a 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" }

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"

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.

@alexvanyo
Copy link

Will update the versioning info in a follow-up PR

@alexvanyo alexvanyo merged commit 468cb50 into android:p-and-d May 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0