Skip to content

Prevent web checkout lifecycle events from bubbling - #969

Merged
markmur merged 1 commit into
mainfrom
web-checkout-events-no-bubble
Oct 9, 2026
Merged

markmur merged 1 commit into
mainfrom
web-checkout-events-no-bubble

Conversation

@markmur

@markmur markmur commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Checkout lifecycle events currently bubble to ancestor listeners, which can trigger unrelated handlers for generic event names such as close and update.

Set bubbles: false for start, update, complete, close, and blocked, matching the existing error event. Consumers must attach listeners directly to <shopify-checkout>; delegated bubbling listeners on ancestors or document will no longer receive these events.

Update the lifecycle documentation and existing blocked-event propagation test to match.

@markmur
markmur requested a review from a team as a code owner October 9, 2026 15:51
@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Platform / target Lines Branches Functions Report
✅ Web 98% 86.6% 97.44% Full report
⏭️ React Native — — — Not run for this change
⏭️ Embedded Checkout Protocol (TS) — — — Not run for this change

@bitrise

bitrise Bot commented Oct 9, 2026

Copy link
Copy Markdown

Bitrise builds

E2E · iOS CI

Checkout Kit E2E results

No native E2E runs were selected for this change.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Bundle Size Budgets

Budget Size Limits Result
Web JavaScript (uncompressed) 35.81 KiB (0 B) 35 KiB soft / 50 KiB hard ➖ Above budget; no increase

Bundle and package size

Web bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.

Platform Measurement Compression Base Head Delta
Web JavaScript bundle Uncompressed 35.8 KiB 35.8 KiB 0 B
Web JavaScript bundle gzip 11.2 KiB 11.2 KiB -1 B
Web npm package (.tgz) gzip 100.0 KiB 100.0 KiB -61 B
Web package files (uncompressed)

These are uncompressed file sizes; they do not sum to the compressed package size above.

File Base Head Delta
dist/chunks/shopify-checkout.js.map 266.2 KiB 266.2 KiB +5 B
dist/custom-elements.json 54.7 KiB 54.7 KiB 0 B
dist/index.d.ts 49.5 KiB 49.5 KiB 0 B
dist/chunks/shopify-checkout.js 35.4 KiB 35.4 KiB 0 B
README.md 25.1 KiB 25.0 KiB -153 B
package.json 4.1 KiB 4.1 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 0 B
dist/shopify-checkout.js.map 850 B 850 B 0 B
dist/index.js 255 B 255 B 0 B
dist/shopify-checkout.js 156 B 156 B 0 B
dist/shopify-checkout.d.ts 33 B 33 B 0 B
How sizes are measured

Measured from the PR base SHA and PR head SHA. Web bundle rows sum shipped .js, .mjs, and .cjs files under dist/, excluding source maps and declarations. The gzip bundle size sums files compressed individually with gzip -n -9. npm package sizes are gzip-compressed .tgz archives; Android AAR sizes are ZIP archives. Package sizes are not final app binary sizes.

@markmur
markmur requested a review from westeezy October 9, 2026 16:10
@markmur markmur self-assigned this Oct 9, 2026
@markmur
markmur requested a review from kiftio October 9, 2026 16:10

@westeezy westeezy 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.

LGTM i dont think we need bubble behavior so this is excellent

@markmur
markmur merged commit d1231d9 into main Oct 9, 2026
26 checks passed
@markmur
markmur deleted the web-checkout-events-no-bubble branch October 9, 2026 16:51
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