Repository navigation
[Swift][Android][Bug]: Notify dismissal after checkout presentation closes - #932
Draft
kieran-osgood-shopify wants to merge 2 commits into
Draft
kieran-osgood-shopify wants to merge 2 commits into
kieran-osgood-shopify wants to merge 2 commits into
Conversation
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
Bundle Size Budgets
Bundle and package sizeWeb bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.
Android package files (uncompressed)These are uncompressed file sizes; they do not sum to the compressed package size above.
How sizes are measuredMeasured from the PR base SHA and PR head SHA. Web bundle rows sum shipped |
2 of 11 tasks
The test drove the real authorization delegate, so presenting the thank-you page called the live Storefront API (cartRemovePersonalData) with SystemClock retry backoff, and then busy-waited on Task.yield for the idle transition. Inject a stub storefront and MockClock, and await the idle transition through an expectation fulfilled by a transition hook. Assisted-By: omp
This branch has not been deployed
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?
Make dismissal report presentation lifecycle consistently on Swift and Android, independently of checkout outcome. This is split out of #757, which only wires accelerated checkout to the existing dismissal callback; nothing here is needed for that wiring.
For Checkout Kit-managed presentations (Swift
CheckoutWebViewController, AndroidCheckoutBottomSheet):onDismiss/checkoutDidDismissfires before the presentation starts closingonFail, then the presentation closes without a dismissal callbackonFail, thenonDismissafter the presentation has closeddismiss(animated:),CheckoutHandle.dismiss())Also:
CheckoutDelegate,CheckoutListener,CheckoutPresentation,ShopifyCheckout.onDismiss,AcceleratedCheckoutButtons.onDismiss, and both platform READMEs that dismissal describes presentation lifecycle, thatonFailprecedesonDismisswhen a failure closes checkout, and that completion does not imply dismissal.The React Native layer in #749 depends on this contract: it treats
closerather thanfailas the end of a presentation.How to test
GIVEN the Swift sample is configured with a storefront and has an item in the cart
WHEN the reviewer taps Check out and then taps the checkout close button
THEN the Xcode console should log
[CheckoutKitSwiftDemo] Dismissedexactly once, after the sheet has finished animating closedGIVEN the Swift sample is configured with a storefront and has an item in the cart
WHEN the reviewer taps Shop Pay and swipes the checkout sheet down
THEN the Xcode console should log
[AcceleratedCheckout] Dismissedexactly onceGIVEN the Android sample is configured with a storefront and has an item in the cart
WHEN the reviewer opens checkout and closes it with the close button, the back gesture, or by dragging the sheet down
THEN the sample's Logs screen should record
Checkout dismissedexactly once per presentationBefore 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.