Repository navigation
[RN][Bug]: Unify RN color handling - #597
kieran-osgood-shopify wants to merge 1 commit into
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
|
||
| const updatedColors = getColors( | ||
| appConfig.colorScheme, | ||
| Appearance.getColorScheme(), |
There was a problem hiding this comment.
this was a non-reactive value meaning it didn't trigger re-renders when system color scheme changed
486c85a to
76494fb
Compare
368df42 to
9f18066
Compare
Replace the React Native `colorScheme` and top-level `colors` settings with
`appearance`, mirroring the Swift and Android `CheckoutAppearance`:
`{type: app, colorScheme?, colors?}` or `{type: storefront, colors?}`.
`ColorScheme` is now only automatic, light and dark, and both platforms
use the native color names.
Each `setConfig` with an `appearance` replaces it wholesale on both
bridges, so omitted colors fall back to the native defaults instead of
keeping the colors from an earlier scheme. `getConfig` returns
`appearance` and no longer serializes colors.
The iOS bridge now calls `ShopifyCheckoutKit.configure` on the main actor,
which the Swift SDK requires; the new architecture can create the module
off the main thread.
Closes shop/issues-checkout-kit#1260
9f18066 to
b57c44a
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 |

What am I fixing
Closes: https://github.com/shop/issues-checkout-kit/issues/1260
lightdark&storefront.Simulator Screen Recording - iPhone 15 Pro - 2026-08-06 at 13.33.22.mov (uploaded via Graphite)
How
Stacked on #970, which gives the Swift SDK the same
CheckoutAppearance/ColorScheme/Colorsmodel as Android. React Native now uses that model on both platforms instead of its owncolorScheme+colorssettings.setConfigincluded that key.ShopifyCheckoutKit.configurationis process-wide, so an omitted key kept the previous value, andautomaticandstorefrontinherited the last light or dark background.setConfigwith anappearancereplaces it wholesale on both bridges (CheckoutAppearanceConfiguration.swift/.kt). Omitted colors fall back to the native defaults for that appearance.colorSchemewith astorefrontcase plus a separate top-levelcolorskey. Native hasappearance, where storefront is its own appearance andColorSchemeis only light, dark or automatic.appearance: {type: CheckoutAppearanceType.app, colorScheme?, colors?}or{type: CheckoutAppearanceType.storefront, colors?}replacescolorSchemeandcolors.ColorScheme.storefrontis removed.getConfig()returnsappearanceand no longer returns colors.webViewBackground,headerBackground,headerFont,progressIndicator,closeIconTint,headerBorderColor(plusdragHandleColoron Android).The README has a migration table from the old keys. The sample app's Settings now has an Appearance section (Storefront / App automatic / App light / App dark), matching the Swift sample.
React Native CI resolves published native SDKs, so iOS CI stays red until a Swift release containing #970 is published and pinned. Test locally with
dev rn ios --local.How to test
Review the test video above and perform similar steps, alternating the theme toggle in settings and opening checkout, we should retain good contrast and match theme for the background color of the webview, the header, the title, and the close icon.
You can toggle the shortcut on simulator (ios) with cmd+shift+A - android doesn't have a keyboard shortcut but you can find it in the system tray
Before you merge
Important
platforms/react-native/README.md)🤖 Generated with Claude Code