[Kotlin]: disable drag handle during .present() - #601
Draft
kieran-osgood-shopify wants to merge 1 commit into
Draft
[Kotlin]: disable drag handle during .present() #601kieran-osgood-shopify wants to merge 1 commit into
.present() #601kieran-osgood-shopify wants to merge 1 commit into
Conversation
…tion ### TLDR A tap during the 260 ms open animation left the checkout sheet frozen part way up the screen. It never reached full height, and it never settled back. ### What `resetGesture` and `startScrollableChildGesture` both call `animate().cancel()` on `ACTION_DOWN`, and the partial `translationY` then becomes a permanent top offset. A tap that never passes `touchSlop` ends with only `performClick()`, so nothing settles the sheet open again. `CheckoutBottomSheetLayout` now tracks `openAnimationRunning` beside the existing `dismissAnimationRunning`, and `canHandleDragToDismiss` requires both to be false. Touches during opening pass straight through to checkout content. `withEndAction` clears the flag, and it also runs on cancel, so the flag cannot stick. `canHandleDragToDismiss` gates all four gesture entry points, so this one getter change covers every path. The new field is private, so `lib/api/lib.api` does not move. ### How to test Open checkout in the Kotlin sample, then tap the sheet about 120 ms after it starts to open. The measurement below is the screen row of the sheet top edge, where 216 is fully open on the test display. | Round | Before | After | | --- | --- | --- | | 1 | 451 | 216 | | 2 | 812 | 216 | | 3 | 387 | 216 | `CheckoutBottomSheetTest.kt` adds two cases: the sheet reaches the fully open position after a tap during the open animation, and drag to dismiss still works once that animation completes. Robolectric completes a `ViewPropertyAnimator` on the first looper idle regardless of duration, so the first test asserts from the state immediately after `animateIn()` rather than by advancing the clock. Assisted-By: devx/c27c154c-e79d-4f1f-9300-c3258c6f34f9
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Aug 6, 2026
.present()
kiftio
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changes are you making?
If a user is tapping the checkout button it's possible they'd accidentally grab the sheet and have it open at a height that wasn't an intentional snap point
Adding a guard when initial open animation is in progress to hold back a user from being able to user drag handle
Screen Recording 2026-08-06 at 12.14.21.mov (uploaded via Graphite)
Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.