-
Notifications
You must be signed in to change notification settings - Fork 0
Toast and event api guards #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a global toast notification system to replace existing inline alert and toast logic, providing consistent error and success feedback throughout the application.
- Adds a global
ToastProviderwith context for managing toast notifications across the app - Refactors event creation and availability submission to use toast messages instead of browser alerts
- Updates copy-link functionality to use the new toast system
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/_lib/providers.tsx | Integrates ToastProvider into the app's provider tree |
| app/_lib/toast-context.tsx | Creates ToastContext and useToast hook for managing toast state |
| app/_lib/toast-provider.tsx | Implements ToastProvider component with toast rendering logic |
| app/_lib/types/toast.tsx | Defines ToastErrorMessage interface |
| app/ui/components/toasts/error-toast.tsx | Creates reusable ErrorToast component |
| app/ui/components/toasts/success-toast.tsx | Creates reusable SuccessToast component |
| app/ui/components/toasts/copy-toast.tsx | Replaces old copy-toast with toast-enabled version |
| app/ui/components/copy-toast.tsx | Removes old copy-toast component |
| app/new-event/page.tsx | Updates event creation to use toast notifications and improved error handling |
| app/ui/layout/availability-page.tsx | Updates availability submission to use toast notifications |
| app/ui/layout/results-page.tsx | Updates to use new CopyToast component |
| app/ui/components/schedule/time-slot.tsx | Adds cursor styling for disabled time slots |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…cake/frontend into toast-and-event-api-guards
This pull request introduces a global toast notification system to the application, refactoring error and success feedback to use consistent, user-friendly toast messages. It adds a new
ToastProviderand context, updates event creation and copy-link actions to display toasts, and removes the old inline alert and toast logic. Additionally, it improves error handling and input feedback in the event creation flow.Toast Notification System Integration
ToastProviderto the app's provider tree inapp/_lib/providers.tsx, enabling toast notifications throughout the app. [1] [2] [3]ToastContextanduseToasthook for managing and triggering toast notifications, with types for toast data. [1] [2]Refactoring Feedback and Error Handling
app/new-event/page.tsxto use error toasts instead of browser alerts, with more granular error state and visual feedback for input fields. [1] [2] [3] [4] [5] [6] [7]Component Updates and Cleanup
app/ui/components/copy-toast.tsxand replaced it with a new toast-enabledCopyToastcomponent inapp/ui/components/toasts/copy-toast.tsx. [1] [2]ErrorToastandSuccessToastcomponents for consistent toast styling and usage. [1] [2]