Skip to content

Conversation

@mirmirmirr
Copy link
Member

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 ToastProvider and 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

  • Added a global ToastProvider to the app's provider tree in app/_lib/providers.tsx, enabling toast notifications throughout the app. [1] [2] [3]
  • Created ToastContext and useToast hook for managing and triggering toast notifications, with types for toast data. [1] [2]

Refactoring Feedback and Error Handling

  • Updated the event creation flow in app/new-event/page.tsx to 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]
  • Improved input error indication for event name and custom code fields, showing contextual error messages and icons. [1] [2]

Component Updates and Cleanup

  • Removed the old app/ui/components/copy-toast.tsx and replaced it with a new toast-enabled CopyToast component in app/ui/components/toasts/copy-toast.tsx. [1] [2]
  • Added reusable ErrorToast and SuccessToast components for consistent toast styling and usage. [1] [2]
  • Updated the availability page layout to use the new toast-based copy link component and context.

Copilot AI review requested due to automatic review settings October 17, 2025 02:34
Copy link
Contributor

Copilot AI left a 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 ToastProvider with 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.

@mirmirmirr mirmirmirr marked this pull request as draft October 17, 2025 02:35
@mirmirmirr mirmirmirr marked this pull request as ready for review October 17, 2025 17:38
@mirmirmirr mirmirmirr requested a review from jzgom067 October 17, 2025 18:59
@jzgom067 jzgom067 merged commit 1134f6d into main-preview Oct 18, 2025
1 check passed
@jzgom067 jzgom067 deleted the toast-and-event-api-guards branch October 18, 2025 00:24
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.

3 participants