Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 6e48495cd4bf5a0af6747eea45b2cd49128ffcb2
Author: Levi Albuquerque <levima@google.com>
Date: Tue Aug 16 15:12:46 2022
Fix fling animation cancellation issue
Test: Add tests to verify behavior
Fixes: 179417109
Fixes: 175010956
Change-Id: Ic31ab56737b410b09c33c9e1c158697fe8d259de
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
https://android-review.googlesource.com/2186211
Branch: androidx-main
commit 6e48495cd4bf5a0af6747eea45b2cd49128ffcb2
Author: Levi Albuquerque <levima@google.com>
Date: Tue Aug 16 15:12:46 2022
Fix fling animation cancellation issue
Test: Add tests to verify behavior
Fixes: 179417109
Fixes: 175010956
Change-Id: Ic31ab56737b410b09c33c9e1c158697fe8d259de
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
na...@google.com <na...@google.com> #3
This bug was linked in a change in the following release(s):
androidx.compose.foundation:foundation:1.3.0-beta03
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 418f3a6588d2384e49d996cebcb2d5678ceeb3ea
Author: Levi Albuquerque <levima@google.com>
Date: Mon Feb 12 16:23:19 2024
Click on moving list initial issue
Due to an early fix we were prioritizing continuing the scroll of nested lists in any direction when taping on a parent list. The actual intended behavior was to consider nested children that scroll -on the same direction- if the click happened on the said child. In this CL I'm reverting those changes as we will revisit the nested scrolling UX and there will be more benefits to having the original behavior without the issues the fix introduced.
Test: Added test to check behavior.
Relnote: N/A
Fixes: 293777304
Fixes: 289685606
Fixes: 296064317
Bug: 175010956
Bug: 179417109
Change-Id: Ia71ed02e06603c6c27ad4648cfc8e32587397d63
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
https://android-review.googlesource.com/2957875
Branch: androidx-main
commit 418f3a6588d2384e49d996cebcb2d5678ceeb3ea
Author: Levi Albuquerque <levima@google.com>
Date: Mon Feb 12 16:23:19 2024
Click on moving list initial issue
Due to an early fix we were prioritizing continuing the scroll of nested lists in any direction when taping on a parent list. The actual intended behavior was to consider nested children that scroll -on the same direction- if the click happened on the said child. In this CL I'm reverting those changes as we will revisit the nested scrolling UX and there will be more benefits to having the original behavior without the issues the fix introduced.
Test: Added test to check behavior.
Relnote: N/A
Fixes: 293777304
Fixes: 289685606
Fixes: 296064317
Bug: 175010956
Bug: 179417109
Change-Id: Ia71ed02e06603c6c27ad4648cfc8e32587397d63
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit b8a0ca7770206de4ebae3facb5005be9b2c972ba
Author: Levi Albuquerque <levima@google.com>
Date: Thu Sep 12 11:12:29 2024
Update the fling cancellation behavior in Scrollables.
Now in Scrollables, the fling will no longer be driven by the inner most scrollable child, but rather each Scrollable will re-start the fling with the remaining velocity when the inner scrollable hits the bounds. The scope used to launch the fling animation will be the local Scrollable Node scope.
Because this is a behavior change, we are introducing with the flag NestedFlingCancellationBehavior. From the perspective of a regular Scrollable nothing should change and this will only affect nested scrollables.
Test: Added additional tests in ScrollableTest to verify the new behavior.
Bug: 332677564
Bug: 316683578
Bug: 303224944
Fixes: 175010956
Fixes: 260129627
Relnote: N/A
Change-Id: I9326ad40271d77d6b2f8038c6fb9eb313873d8b6
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/SnapFlingBehaviorTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/ComposeFoundationFlags.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapFlingBehavior.kt
A compose/foundation/foundation/src/commonStubsMain/kotlin/androidx/compose/foundation/gestures/Scrollable.commonStubs.kt
A compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/gestures/Scrollable.jvm.kt
https://android-review.googlesource.com/3260391
Branch: androidx-main
commit b8a0ca7770206de4ebae3facb5005be9b2c972ba
Author: Levi Albuquerque <levima@google.com>
Date: Thu Sep 12 11:12:29 2024
Update the fling cancellation behavior in Scrollables.
Now in Scrollables, the fling will no longer be driven by the inner most scrollable child, but rather each Scrollable will re-start the fling with the remaining velocity when the inner scrollable hits the bounds. The scope used to launch the fling animation will be the local Scrollable Node scope.
Because this is a behavior change, we are introducing with the flag NestedFlingCancellationBehavior. From the perspective of a regular Scrollable nothing should change and this will only affect nested scrollables.
Test: Added additional tests in ScrollableTest to verify the new behavior.
Bug: 332677564
Bug: 316683578
Bug: 303224944
Fixes: 175010956
Fixes: 260129627
Relnote: N/A
Change-Id: I9326ad40271d77d6b2f8038c6fb9eb313873d8b6
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/SnapFlingBehaviorTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/ComposeFoundationFlags.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapFlingBehavior.kt
A compose/foundation/foundation/src/commonStubsMain/kotlin/androidx/compose/foundation/gestures/Scrollable.commonStubs.kt
A compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/gestures/Scrollable.jvm.kt
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha03
androidx.compose.foundation:foundation-android:1.8.0-alpha03
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha03
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha03
Description
When doing nested flinging, we need to do it in a way that will cause best UX: without broken fling curves that will be caused by each parent flinging by itself with velocity left.
This means that we need to continue flinging by the initiated child and notify about deltas with
NestedScrollSource.Fling
. This logic is ready in the generic nested scroll APIs, we need to support it inModifier.scrollable
.The complication is that we need to make sure child stops sending over anything when we "catch" any parent with the finger. This means that we need to understand that there's a fling ongoing in the child so we could start dragging on touch down without slop in the parent.
It's not all that easy hence a separate bug. It should be mostly
Modifier.scrollable
work because I already added necessary bits in theNestedScrollConnection
APIs.