Skip to content

[Android][Swift] Rename oncancel to ondismiss in swift and android - #482

Merged
kiftio merged 1 commit into
mainfrom
07-16-rename_oncancel_to_ondismiss_in_swift_and_android
Jul 17, 2026
Merged

[Android][Swift] Rename oncancel to ondismiss in swift and android#482
kiftio merged 1 commit into
mainfrom
07-16-rename_oncancel_to_ondismiss_in_swift_and_android

Conversation

@kiftio

@kiftio kiftio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Renames the "cancel" terminology to "dismiss" across the Android and Swift SDKs to better reflect the user action of dismissing the checkout sheet rather than cancelling a transaction. This is particularly relevant when the buyer dismisses on the thank you page after a completed order.

**Note** Accelerated chekouts keeps onCancelin this PR, that's happening in the next PR

Specifically:

  • Android: CheckoutListener.onCheckoutCanceled()onCheckoutDismissed(), CheckoutPresentation.onCancel {}onDismiss {}, and all internal tracking variables (cancelNotifieddismissNotified), log messages, and helper methods (notifyCheckoutCancelednotifyCheckoutDismissed, cancelAfterSheetDismissAnimationdismissAfterSheetDismissAnimation) updated accordingly. CheckoutHostConfiguration.onCancelRequestonDismissRequest.
  • Swift: CheckoutDelegate.checkoutDidCancel()checkoutDidDismiss(), ShopifyCheckout.onCancel {}onDismiss {}, and the internal onCancelAction/onCancel wiring updated throughout CheckoutViewController and CheckoutWebViewController. Swift API surface JSON updated to reflect the renamed symbols.
  • Sample apps and tests: All references to canceled/cancellation updated to dismissed/dismissal, including test names, assertion variables, log messages ("Checkout canceled""Checkout dismissed"), and internal log context helpers (isCheckoutCancellationisCheckoutDismissal, completedCheckoutIdForFollowUpCancellationcompletedCheckoutIdForFollowUpDismissal).

How to test

  1. Present a checkout sheet on Android and dismiss it via the close button, back gesture, outside tap, and swipe-down gesture — confirm onDismiss is invoked exactly once in each case.
  2. Present a checkout sheet on iOS and dismiss it via the close button and swipe-down gesture — confirm checkoutDidDismiss() is called in each case.
  3. Verify that onFail / checkoutDidFail is not triggered on a normal dismissal.
  4. Run the existing unit and integration test suites on both platforms and confirm all tests pass.
  5. Build and run the Android and Swift sample apps and confirm checkout dismissal is logged as "Checkout dismissed".

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

@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch 2 times, most recently from 2bebe9a to b341fdf Compare July 16, 2026 11:10
@kiftio kiftio changed the title Rename oncancel to ondismiss in swift and android [Android][Swift] 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 marked this pull request as ready for review July 16, 2026 12:11
@kiftio
kiftio requested a review from a team as a code owner July 16, 2026 12:11
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 39006d4 to 4a5a483 Compare July 16, 2026 12:25
@github-actions

github-actions Bot commented Jul 16, 2026

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

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Android release AAR 246.4 KiB 246.5 KiB +114 B
Android file breakdown
File Base Head Delta
classes.jar 260.6 KiB 260.7 KiB +105 B
res/layout/checkout_view_content.xml 2.2 KiB 2.2 KiB 0 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.2 KiB 1.2 KiB 0 B
R.txt 1.1 KiB 1.1 KiB 0 B
proguard.txt 798 B 798 B 0 B
AndroidManifest.xml 578 B 578 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

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.

@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch 2 times, most recently from 147c9c4 to 2a90c2d Compare July 17, 2026 13:02
@bitrise

bitrise Bot commented Jul 17, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
Swift Install with Tophat
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
tests/shared/launch-smoke.yaml kotlin android latest Google Pixel 9
Android 17.0
tests/shared/launch-smoke.yaml swift ios latest iPhone 15
iOS 27 Beta

@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 2a90c2d to 79ed94c Compare July 17, 2026 13:24
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 79ed94c to 5f70cee Compare July 17, 2026 14:51

kiftio commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 17, 4:08 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 17, 4:08 PM UTC: @kiftio merged this pull request with Graphite.

@kiftio
kiftio merged commit e70181b into main Jul 17, 2026
37 checks passed
@kiftio
kiftio deleted the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch July 17, 2026 16:08
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.

3 participants