feat(hub,hub-ui): collapsible edge-mode toolbar with drag-to-snap positioning - #219
Merged
Conversation
…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>
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:Dock.vue's own minimize animation (a real size change, not just an opacity fade). Hovering the pill brings it back.autoCollapseEdgeToolbarto the hub'sDevframeDocksUserSettings(@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.