fix: toast visibility — opaque backgrounds and flash scope matching with query strings
Two bugs in the toast redesign: 1. Variant backgrounds (success/warning/info/error) used rgba with 12-20% opacity, making toasts semi-transparent over page content. Fixed by layering the tint over a solid background via linear-gradient compositing. 2. Flash messages with scoped paths including query strings (e.g. edit pages with ?return=...) were not matched by Flash::peek(Request::path()) since path() strips the query. Added fallback to pathWithQuery() matching. Also moved flash partial before JS init scripts to ensure DOM is present when the component runtime mounts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import { resolveHost } from '../core/app-dom.js';
|
||||
|
||||
export function initFlashAutoDismiss(root = document, options = {}) {
|
||||
const {
|
||||
selector = '.app-toast-stack .notice[data-flash-timeout]',
|
||||
selector = '.notice[data-flash-timeout]',
|
||||
defaultTimeout = 0,
|
||||
} = options;
|
||||
const host = resolveHost(root);
|
||||
|
||||
Reference in New Issue
Block a user