Skip to content

[Web] Remove redundant event detail properties#431

Merged
josemiguel-alvarez merged 1 commit into
mainfrom
jose/1135-web-event-details
Jul 10, 2026
Merged

[Web] Remove redundant event detail properties#431
josemiguel-alvarez merged 1 commit into
mainfrom
jose/1135-web-event-details

Conversation

@josemiguel-alvarez

Copy link
Copy Markdown
Contributor

tl;dr

  • Removed top-level order, lineItems, totals, and messages aliases from Web checkout event details.
  • Kept those values available through each event’s canonical checkout snapshot.
  • Updated payload tests to require exact detail shapes and verify nested access.

Why

The aliases duplicated protocol-backed checkout fields and created two apparent sources of truth. A single checkout payload keeps the public event API smaller and prevents aliases from drifting from the decoded protocol model.

Assisted-By: devx/7de6cdaa-3194-43df-b108-d324ae4d378d
@josemiguel-alvarez josemiguel-alvarez requested a review from a team as a code owner July 10, 2026 10:59
@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 10, 2026
@github-actions

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 100%
99.57% (236/237) 86.4% (108/125) 100% (63/63)

@github-actions

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 63.3 KiB 63.0 KiB -298 B
Web file breakdown
File Base Head Delta
dist/index.js.map 178.8 KiB 178.1 KiB -704 B
dist/index.d.ts 41.5 KiB 41.2 KiB -304 B
dist/custom-elements.json 35.5 KiB 35.5 KiB 0 B
dist/index.js 28.4 KiB 28.2 KiB -130 B
README.md 17.3 KiB 17.3 KiB 0 B
package.json 2.8 KiB 2.8 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@josemiguel-alvarez josemiguel-alvarez self-assigned this Jul 10, 2026
@markmur

markmur commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Do we need to update the readme?

@josemiguel-alvarez

Copy link
Copy Markdown
Contributor Author

Do we need to update the readme?

Do you mean to add a migration note? Only web alpha consumers would be affected right? I think we should just add a note in the release of the next version.

@markmur

markmur commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor Author

This is the part I was thinking of https://github.com/Shopify/checkout-kit/blob/main/platforms/web/README.md#checkout-lifecycle

image

​Good catch! I'll update it right now.

Copy link
Copy Markdown
Contributor Author

josemiguel-alvarez commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 10, 5:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 10, 5:25 PM UTC: @josemiguel-alvarez merged this pull request with Graphite.

@josemiguel-alvarez josemiguel-alvarez merged commit 06e6263 into main Jul 10, 2026
27 checks passed
@josemiguel-alvarez josemiguel-alvarez deleted the jose/1135-web-event-details branch July 10, 2026 17:25
josemiguel-alvarez added a commit that referenced this pull request Jul 10, 2026
### tl;dr
- Updated lifecycle payload tables and examples to access event data through `event.detail.checkout`.
- Corrected checkout model field casing and clarified how event data is mirrored to the element.

### Why
This PR keeps the Web package README aligned with the event detail API introduced in #431. The README ships with the npm package, so consumers of the next v4 release get examples that match the runtime behavior and TypeScript types.
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.

3 participants