Skip to content

feat(react): announce arrivals, document client sharing#78

Open
soufian3hm wants to merge 1 commit into
dodopayments:mainfrom
soufian3hm:feat/arrival-announcements
Open

feat(react): announce arrivals, document client sharing#78
soufian3hm wants to merge 1 commit into
dodopayments:mainfrom
soufian3hm:feat/arrival-announcements

Conversation

@soufian3hm

Copy link
Copy Markdown
Contributor

Completes the last two deferred items from #61 (follow-up to #72, which covers the other four):

  • aria-live for the new-arrival pill: a visually hidden role=status region carries the same localized text as the pill, so screen-reader users perceive arrivals held behind it without moving focus. Emptied on dismiss. Deliberately scoped to the pill: always-on badge announcements would read every unseen tick during bursts, while the badge count already rides the bell's accessible name (announced on focus, per the audit note).
  • One client per page docs: sdk-reference gains a section (plus a react README pointer) on sharing one ChimelyProvider client across multiple inbox surfaces, since each standalone <Inbox /> opens its own SSE connection into the browser's ~6-per-origin HTTP/1.1 cap.

Verification

biome, build, typecheck, vitest all green: 106 react tests, including a new one pinning the status region (announces on arrival behind the pill, empties on dismiss). Patch changeset included.

The two follow-ups deferred from dodopayments#61: a polite status region announces
arrivals held behind the new-notification pill, and the docs gain a
one-client-per-page section (multiple standalone inboxes each open an
SSE connection into the HTTP/1.1 per-origin cap).

Refs dodopayments#61
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds accessible arrival announcements and client-sharing guidance. The main changes are:

  • A hidden polite status region for new arrivals behind the pill.
  • Shared visually hidden CSS for the status region.
  • Test coverage for announcing and clearing the arrival message.
  • Docs recommending one shared ChimelyProvider client per page.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
packages/react/src/components/NotificationList.tsx Adds a hidden role="status" region that mirrors the pending new-notification pill text.
packages/react/src/styles.ts Adds the .chimely-sr-only utility for visually hidden status text.
packages/react/src/theming.test.tsx Adds coverage for announcing arrivals and clearing the status text on dismiss.
docs/content/docs/sdk-reference.mdx Documents sharing one provider client across multiple inbox surfaces.
packages/react/README.md Links React package readers to the one-client-per-page guidance.
.changeset/arrival-announcements.md Adds a patch changeset for the React accessibility and documentation updates.

Reviews (1): Last reviewed commit: "feat(react): announce arrivals, document..." | Re-trigger Greptile

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