Status Update
Comments
jo...@google.com <jo...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Jeremy Woods <
Link:
Add @CheckResult annotation to generated Action functions
Expand for full commit details
Add @CheckResult annotation to generated Action functions
Adding the check result annotation to the Action functions and methods
generated by safeargs to ensure that developers actually use the
functions.
RelNote: "Navigation Safe Args actions are now generated with the
`@CheckResult` annotation to ensure they are used."
Test: modified all tests
Bug: 356323084
Change-Id: I14d4c00fe8fc0e994b962776e1f10b4a8a63ece4
Files:
- M
navigation/navigation-safe-args-generator/build.gradle
- M
navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
- M
navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaTypes.kt
- M
navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/kotlin/KotlinNavWriter.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/LongPackageFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/SanitizedMainFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/FunFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/LongPackageFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/MainFragmentDefaultParamDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/MainFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested/LoginDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested/LoginFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested/MainFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested/RegisterFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_overridden_action/MainFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_same_action/MainFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_same_action/SettingsDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/java/nested_same_action/SettingsFragmentDirections.java
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested/LoginDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested/LoginFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested/MainFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested/RegisterFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/MainFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_same_action/MainFragmentDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_same_action/SettingsDirections.kt
- M
navigation/navigation-safe-args-generator/src/test/test-data/expected/nav_generator_test/kotlin/nested_same_action/SettingsFragmentDirections.kt
Hash: f3d29e5d85c7911cb2909239c6f2b68e974b8804
Date: Wed Feb 05 22:18:16 2025
ch...@gmail.com <ch...@gmail.com> #3
This has been fixed internally and will be available in the Navigation 2.8.7
release.
ap...@google.com <ap...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-safe-args-generator:2.9.0-alpha06
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.7.0-alpha03
androidx.compose.material:material-android:1.7.0-alpha03
androidx.compose.material:material-desktop:1.7.0-alpha03
ha...@nrk.no <ha...@nrk.no> #6
Is this also fixed for material3 ModalBottomSheet
? It's an issue there as well on BOM 2024.04.00
jo...@google.com <jo...@google.com> #7
The M2 issue is tracked in this issue, the M3 issue is tracked in
ha...@nrk.no <ha...@nrk.no> #8
Alright, thanks!
Description
Jetpack Compose component used: compose.material/ModalbottomSheetLayoute
Android Studio Build: Electric Eel 2022.1.1 Build #AI-221.6008.13.2211.9477386
Kotlin version: 1.8.0
Steps to Reproduce or Code Sample to Reproduce:
1. Open a ModalBottomSheetLayout
2. Perform an upwards fling/swipe gesture. The "harder" the fling the more the bottom sheet goes up from the bottom of the screen. See the attached video