Skip to content

feat(react-centra-checkout): dispatch events to CentraEvents from handlers - #800

Open
adamsoderstrom wants to merge 1 commit into
mainfrom
feature/dispatch-events-from-handlers-to-centra-events
Open

feat(react-centra-checkout): dispatch events to CentraEvents from handlers#800
adamsoderstrom wants to merge 1 commit into
mainfrom
feature/dispatch-events-from-handlers-to-centra-events

Conversation

@adamsoderstrom

@adamsoderstrom adamsoderstrom commented Jul 1, 2026

Copy link
Copy Markdown
Member

Add typed event tracking for react-centra-checkout handlers and hooks.

This PR expands CentraEvents to support handler- and hook-specific events with typed callback signatures, dispatches events from checkout context methods and hook responses, and re-exports the event types publicly. It also adds tests covering event subscription, argument forwarding, and addItem dispatch behavior for both successful and error responses.

Upside: apps can now track calls to these handlers in a consistent, type-safe way.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 1, 2026 9:20am

Request Review

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: afaf314

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@noaignite/react-centra-checkout Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
+ Coverage   70.62%   75.00%   +4.37%     
==========================================
  Files          67       67              
  Lines        1062     1124      +62     
  Branches      268      267       -1     
==========================================
+ Hits          750      843      +93     
+ Misses        248      216      -32     
- Partials       64       65       +1     
Files with missing lines Coverage Δ
packages/react-centra-checkout/src/Context.tsx 86.13% <100.00%> (+21.69%) ⬆️
...react-centra-checkout/src/internal/CentraEvents.ts 95.83% <100.00%> (+0.83%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adamsoderstrom
adamsoderstrom force-pushed the feature/dispatch-events-from-handlers-to-centra-events branch from ceaf862 to afaf314 Compare July 1, 2026 09:20
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.

2 participants