Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit d8ae257b1d34561fa4838556c41050b79033a18a
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 28 12:47:31 2024
DeepLink query params now allow {argName} values for String types
For arguments of NavType<String>, arg values that are in the form of curly braces around argument name is now allowed as valid values. For all other types, this value is still considered as invalid (or absent of argument value).
Internal tests have been updated to reflect this new change. To be precise:
1. NavControllerRouteTest.kt - tests that are setup with absence of value were passing values of {argName} with StringType. Since this is no longer processed as absence of value, StringType has been changed to IntArrayType.
2. NavDeepLinkTest - likewise as NavControllerRouteTest.kt, with additional new test to assert that {argName} is invalid for non-String types.
Test: ./gradlew navigation:navigation-common:cC
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 327274038
Relnote: "Query parameters in DeepLink now allows values in the form of curly braces around argument name (i.e. {argName}) as valid values for string-based NavTypes. This contrasts with before where such a value would be considered invalid (or absence of value) for all types."
Change-Id: I183028e2f77d63158a9a567c43da016722397cb8
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDeepLink.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
https://android-review.googlesource.com/2982559
Branch: androidx-main
commit d8ae257b1d34561fa4838556c41050b79033a18a
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 28 12:47:31 2024
DeepLink query params now allow {argName} values for String types
For arguments of NavType<String>, arg values that are in the form of curly braces around argument name is now allowed as valid values. For all other types, this value is still considered as invalid (or absent of argument value).
Internal tests have been updated to reflect this new change. To be precise:
1. NavControllerRouteTest.kt - tests that are setup with absence of value were passing values of {argName} with StringType. Since this is no longer processed as absence of value, StringType has been changed to IntArrayType.
2. NavDeepLinkTest - likewise as NavControllerRouteTest.kt, with additional new test to assert that {argName} is invalid for non-String types.
Test: ./gradlew navigation:navigation-common:cC
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 327274038
Relnote: "Query parameters in DeepLink now allows values in the form of curly braces around argument name (i.e. {argName}) as valid values for string-based NavTypes. This contrasts with before where such a value would be considered invalid (or absence of value) for all types."
Change-Id: I183028e2f77d63158a9a567c43da016722397cb8
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDeepLink.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
jb...@google.com <jb...@google.com> #3
Fixed internally and available in navigation 2.8.0-alpha05
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-common:2.8.0-alpha05
androidx.navigation:navigation-runtime:2.8.0-alpha05
Description
Component used: Navigation
Version used: 2.8.0-beta02
Devices/Android versions reproduced on:
Details
This issue occurs when doing simple navigation using compose navigation to build a stack and then pop items using the back gesture with predictive back.
When a back gesture is in progress, sometimes the predictive back transition animation incorrectly shows the destination that will be popped behind the next destination that will be moved to top of the stack.
This does not seem to occur when the same transitions are triggered without a back gesture, either by device back button, or by programmatically popping the stack.
I haven't narrowed down the exact scenario this does and doesn't occur in, but it has been highly reproducible. See attached recording of the below sample app.
Sample project
https://github.com/MrNope/navigation-compose-animation-zindex-bug-demo
Steps to reproduce in sample project:
Expected result
Actual result