You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vitejs/devtools#526 ("feat(core): render message actions as buttons on toast notifications") by @dvcolomban rendered a message entry's actions (e.g. activate, which focuses a dock) as buttons on the toast itself, not just in the messages panel's detail view — and fixed a dock-id typo (devframes-plugin-messages with hyphens vs. the real mounted id devframes_plugin_messages with underscores, a leftover from the devframe 0.6 migration, vitejs/devtools#396) that silently broke "click a toast to open messages." It touched packages/core/src/client/webcomponents/components/display/ToastOverlay.vue in vitejs/devtools, which moved here as part of the v0.9 migration — the equivalent file today is packages/hub-ui/src/client/components/display/ToastOverlay.vue.
The PR also added a "Toast: With Action" demo button to playgrounds/core/src/pages/devtools.vue — that playground file still exists in vitejs/devtools unaffected, so that part of the PR can be re-added there directly rather than ported here.
Original PR description
Why
Toasts only ever showed the dismiss ✕ — an entry's own actions (e.g. the activate kind, which focuses a dock) only rendered in the messages panel's detail view, not on the toast that actually announced it.
What changed
Renders entry.actions as buttons in the toast's own #actions slot, dispatching the same way the messages panel does: switchEntry(action.activate.dockId).
Fixes a pre-existing bug found while manually testing this: switchEntry('devframes-plugin-messages') (hyphens) never matched the dock's real mounted id, devframes_plugin_messages (underscores, PLUGIN_ID in @devframes/plugin-messages's constants.ts) — a typo from the devframe 0.6 migration (#396) that's been silently breaking "click a toast to open messages" ever since.
Adds a "Toast: With Action" button next to the existing Quick Actions in the playground's debug dashboard, so this (and the id fix) is easy to re-verify by hand later.
Port the ToastOverlay.vue change to packages/hub-ui/src/client/components/display/ToastOverlay.vue (+ its .stories.ts), adapting to whatever has shifted since the fork.
Verify the devframes_plugin_messages (underscore) id typo fix is/isn't already correct in this repo's current @devframes/plugin-messagesconstants.ts and any switchEntry(...) call sites — the bug may be specific to how vitejs/devtools referenced the id, or it may still exist here too.
The playground demo button doesn't need porting here — it can be re-added directly to vitejs/devtools's playgrounds/core/src/pages/devtools.vue, which is unaffected by the migration.
Credit @dvcolomban as the original author: include a Co-authored-by: dvcolomban <...> trailer (look up their GitHub noreply email, or omit if unavailable) and mention them in the PR description.
Context
vitejs/devtools#526 ("feat(core): render message actions as buttons on toast notifications") by @dvcolomban rendered a message entry's
actions(e.g.activate, which focuses a dock) as buttons on the toast itself, not just in the messages panel's detail view — and fixed a dock-id typo (devframes-plugin-messageswith hyphens vs. the real mounted iddevframes_plugin_messageswith underscores, a leftover from the devframe 0.6 migration, vitejs/devtools#396) that silently broke "click a toast to open messages." It touchedpackages/core/src/client/webcomponents/components/display/ToastOverlay.vuein vitejs/devtools, which moved here as part of the v0.9 migration — the equivalent file today ispackages/hub-ui/src/client/components/display/ToastOverlay.vue.The PR also added a "Toast: With Action" demo button to
playgrounds/core/src/pages/devtools.vue— that playground file still exists in vitejs/devtools unaffected, so that part of the PR can be re-added there directly rather than ported here.Original PR description
Diff: https://github.com/vitejs/devtools/pull/526/files
For agents picking this up
#actionsslot rendering and theswitchEntrydispatch pattern.ToastOverlay.vuechange topackages/hub-ui/src/client/components/display/ToastOverlay.vue(+ its.stories.ts), adapting to whatever has shifted since the fork.devframes_plugin_messages(underscore) id typo fix is/isn't already correct in this repo's current@devframes/plugin-messagesconstants.tsand anyswitchEntry(...)call sites — the bug may be specific to how vitejs/devtools referenced the id, or it may still exist here too.playgrounds/core/src/pages/devtools.vue, which is unaffected by the migration.Co-authored-by: dvcolomban <...>trailer (look up their GitHub noreply email, or omit if unavailable) and mention them in the PR description.