Repository navigation
[BLOCKED] [RN][Refactor]: Rename React Native dismissal callbacks to onDismiss - #749
kieran-osgood-shopify wants to merge 2 commits into
Conversation
ee08470 to
451880d
Compare
451880d to
1992933
Compare
1992933 to
5c69ccb
Compare
| * Presents the checkout sheet for a given checkout URL. | ||
| * | ||
| * Exactly one of `callbacks.onClose` or `callbacks.onFail` fires per | ||
| * At most one of `callbacks.onDismiss` or `callbacks.onFail` fires per |
There was a problem hiding this comment.
🟡 Before this PR is merged, update checkoutKit.nativeSdkVersions.ios and .android in package.json to 4.0.0-alpha.7 after those native artifacts are published. This lifecycle contract depends on the alpha.7 native dismissal behavior.
5c69ccb to
e6bf5eb
Compare
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.
React Native 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 |
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
e6bf5eb to
5fea736
Compare
Warning
Blocked on #829. This PR describes the intended React Native dismissal behaviour on top of #932, but it does not build against the current native SDKs: the RN bridge still uses native APIs that
mainremoved (ShopifyCheckoutKit.present(…, client:),AcceleratedCheckoutButtons.connect(_:),checkoutDidFail(error:), and Android'sCheckoutProtocol.Clientrelay). #829 ports the bridge to the native lifecycle events and overlaps with this rename. Once #829 merges, rebase this PR, keep only what #829 lacks, and add React Native simulator evidence.What changes are you making?
Closes https://github.com/shop/issues-checkout-kit/issues/1261
Rename the React Native checkout dismissal callbacks to use one public API name:
PresentCallbacks.onClose→onDismissAcceleratedCheckoutButtons.onCancel→onDismissThis is an intentional breaking rename without compatibility aliases. The private native lifecycle event remains
close.Document and test that checkout completion and presentation dismissal are separate events:
CheckoutProtocol.completereports order completion, whileonDismissreports a later buyer dismissal. Programmaticdismiss()invokes neitheronDismissnoronFail.Register accelerated checkout's
onDismissas a direct native event. React Native already reservestopDismissas a direct event for modal dismissal; registering it as bubbling caused an event-type collision and an iOS RedBox during app startup.Update the sample, API report, README, JavaScript tests, and iOS integration coverage.
Before you merge
Important
platforms/react-native/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.