Skip to content

feat: add toast notification system (Closes #825) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #1459

Open
waterWang wants to merge 1 commit into
SolFoundry:mainfrom
waterWang:feat/toast-notification-825
Open

feat: add toast notification system (Closes #825) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]#1459
waterWang wants to merge 1 commit into
SolFoundry:mainfrom
waterWang:feat/toast-notification-825

Conversation

@waterWang

Copy link
Copy Markdown

Bounty: Toast Notification System (Closes #825)

Implements a global toast notification system for bounty status changes, errors, and success messages.

Changes

frontend/src/contexts/ToastContext.tsx (new)

  • ToastProvider — global context provider rendering a top-right toast stack.
  • useToast() hook exposing success, error, warning, info, and dismiss.
  • Toast component with 4 variants (success/error/warning/info), each with a distinct lucide icon and border color.
  • Auto-dismiss after 5 seconds with manual close button.
  • Slide-in spring animation from top-right via framer-motion.
  • Multiple toasts stack vertically.
  • Accessible via role=\alert\ and an aria-live=\polite\ container.

frontend/src/main.tsx

  • Wrapped the app in ToastProvider.

frontend/src/components/bounty/BountyCreateWizard.tsx

  • Integrated toasts into the bounty creation flow: success toast on draft creation and publish, error toast on failure.

frontend/src/__tests__/toast.test.tsx (new)

  • Verifies all 4 variants render.
  • Verifies auto-dismiss after 5s.
  • Verifies manual dismiss via close button.
  • Verifies multiple toasts stack.
  • Verifies role=\alert\ accessibility.

Verification

  • vitest run src/__tests__/toast.test.tsx — 8 tests pass.
  • No new TypeScript errors introduced (pre-existing lib/animations module errors are unrelated).

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.

🏭 Bounty T1: Toast Notification System

1 participant