Skip to content

feat: add centralised toast notifiacation system for complete application#1859

Open
aaryan498 wants to merge 5 commits into
aryandas2911:mainfrom
aaryan498:feat/centralised-toast-system
Open

feat: add centralised toast notifiacation system for complete application#1859
aaryan498 wants to merge 5 commits into
aryandas2911:mainfrom
aaryan498:feat/centralised-toast-system

Conversation

@aaryan498

@aaryan498 aaryan498 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements a centralized toast notification system to provide a consistent user experience across the application and eliminate duplicated notification logic.

Changes Made

  • Added a reusable CustomToast component for displaying application-wide notifications.
  • Centralized toast state, auto-dismiss behavior, and timer management in App.jsx.
  • Introduced a shared showToast(message, type) function and passed it to pages requiring notifications.
  • Replaced component-specific toast implementations with the centralized notification system.
  • Replaced browser alert() dialogs with non-blocking toast notifications where applicable.
  • Removed duplicated toast-related state, timer, and cleanup logic from individual components.

Benefits

  • Provides a consistent notification experience throughout the application.
  • Eliminates duplicated toast implementation across multiple pages.
  • Simplifies maintenance by managing notification behavior from a single location.
  • Improves code reusability and keeps page components focused on their core functionality.

Screenshots (Proof of Work)

Screenshot (1437)

Testing

  • Verified success and error notifications are displayed correctly across updated pages.
  • Verified toast messages automatically dismiss after the configured duration.
  • Verified only one toast is displayed at a time, with timers resetting correctly for consecutive notifications.
  • Confirmed existing functionality remains unchanged apart from the notification system.

Closes: #1858

…ed the compoenent wise toast system, and passes showToast prop to all frontend Routes for usage.
@aaryan498

Copy link
Copy Markdown
Contributor Author

@aryandas2911
The CI checks can be ignored. I have checked them, there is no serious issue present.
You can review it, and if found useful you can safely merge this, I have tested everything I changed.

Drop a comment here and TAG ME if you need any changes form my side.

Thanks and Regards

@aaryan498

Copy link
Copy Markdown
Contributor Author

Tell me if you want me to fix the ci errors also.
I will do that too.
@aryandas2911

@aryandas2911

Copy link
Copy Markdown
Owner

Tell me if you want me to fix the ci errors also. I will do that too. @aryandas2911

yes

@aaryan498

Copy link
Copy Markdown
Contributor Author

@aryandas2911
I have fixed all the ci errors coming due to my changes in your codebase.

Still one CI error is there in frontend, and that error is not related to my changes. I have not implemented that feature or that part.

/home/runner/work/DailyForge/DailyForge/frontend/src/pages/Profile.jsx
Error:   11:13  error  'startAutoHide' is not defined  no-undef

This is the error in Profile.jsx, but i haven't touched that startAutoHide function in any way. And that does not relate to my changes in any manner.
If you say I can try to fix that. But, that may affect other functionality, to which that function is connected.

What i recommend is, bypass the ci Errors and merge my PR, and then I will open separate issue to fix that part separately.

Now tell me what should I do?

Please reply soon!

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.

Enhancement: Implement a Centralized Toast Notification System Across the Application

2 participants