Skip to content

Add toast notification system with warning variant, queue, and keyboard dismiss - #730

Merged
ritik4ever merged 2 commits into
ritik4ever:mainfrom
Chinonso-Peter:feat/toast-notification-system
Jul 30, 2026
Merged

Add toast notification system with warning variant, queue, and keyboard dismiss#730
ritik4ever merged 2 commits into
ritik4ever:mainfrom
Chinonso-Peter:feat/toast-notification-system

Conversation

@Chinonso-Peter

Copy link
Copy Markdown
Contributor

Summary

Adds a comprehensive toast notification system per #613.

Changes

  • Toast.tsx (new): Individual toast component with success/error/warning/info variants, Escape key dismissal, role=\status\ and aria-live=\polite\ for accessibility
  • useToast.ts: Added warning variant; error toasts persist until manually dismissed (no auto-dismiss); queue capped at 3 visible toasts (oldest non-error removed when full); auto-dismiss timeout changed from 6s to 5s
  • ToastContainer.tsx: Refactored to use the new Toast component internally
  • index.css: Added --toast-warning-* CSS variables and .toast-warning styles for both dark and light themes
  • Updated tests and Storybook stories to cover the warning variant and queue/auto-dismiss behavior

Closes #613

…rd dismiss

- Create Toast.tsx component with success/error/warning/info variants
- Add Escape key dismissal for keyboard accessibility
- Error toasts persist until manually dismissed
- Queue limits visible toasts to max 3, removing oldest non-error first
- Auto-dismiss non-error toasts after 5 seconds (10s with link)
- Add warning variant with CSS variables and styles for both themes
- Update ToastContainer to use Toast component internally
- Update tests and stories for new warning variant and queue behavior

Closes ritik4ever#613
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Chinonso-Peter is attempting to deploy a commit to the ritik4ever's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Chinonso-Peter Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Chinonso-Peter, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c10a9e7a-f5a1-4a01-bd80-5cbc608068ab

📥 Commits

Reviewing files that changed from the base of the PR and between 10f827c and a61ed43.

📒 Files selected for processing (18)
  • frontend/src/components/CampaignDetailPanel.tsx
  • frontend/src/components/CampaignTimeline.tsx
  • frontend/src/components/CampaignsTable.tsx
  • frontend/src/components/ContributorSummary.tsx
  • frontend/src/components/CreatorAnalytics.tsx
  • frontend/src/components/IssueBacklog.tsx
  • frontend/src/components/SkeletonAnalytics.tsx
  • frontend/src/components/SkeletonCard.tsx
  • frontend/src/components/SkeletonIssueList.tsx
  • frontend/src/components/SkeletonTimeline.tsx
  • frontend/src/components/Toast.tsx
  • frontend/src/components/ToastContainer.a11y.test.tsx
  • frontend/src/components/ToastContainer.stories.tsx
  • frontend/src/components/ToastContainer.tsx
  • frontend/src/hooks/useMinDisplayTime.ts
  • frontend/src/hooks/useToast.test.ts
  • frontend/src/hooks/useToast.ts
  • frontend/src/index.css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ritik4ever
ritik4ever merged commit 9727329 into ritik4ever:main Jul 30, 2026
3 of 18 checks 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.

[FEATURE] Add toast notification system

2 participants