Skip to content

[ReactNative] Rename oncancel to ondismiss in swift and android#483

Open
kiftio wants to merge 1 commit into
graphite-base/483from
use_onDismiss_rather_than_onCancel_in_react-native
Open

[ReactNative] Rename oncancel to ondismiss in swift and android#483
kiftio wants to merge 1 commit into
graphite-base/483from
use_onDismiss_rather_than_onCancel_in_react-native

Conversation

@kiftio

@kiftio kiftio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Renames the checkout cancellation callback to better reflect its intent across both platforms:

  • Android: onCheckoutCanceled()onCheckoutDismissed() in CustomCheckoutListener
  • iOS: checkoutDidCancel()checkoutDidDismiss() in the CheckoutDelegate extension
  • Updates the TypeScript type definition comment to reference DefaultCheckoutListener.onCheckoutDismissed instead of DefaultCheckoutEventProcessor.onCheckoutCanceled

The rename aligns the naming convention with the underlying SDK's terminology, making it clearer that this event fires when the buyer dismisses the checkout sheet (e.g. tapping the close button) rather than implying the buyer explicitly cancelled their purchase.

How to test

  1. Present a checkout sheet on both Android and iOS.
  2. Dismiss the checkout sheet by tapping the close button.
  3. Verify the onClose callback fires as expected on both platforms.
  4. Run the Android unit tests in ShopifyCheckoutKitModuleTest and confirm all tests pass.
  5. Run the iOS integration tests in ShopifyCheckoutKitTests and confirm testCheckoutDidDismissDismissesCheckoutSheetFromRCTWrapper passes.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 16, 2026

kiftio commented Jul 16, 2026

Copy link
Copy Markdown
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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kiftio kiftio changed the title Rename oncancel to ondismiss in swift and android [ReactNative] Rename oncancel to ondismiss in swift and android Jul 16, 2026
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from b341fdf to 39006d4 Compare July 16, 2026 11:21
@kiftio
kiftio force-pushed the use_onDismiss_rather_than_onCancel_in_react-native branch from f1316ee to 19a21c1 Compare July 16, 2026 11:21
@kiftio
kiftio changed the base branch from 07-16-rename_oncancel_to_ondismiss_in_swift_and_android to graphite-base/483 July 16, 2026 12:09
@kiftio
kiftio force-pushed the use_onDismiss_rather_than_onCancel_in_react-native branch from 19a21c1 to 809c8b0 Compare July 16, 2026 12:09
@kiftio
kiftio changed the base branch from graphite-base/483 to 07-16-updates_accelerated_checkouts_to_use_ondismiss July 16, 2026 12:09
@kiftio
kiftio force-pushed the use_onDismiss_rather_than_onCancel_in_react-native branch from 809c8b0 to ba83ff8 Compare July 16, 2026 12:25
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from e828251 to 1658436 Compare July 16, 2026 12:25
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from 1658436 to 80afddb Compare July 16, 2026 12:51
@kiftio
kiftio force-pushed the use_onDismiss_rather_than_onCancel_in_react-native branch from ba83ff8 to e9351f0 Compare July 16, 2026 12:51
@kiftio
kiftio marked this pull request as ready for review July 17, 2026 09:37
@kiftio
kiftio requested a review from a team as a code owner July 17, 2026 09:37
@github-actions

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.85% (327/356) 87.98% (183/208) 100% (86/86)

@github-actions

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
React Native npm tarball 103.1 KiB 103.1 KiB +5 B
React Native file breakdown
File Base Head Delta
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.ts 85.4 KiB 85.4 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.d.ts 53.0 KiB 53.0 KiB 0 B
ios/ShopifyCheckoutKit.swift 15.0 KiB 15.0 KiB +2 B
ios/AcceleratedCheckoutButtons.swift 14.0 KiB 14.0 KiB 0 B
lib/commonjs/index.js 13.1 KiB 13.1 KiB 0 B
src/components/AcceleratedCheckoutButtons.tsx 12.9 KiB 12.9 KiB 0 B
src/index.ts 12.5 KiB 12.5 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js 11.4 KiB 11.4 KiB 0 B
android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java 11.1 KiB 11.1 KiB 0 B
lib/module/index.js 10.4 KiB 10.4 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js.map 10.3 KiB 10.3 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js 10.2 KiB 10.2 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.ts 9.5 KiB 9.5 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js.map 9.1 KiB 9.1 KiB 0 B
src/index.d.ts 8.9 KiB 8.9 KiB -5 B
lib/module/index.js.map 8.2 KiB 8.2 KiB 0 B
src/present-dispatcher.ts 8.0 KiB 8.0 KiB 0 B
lib/commonjs/index.js.map 7.7 KiB 7.7 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.d.ts 7.6 KiB 7.6 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolRenameMap.ts 7.2 KiB 7.2 KiB 0 B
…and 110 smaller files

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Jul 17, 2026

Copy link
Copy Markdown

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device

Warning

Expected 2 runs, received 0 — 2 did not report. Missing runs count as failures until every run reports.

@kiftio
kiftio changed the base branch from 07-16-updates_accelerated_checkouts_to_use_ondismiss to graphite-base/483 July 17, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants