Skip to content

docs(toast): add usage guide covering duration, density, quiet mode, and actions - #344

Merged
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
jabir-dev788:FIX-Talenttrust-Frontend
Jul 15, 2026
Merged

docs(toast): add usage guide covering duration, density, quiet mode, and actions#344
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
jabir-dev788:FIX-Talenttrust-Frontend

Conversation

@jabir-dev788

Copy link
Copy Markdown
Contributor

Summary

Adds docs/components/toast.md, documenting the public API and behavioral
contracts of the toast system (useToast / ToastProvider) that previously
only existed as inline comments in toast-provider.tsx.

Covers

  • showSuccess / showError / dismissToast signatures and return values
  • The 'suppressed' return under quietMode
  • role="status" vs role="alert" and polite/assertive live-region semantics
  • Density-driven stacking gap
  • MAX_VISIBLE_TOASTS cap and eviction order
  • The action: { label, onClick } contract, including dismiss-on-fire behavior
  • Copy-pasteable PreferencesProvider + ToastProvider mounting example
  • Return-value reference table

Verification

Every documented behavior was cross-checked against toast-provider.tsx
source and toast-provider.test.tsx assertions to avoid drift. No source
files were modified — documentation only.

Scope note

The issue's general guidelines mention 95% test coverage; this is a
documentation-only PR with no code changes, so no new tests were added,
per the issue's own "Suggested execution" section (snippets verified by
mirroring existing test patterns instead).

Checks

  • npm run lint
  • npm test
  • npm run build

@mikewheeleer

Copy link
Copy Markdown
Contributor

lgtm — thanks for this!

@mikewheeleer
mikewheeleer merged commit 6c5cf93 into Talenttrust:main Jul 15, 2026
1 check passed
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