Skip to content

docs(toast): document useToast API, quiet mode, and announcers - #394

Merged
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
akprinciple:docs/toast-28-toast-docs
Jul 20, 2026
Merged

docs(toast): document useToast API, quiet mode, and announcers#394
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
akprinciple:docs/toast-28-toast-docs

Conversation

@akprinciple

Copy link
Copy Markdown
Contributor

closes #380

This PR introduces comprehensive documentation for the ToastProvider system and strengthens its test coverage to align with the documented behavior. The toast provider is a critical, user-facing component, and this work provides a durable reference for its API and features.

Key Changes

  • New Documentation (docs/components/Toast.md): Created a complete reference document covering:
    • The ToastProvider and useToast hook API.
    • Behavioral guarantees for features like Quiet Mode, auto-dismiss duration, density, and toast eviction.
    • Detailed accessibility implementation, including role attributes and the ToastAnnouncer live regions.
  • JSDoc Enhancements: Added detailed JSDoc comments to src/components/toast/toast-provider.tsx, linking directly to the new documentation and summarizing key behaviors in-code.
  • Test Suite Improvements: Added new test cases to toast-provider.test.tsx to explicitly verify behaviors mentioned in the documentation, such as aria-atomic attributes and eviction logic.

This resolves the issue of scattered or missing documentation for a central UI component, making it easier for developers to use the toast system correctly and safely.

@mikewheeleer

Copy link
Copy Markdown
Contributor

good stuff here — merged with thanks 🚀

@mikewheeleer
mikewheeleer merged commit 98238a3 into Talenttrust:main Jul 20, 2026
1 check failed
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.

Document the toast provider API, quiet mode, and density behavior

2 participants