Skip to content

[ReactNative] Upgrade to alpha.3 native sdks - adds loglevel / colorscheme changes - #484

Merged
kieran-osgood-shopify merged 1 commit into
mainfrom
kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties
Aug 6, 2026
Merged

[ReactNative] Upgrade to alpha.3 native sdks - adds loglevel / colorscheme changes #484
kieran-osgood-shopify merged 1 commit into
mainfrom
kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

This is just an update PR for React Native library to match the Swift and Android recent changes

  • color scheme no longer has a web theme by default
  • log level so that we are unified to debug, warn, error, and none.
  • Errors are now flattened in the native side to no longer be enums
  • renamed cancel -> dismissed, e.g. onCancel -> onDismiss

Colour scheme verification — React Native alpha.3

I did detect some issues with colors but they appear to predate this sdk over to v3 and I'm following up here: https://app.graphite.com/github/pr/Shopify/checkout-kit/597/fix(react-native)-always-assign-checkout-colors-on-setConfig with a full fix, however testing on this branch shows we are properly mapping the themes over

iOS

Light Dark Storefront Automatic
light dark storefront simulator_screenshot_73DF7F8F-C848-409C-BBF2-212D93F2DC59

Android

Light Dark Storefront Automatic
light dark storefront image

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

kieran-osgood-shopify commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@kieran-osgood-shopify kieran-osgood-shopify changed the title feat: update react-native to use new native color scheme properties [ReactNative] Upgrade to alpha.3 native sdks - adds loglevel / colorscheme changes Jul 16, 2026
@kieran-osgood-shopify
kieran-osgood-shopify marked this pull request as ready for review July 16, 2026 11:38
@kieran-osgood-shopify
kieran-osgood-shopify requested a review from a team as a code owner July 16, 2026 11:38
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.64% (307/335) 88.88% (176/198) 100% (81/81)

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
React Native npm tarball 103.1 KiB 101.5 KiB -1.6 KiB
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 13.5 KiB -1.5 KiB
ios/AcceleratedCheckoutButtons.swift 14.0 KiB 14.1 KiB +1 B
lib/commonjs/index.js 13.1 KiB 12.3 KiB -852 B
src/components/AcceleratedCheckoutButtons.tsx 12.9 KiB 13.0 KiB +94 B
android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java 11.1 KiB 12.6 KiB +1.5 KiB
src/index.ts 12.5 KiB 12.2 KiB -289 B
lib/commonjs/components/AcceleratedCheckoutButtons.js 11.4 KiB 11.4 KiB +69 B
lib/module/index.js 10.4 KiB 10.2 KiB -234 B
lib/commonjs/components/AcceleratedCheckoutButtons.js.map 10.3 KiB 10.4 KiB +82 B
lib/module/components/AcceleratedCheckoutButtons.js 10.2 KiB 10.2 KiB +68 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 +71 B
src/index.d.ts 8.9 KiB 9.0 KiB +128 B
lib/module/index.js.map 8.2 KiB 7.9 KiB -286 B
src/present-dispatcher.ts 8.0 KiB 8.0 KiB -59 B
lib/commonjs/index.js.map 7.7 KiB 7.7 KiB -36 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 16, 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
React Native Install with Tophat

Checkout Kit E2E results

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

@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the add-android-runtime-title-method branch from 4c7c337 to b8fe149 Compare July 16, 2026 11:50
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from 31b40ea to 2063598 Compare July 16, 2026 11:50
@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from add-android-runtime-title-method to graphite-base/484 July 16, 2026 14:07
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from 2063598 to f5d8a51 Compare July 16, 2026 14:07
@graphite-app
graphite-app Bot changed the base branch from graphite-base/484 to main July 16, 2026 14:08
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from f5d8a51 to d55527a Compare July 16, 2026 14:08
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch 2 times, most recently from 424de14 to 80eb817 Compare August 3, 2026 14:32
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from 80eb817 to f6e022b Compare August 5, 2026 09:52
| GenericError
| InternalError;

export function parseCheckoutError(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary wrapper now

@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from f6e022b to b190898 Compare August 6, 2026 10:01
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from b190898 to caaee4a Compare August 6, 2026 13:04
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch from caaee4a to 1dc6b16 Compare August 6, 2026 13:12

public class ShopifyCheckoutKitModule extends NativeShopifyCheckoutKitSpec {

/** The JavaScript name for {@link CheckoutAppearance.Storefront}, which has no native id. */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other keys extend ColorScheme so we use getId() but the storefront is not modeled as such, may be able to rework this in future to remove this manual element

@markmur markmur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It would nice to have some CheckoutException parsing in the sample app to see how consumers should expect to do this now

this.code = getCheckoutErrorCode(exception?.code);
this.message = exception?.message;
this.name = this.constructor.name;
this.message = exception?.message ?? '';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want a better fallback here

Suggested change
this.message = exception?.message ?? '';
this.message = exception?.message ?? 'Unexpected error';

or

Suggested change
this.message = exception?.message ?? '';
this.message = exception?.message ?? 'Unknown error';

kieran-osgood-shopify commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@kieran-osgood-shopify
kieran-osgood-shopify merged commit d48982a into main Aug 6, 2026
33 checks passed
@kieran-osgood-shopify
kieran-osgood-shopify deleted the kieran-osgood/07-16-featupdatereact-nativetousenewnativecolorschemeproperties branch August 6, 2026 17:21

Copy link
Copy Markdown
Contributor Author

@markmur agree - setting up a pr to add handling of the error and updating readme to be comprehensive on the error codes

kieran-osgood-shopify added a commit that referenced this pull request Aug 7, 2026
### What changes are you making?

`dev rn test ios` had no way to run against the in-repo `platforms/swift` sources, so it always resolved the released pod. Add a `--local` flag, matching `dev rn ios --local`.

`--local` sets `USE_LOCAL_SDK=1`, which the integration app `Podfile` already reads, then runs `pod update` on the two Checkout Kit pods instead of `pod install`. `pod install` would reuse the lockfile pin and ignore the local path.

### How to test

```
dev rn test ios --local
```

Stacked on #484.

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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