Skip to content

feat(hub-ui): render message actions as buttons on toast notifications - #215

Merged
antfu merged 1 commit into
mainfrom
feat/toast-message-actions
Aug 14, 2026
Merged

feat(hub-ui): render message actions as buttons on toast notifications#215
antfu merged 1 commit into
mainfrom
feat/toast-message-actions

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

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

  • ToastOverlay.vue renders entry.actions as buttons in the toast's own #actions slot, dispatching the same way @devframes/plugin-messages's own detail view does (its App.vue's onActivate): docks.switchEntry(action.activate.dockId) for activate actions, commands.execute(action.command.id, ...) for command actions.
  • Adds a "With Action" story to ToastOverlay.stories.ts exercising the new button.

Context

Ports vitejs/devtools#526 ("feat(core): render message actions as buttons on toast notifications") by @dvcolomban to packages/hub-ui/src/client/components/display/ToastOverlay.vue, the file's new home after the v0.9 migration.

The original PR also fixed a dock-id typo (devframes-plugin-messages with hyphens vs. the real mounted id devframes_plugin_messages with underscores) — this repo's ToastOverlay.vue already dispatches via the MESSAGES_DOCK_ID constant with the correct underscored id, so no separate fix was needed here.

The playground demo button from the original PR isn't ported here — it can be re-added directly to vitejs/devtools's playgrounds/core/src/pages/devtools.vue, which is unaffected by the migration.

Closes #212.


Created with the help of an agent.

Port of vitejs/devtools#526 by @dvcolomban.

Co-authored-by: dvcolomban <90617742+dvcolomban@users.noreply.github.com>
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit c79472c
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a7ea524a5cd000008695474
😎 Deploy Preview https://deploy-preview-215--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 3133852 into main Aug 14, 2026
12 checks passed
@antfu
antfu deleted the feat/toast-message-actions branch August 14, 2026 05:22
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.

Port feature from vitejs/devtools#526: render message actions as buttons on toast notifications

2 participants