feat(RN): Wire up accelerated checkouts with protocol events#181
Open
kieran-osgood-shopify wants to merge 1 commit into
Conversation
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
11 tasks
| ]} | ||
| cornerRadius={cornerRadius} | ||
| events={{ | ||
| [CheckoutProtocol.start]: checkout => { |
Contributor
Author
There was a problem hiding this comment.
still need to work on the key here - if passing a string literal it accept "ec.start" which I'm not sure we want
might be able to make this an enum instead so it has to be a key
9dbe6eb to
9c2bce2
Compare
7822725 to
34e6ab2
Compare
11 tasks
9c2bce2 to
f77c5ca
Compare
34e6ab2 to
da83ecb
Compare
f77c5ca to
c75d0f4
Compare
da83ecb to
6edc610
Compare
c75d0f4 to
57db8b8
Compare
6edc610 to
9b53f42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stack Context
This stack is adding Checkout Protocol event support to the React Native wrapper. The parent PR introduces the first protocol event (
ec.start) for the imperativepresent()path; this PR wires the same start event into instance-based accelerated checkout buttons.What?
events?: ProtocolHandlersprop toAcceleratedCheckoutButtonsusing computedCheckoutProtocolkeys.[CheckoutProtocol.start].constantsToExportand warns if JS/native event lists drift.Why?
Consumers need to observe checkout protocol events from declarative component instances, not only from
ShopifyCheckout.present(). This keeps the public TypeScript interface consistent across both surfaces while intentionally keeping protocol support scoped toCheckoutProtocol.startfor this PR.How to test
pnpm --dir platforms/react-native/modules/@shopify/checkout-kit-react-native typecheckpnpm --dir platforms/react-native/sample typecheckpnpm --dir platforms/react-native test -- AcceleratedCheckoutButtons.test.tsx --runInBandpnpm --dir platforms/react-native exec jest --runInBandswift test --package-path platforms/react-native/modules/@shopify/checkout-kit-react-native/iosagent-device: tapped the sample cartShop Payaccelerated checkout button and confirmed the[CheckoutProtocol.start]handler ran by observing the checkout start event state during validation.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/CHANGELOG.mdplatforms/swift/README.md(major version only)Releasing a new Android version?
versionNameinplatforms/android/lib/build.gradleplatforms/android/CHANGELOG.mdplatforms/android/README.md