Skip to content

Rename Swift default checkout link action to unhandled - #992

Closed
kiftio wants to merge 1 commit into
mainfrom
rename-link-action-unhandled
Closed

kiftio wants to merge 1 commit into
mainfrom
rename-link-action-unhandled

Conversation

@kiftio

@kiftio kiftio commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rename the default link action to unhandled.
  • Preserve behavior: unhandled means the app did not handle the link, so Checkout Kit uses its normal link-opening behavior.
  • Update the platform API baseline, docs, sample, and major-version release note.

Naming feedback requested

Does unhandled best communicate the fallback path, or would useDefault be clearer? These are the intended client call sites.

Swift

ShopifyCheckout(checkout: checkoutURL)
  .onLinkClick { link in
    if shouldOpenInApp(link) {
      UIApplication.shared.open(link.url)
      return .handled
    }

    return .unhandled // Alternative under consideration: .useDefault
  }

Android

ShopifyCheckoutKit.present(checkoutUrl, activity) {
    onLinkClick { link ->
        if (shouldOpenInApp(link)) {
            activity.startActivity(Intent(Intent.ACTION_VIEW, link.url))
            CheckoutLinkAction.Handled
        } else {
            CheckoutLinkAction.Unhandled // Alternative: UseDefault
        }
    }
}

React Native

React Native selects a policy before presentation; onLinkClick is a notification rather than a synchronous return value.

// Let the native SDK use its normal link-opening behavior.
shopify.present(checkoutUrl, {
  linkAction: 'unhandled', // Alternative under consideration: 'useDefault'
});

// Or, take responsibility for opening/routing every link notification.
shopify.present(checkoutUrl, {
  linkAction: 'handled',
  onLinkClick: ({url}) => Linking.openURL(url),
});

Validation

  • Platform formatting
  • Platform API baseline dump
  • Platform test suite

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Oct 19, 2026
@kiftio
kiftio force-pushed the rename-link-action-unhandled branch from 1afe114 to 207b286 Compare October 19, 2026 14:05
@kiftio kiftio changed the title Rename default checkout link action to unhandled Rename Swift default checkout link action to unhandled Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Bundle Size Budgets

Budget Size Limits Result
— — — ➖ No configured budgets affected

Bundle and package size

Web bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.

Platform Measurement Compression Base Head Delta
- - - - - -
How sizes are measured

Measured from the PR base SHA and PR head SHA. Web bundle rows sum shipped .js, .mjs, and .cjs files under dist/, excluding source maps and declarations. The gzip bundle size sums files compressed individually with gzip -n -9. npm package sizes are gzip-compressed .tgz archives; Android AAR sizes are ZIP archives. Package sizes are not final app binary sizes.

@kiftio

kiftio commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Closing this draft.

@kiftio kiftio closed this Oct 19, 2026
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.

1 participant