wezlo/filament-modal-notifications
Turn any Filament notification into a blocking modal by chaining ->asModal(). Modal notifications queue (no stacking), auto-add a Close button when no actions are set, respect your custom actions, support conditional opt-in, and offer panel-level defaults.
Notification API without requiring structural changes to existing notification logic. This aligns well with Laravel’s modularity and Filament’s plugin system.->asModal($condition), enabling adaptive UX without hardcoding behavior.->asModal()) reduces friction for adoption. No new classes or interfaces are required.Notification::make() calls for custom actions or styling that might conflict with modal defaults.PanelProvider).filament.php (e.g., modal_notifications.width = '50%').->asModal().->asModal($isCritical)).->title(), ->actions(), ->danger()) work unchanged.session()->flash().PanelProvider before any notification logic.config(['filament-modal-notifications.enabled' => false])).filament.php, reducing scattered overrides.Livewire::listen() for troubleshooting.filament_modal_notifications.*) can be inspected for state issues.->asModal($condition) use cases.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Livewire event not dispatched | Modal never renders | Verify Livewire version compatibility. |
| Session key collision | Modal state corrupted | Use panel-specific session key prefixes. |
| Rapid modal queue overflow | UI freeze or memory leaks | Add rate-limiting (e.g., sleep(1) between modals). |
| Custom action JS conflicts | Modal actions fail | Isolate modal JS via Filament’s asset pipeline. |
| Filament version mismatch | Package breaks | Pin to exact Filament major version in composer.json. |
PanelProvider.Notification::make()->toast() with ->asModal().filament.php.->asModal(false)) fall back to toasts.->asModal($isCritical)) for adaptive UX.How can I help you explore Laravel packages today?