Skip to content

feat(712): add ToastContext provider and useToast hook - #869

Merged
ONEONUORA merged 1 commit into
Fracverse:masterfrom
shogun444:feat/712-toast-context-provider
Aug 29, 2026
Merged

ONEONUORA merged 1 commit into
Fracverse:masterfrom
shogun444:feat/712-toast-context-provider

Conversation

@shogun444

@shogun444 shogun444 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

What changed?

  • Added a React Context-based toast system exposing ToastProvider and useToast() in mobileapp/src/components/Toast.tsx.
  • Supported toast variants: success, error, warning, and info.
  • Added backward compatibility so existing global.toast callers continue working, with proper cleanup on unmount.
  • Wrapped root layout with <ToastProvider> in mobileapp/app/_layout.tsx and removed the redundant <ToastManager />.

Why was it changed?
To modernize toast notifications by moving away from mutating global state (global.toast) toward a type-safe, idiomatic React Context and hook pattern.


Type of Change

  • Refactor / Code modernization
  • New feature (non-breaking)
  • Bug fix
  • Breaking change

Verification

  • Backward Compatibility: All 7 existing global.toast call sites continue to work without modification.
  • Lifecycle Cleanup: Verified global.toast references are cleanly removed on unmount.
  • Layout Integration: Root layout cleanly wraps children with zero dangling ToastManager references.
  • Zero Dependencies: Implemented purely with React built-ins.

Closes #712

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@shogun444 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

@ONEONUORA

Copy link
Copy Markdown
Contributor

@shogun444
PLs make your implementation to pass CI checks

@ONEONUORA ONEONUORA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @shogun444

@ONEONUORA
ONEONUORA merged commit 0d9524a into Fracverse:master Aug 29, 2026
7 of 10 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.

mobile app: Implement custom toast alert banner manager for async notification messages

2 participants