Skip to content

expose fulfilment change in RN#350

Merged
kiftio merged 1 commit into
mainfrom
dk/react-native-fulfilment-change
Jun 26, 2026
Merged

expose fulfilment change in RN#350
kiftio merged 1 commit into
mainfrom
dk/react-native-fulfilment-change

Conversation

@kiftio

@kiftio kiftio commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Adds support for the ec.fulfillment.change protocol event (fulfillmentChange) across the React Native platform and the TypeScript protocol layer.

On the protocol side, fulfillmentChange is added to the generatedCheckoutProtocol map, its payload type (Checkout) is registered in GeneratedCheckoutProtocolPayloads, and a corresponding decoder is wired up. It is then exposed as part of the public CheckoutProtocol constant alongside the existing events.

On the React Native platform, the new event method is handled in both the iOS (ProtocolRelay.swift) and Android (ProtocolRelay.kt) relay implementations so that fulfillment change events are forwarded to the JS event stream. The iOS relay also migrates from CheckoutProtocol to the renamed EmbeddedCheckoutProtocol.Event namespace. The mock event type list and all relevant test suites are updated to cover the new event.

Additionally, the Checkout and Order models gain an optional attribution field ({ [key: string]: string }), and the verbose JSDoc comment on Message.code is removed.

How to test

  1. Subscribe to the CheckoutProtocol.fulfillmentChange event in a React Native app using the checkout kit.
  2. Trigger a fulfillment change during an embedded checkout session and verify the event is received with a valid Checkout payload (i.e., checkout.id is a string).
  3. Run the existing test suites on both platforms:
    • iOS: swift test in the module directory
    • Android: ./gradlew test
    • React Native / TypeScript: yarn test

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 Jun 26, 2026
@kiftio
kiftio force-pushed the dk/react-native-fulfilment-change branch from ad1df6f to 836f6bd Compare June 26, 2026 14:48

kiftio commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kiftio
kiftio marked this pull request as ready for review June 26, 2026 14:49
@kiftio
kiftio requested a review from a team as a code owner June 26, 2026 14:49
@kiftio
kiftio marked this pull request as draft June 26, 2026 14:49
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
React Native npm tarball 90.8 KiB 90.9 KiB +49 B
Android release AAR 167.5 KiB 167.5 KiB 0 B

Measured from the PR base SHA and PR head SHA. This comment reports package artifact sizes only; it is not a final app binary-size report.

@kiftio
kiftio force-pushed the dk/react-native-fulfilment-change branch from 836f6bd to e9f0f56 Compare June 26, 2026 14:53
@kiftio
kiftio force-pushed the dk/react-native-fulfilment-change branch from e9f0f56 to 67beace Compare June 26, 2026 14:57
@kiftio
kiftio marked this pull request as ready for review June 26, 2026 14:58
@github-actions

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.66% (319/348) 87.86% (181/206) 100% (82/82)

@markmur

markmur commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Nice, this might actually make #314 mostly redundant

@kiftio
kiftio merged commit b33d793 into main Jun 26, 2026
51 checks passed
@kiftio
kiftio deleted the dk/react-native-fulfilment-change branch June 26, 2026 15:23
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