Skip to content

feat(hub,hub-ui): collapsible edge-mode toolbar with drag-to-snap positioning - #219

Merged
antfu merged 2 commits into
mainfrom
brown-zebras-wait
Aug 14, 2026
Merged

feat(hub,hub-ui): collapsible edge-mode toolbar with drag-to-snap positioning#219
antfu merged 2 commits into
mainfrom
brown-zebras-wait

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What changed

Ports vitejs/devtools#523 — a devframe-side feature by @dvcolomban that predates the v0.9 migration — to the current hub-ui edge-docked shell:

  • Adds an opt-in "Auto-collapse edge toolbar" setting (Settings → Appearance): when idle and closed, the edge-docked toolbar shrinks to a small corner pill instead of permanently spanning the full edge, mirroring Dock.vue's own minimize animation (a real size change, not just an opacity fade). Hovering the pill brings it back.
  • The pill anchors at the corner nearest the toolbar's entries (its start), not the "Edge position"/"Float mode" buttons at the other end.
  • The existing "Edge position" button now also acts as a drag handle, letting the whole edge-docked panel be dragged and snapped among the four viewport edges without ever transitioning through float mode mid-drag.
  • Adds autoCollapseEdgeToolbar to the hub's DevframeDocksUserSettings (@devframes/hub/types) rather than a viewer-local extension, since the toggle isn't specific to hub-ui.

Why it changed

Edge mode permanently overlays a strip of the underlying host app with an opaque toolbar, even when the panel isn't in active use — there's no way to get it out of the way short of switching to float mode entirely. Collapsing to a small pill on idle keeps the affordance discoverable (hover to reveal) while giving back the screen real estate the rest of the time, the same tradeoff Dock.vue's own float-mode minimize already makes.

The pill's anchor corner matters because of where the mouse ends up: after hovering a corner pill to reveal the toolbar, the cursor is sitting right there, and if that corner also held the "Edge position" button, a quick follow-up click could land on it and start a drag or flip to float mode instead of hitting an entry — not what "just show me the toolbar" should do. Anchoring at the entries' side instead avoids that overlap.

Closes #209.


This PR was created with the help of an agent.

…itioning

Ports vitejs/devtools#523 to the hub-ui edge-docked shell:

- Adds an opt-in "Auto-collapse edge toolbar" setting (Settings →
  Appearance): when idle and closed, the edge-docked toolbar shrinks to
  a small corner pill instead of permanently spanning the full edge,
  mirroring Dock.vue's own minimize animation. Hovering the pill brings
  it back. The pill anchors at the corner nearest the toolbar's entries,
  away from the "Edge position"/"Float mode" buttons.
- The "Edge position" button now also acts as a drag handle, letting the
  whole edge-docked panel be dragged and snapped among the four viewport
  edges without transitioning through float mode mid-drag.
- Adds `autoCollapseEdgeToolbar` to the hub's `DevframeDocksUserSettings`
  (@devframes/hub/types), since the toggle isn't specific to any single
  viewer.

Closes #209.

Co-authored-by: dvcolomban <dinh-van.colomban@contentsquare.com>
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit e8743b7
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a7eac523a3b82000802829a
😎 Deploy Preview https://deploy-preview-219--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 cc8dbb7 into main Aug 14, 2026
11 of 12 checks passed
@antfu
antfu deleted the brown-zebras-wait branch August 14, 2026 05:49
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#523: collapsible edge-mode toolbar with drag-to-snap positioning

2 participants