Skip to content

feat!(web): rename checkout events to ec prefix#301

Merged
westeezy merged 1 commit into
mainfrom
update-web-component-events
Jun 19, 2026
Merged

feat!(web): rename checkout events to ec prefix#301
westeezy merged 1 commit into
mainfrom
update-web-component-events

Conversation

@westeezy

Copy link
Copy Markdown
Contributor

What changes are you making?

In order to better match the EP Binding of UCP we are renaming the web events to match 1-1. This means checkout:* becomes ec.* in event names

How to test

Unit tests and sample app are updated


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)

@westeezy westeezy requested a review from a team as a code owner June 18, 2026 17:37
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 99%
98.52% (267/271) 88.55% (147/166) 100% (59/59)

@kev-mao kev-mao 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!

@raginpirate raginpirate left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 UCP <-> ECP <-> KIT!

In order to better match the [EP
Binding](https://ucp.dev/latest/specification/embedded-checkout/) of UCP
we are renaming the web events to match 1-1. This means `checkout:*`
becomes `ec.*` in event names
@westeezy westeezy force-pushed the update-web-component-events branch from 6df9370 to 604b17e Compare June 18, 2026 22:25

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

Glad we're doing this!

What do you think about encouraging an an enum for the events rather than a string, to align more with the other platforms?

checkout.addEventListener(CheckoutProtocol.start, (event) => {})
checkout.addEventListener(CheckoutProtocol.close, (event) => {})
checkout.addEventListener(CheckoutProtocol.totalsChange, (event) => {})

@westeezy westeezy merged commit 7ff698f into main Jun 19, 2026
18 checks passed
@westeezy westeezy deleted the update-web-component-events branch June 19, 2026 14:15
@westeezy

Copy link
Copy Markdown
Contributor Author

@markmur i like it. I wanted to do atomic PRs so I will open another update where that is setup! thanks for the dynamite suggestion

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.

5 participants