Skip to content

Remove web pixel events#81

Open
tiagocandido wants to merge 1 commit into
mainfrom
05-13-remove_web_pixel_events
Open

Remove web pixel events#81
tiagocandido wants to merge 1 commit into
mainfrom
05-13-remove_web_pixel_events

Conversation

@tiagocandido
Copy link
Copy Markdown
Contributor

What changes are you making?

Removes Web Pixel event support across all platforms. The new UCP-based bridge does not emit pixel events, so the public surface that exposed them is being dropped to match the current protocol version.

Android (library + sample)

  • Removes onWebPixelEvent from CheckoutEventProcessor / DefaultCheckoutEventProcessor and the WEB_PIXELS branch in CheckoutBridge.
  • Deletes the com.shopify.checkoutkit.pixelevents package (28 @Serializable types + decoder).
  • Relocates MoneyV2 to com.shopify.checkoutkit.lifecycleevents (still referenced by CompletedEvent).
  • Regenerates lib/api/lib.api.
  • Sample: removes pixel logging path, PixelEventDetails screen, and the pixelEventJson column on LogLine. Bumps Room schema v2 → v3 with fallbackToDestructiveMigration.

Swift (sample + README only)

  • Deletes WebPixelEventsView, WebPixelsLogReader, the webPixelsLogger wiring in AppConfiguration, and the Settings nav row.
  • Removes the Web Pixels section from platforms/swift/README.md.
  • No library source changes — the Swift library had no pixel implementation under ECP.

React Native (library + sample)

  • Removes the 'pixel' event listener, onWebPixelEvent prop on AcceleratedCheckoutButtons, parseCustomPixelData, the WebPixelEvent codegen prop, and pixel types from index.d.ts.
  • Strips the matching native bridges: CustomCheckoutEventProcessor.java's override, checkoutDidEmitWebPixelEvent in ShopifyCheckoutKit.swift, the serializer in ShopifyCheckoutKit+EventSerialization.swift, onWebPixelEvent wiring in AcceleratedCheckoutButtons.swift, and the corresponding RCT_EXPORT_VIEW_PROPERTY in ShopifyCheckoutKit.mm.
  • Sample app: removes the pixel listener registration and handler.

Breaking change for consumers on Android (onWebPixelEvent) and React Native ('pixel' listener, onWebPixelEvent prop). Release notes should call this out and the next published versions should be major bumps.

How to test

Android

cd platforms/android
./gradlew :lib:test :lib:detekt :lib:lintRelease :lib:apiCheck
cd samples/MobileBuyIntegration && ./gradlew assembleDebug

All green locally. Manually: open the sample, run a checkout, confirm the logs screen no longer shows a pixel row and that the first launch after upgrade does not crash on Room migration.

Swift

cd platforms/swift
./scripts/lint                                         # SwiftLint + SwiftFormat
xcodebuild -workspace Samples/Samples.xcworkspace \
  -scheme ShopifyCheckoutKit \
  -destination 'generic/platform=iOS Simulator' build
./scripts/xcode_run test ShopifyCheckoutKit-Package

All green locally. Manually: open the MobileBuyIntegration sample, confirm Settings no longer shows the "Web pixel events" row and the app launches without referencing the deleted view.

React Native

cd platforms/react-native
pnpm install
pnpm --filter @shopify/checkout-kit-react-native typecheck
pnpm test                                               # 114/114 passing across 6 suites

Manually: drive a checkout in the sample and confirm no 'pixel' listener registration remains; tsc will surface any consumer code still referencing the removed surface.


Before you merge

Important

  • I've added tests to support my implementation (no new tests — this is a removal; pixel-specific tests deleted, all remaining suites still pass on every platform)
  • 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 platforms/android/README.md, plus platforms/react-native/README.md)

Releasing a new Swift version?

Not released as part of this PR — Swift changes are sample + docs only.

  • I have bumped the version in platforms/swift/ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?

Release bump to be handled in a follow-up — this is a major version (breaking API removal).

  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

@tiagocandido tiagocandido requested a review from a team as a code owner May 13, 2026 13:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 98%
98.53% (202/205) 94.91% (112/118) 100% (61/61)

@tiagocandido tiagocandido force-pushed the 05-13-remove_web_pixel_events branch 2 times, most recently from f48c6bf to 99b81da Compare May 13, 2026 13:49
@tiagocandido tiagocandido force-pushed the 05-13-remove_web_pixel_events branch from 99b81da to 34f8647 Compare May 13, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant