Skip to content

Reduce the web checkout overlay bundle size - #916

Merged
markmur merged 1 commit into
ks-web-blocked-popup-sessionfrom
mm-web-overlay-bundle
Oct 6, 2026
Merged

markmur merged 1 commit into
ks-web-blocked-popup-sessionfrom
mm-web-overlay-bundle

Conversation

@markmur

@markmur markmur commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The normal and blocked checkout overlays duplicate fallback markup and dialog listeners, pushing the Web bundle above its soft size budget. Generate both variants from one template and share dialog setup and cleanup while preserving independently replaceable slots and retry behavior.

The shipped JavaScript shrinks from 35,918 to 34,729 bytes (35.08 → 33.92 KiB), saving 1,189 bytes and bringing the bundle below the 35 KiB soft limit. Gzip size decreases from 10,761 to 10,737 bytes.

Stack

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 97%
95.3% (406/426) 85.88% (213/248) 97.19% (104/107)

@markmur markmur self-assigned this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Bundle Size Budgets

Budget Size Limits Result
Web JavaScript (uncompressed) 33.92 KiB (-1.16 KiB) 35 KiB soft / 50 KiB hard ✅ Within budget

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.1 KiB 33.9 KiB -1.2 KiB
Web JavaScript bundle gzip 10.5 KiB 10.5 KiB -23 B
Web npm package (.tgz) gzip 91.1 KiB 91.0 KiB -69 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/index.js.map 253.6 KiB 251.0 KiB -2.5 KiB
dist/custom-elements.json 49.3 KiB 48.8 KiB -515 B
dist/index.d.ts 48.0 KiB 48.0 KiB 0 B
dist/index.js 35.1 KiB 33.9 KiB -1.2 KiB
README.md 20.8 KiB 20.8 KiB 0 B
package.json 3.6 KiB 3.6 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 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 force-pushed the mm-web-overlay-bundle branch from bd67c87 to dedd28e Compare October 6, 2026 11:33
@markmur
markmur changed the base branch from ks-web-blocked-popup-event to ks-web-blocked-popup-session October 6, 2026 11:33

@kyle-schellen kyle-schellen 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.

Thanks for this Mark!

@markmur
markmur merged commit 2930889 into ks-web-blocked-popup-session Oct 6, 2026
27 of 31 checks passed
@markmur
markmur deleted the mm-web-overlay-bundle branch October 6, 2026 12:45
kyle-schellen added a commit that referenced this pull request Oct 6, 2026
* Fix blocked popup session state

* Warn and document when the checkout window is blocked

* Show a retry overlay when the checkout window is blocked

* Treat any open() while the blocked overlay shows as a retry

* Use the renamed close event in blocked-overlay tests and README

* Keep the blocked-overlay close event out of the custom elements manifest

* Document the blocked-window telemetry mapping

* Keep the blocked message while the overlay fades out

* Keep a session opened from a close listener open

* Test the blocked overlay's close and retry paths

* Keep the blocked session when the overlay is hidden

* Test the dialog's late close event after a retry

* Document close after a blocked window

* Share web checkout overlay markup and lifecycle handling (#916)

* Clarify that the browser blocked the checkout window from opening

---------

Co-authored-by: Mark Murray <2034704+markmur@users.noreply.github.com>
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