Repository navigation
Vector Studio: floating panels, a movable Tools panel and panels on either side - #252
Merged
Merged
Conversation
…ither side - Any panel can float in its own window: drag a dock tab or a strip icon onto the canvas, or pick Float Panel from its panel menu. Floating windows move by their header, resize from their corner and stay on screen when the window shrinks or the tablet rotates. - Drop a floating panel's header on the dock tabs to dock it as a tab (at the marked position) or on the icon strip to collapse it to an icon. Dragging a tab along the tabs reorders them. - Every panel menu now ends with Float Panel, Dock as Tab, Collapse to Icon and Close Panel as they apply, for tapping instead of dragging. - The Tools panel has a grip: drag it to float the panel anywhere, or near the canvas's left or right edge to dock it there. Window > Tools Position and Window > Panels Position set the same from the menu. - Drags use pointer events with a small threshold, so mouse, touch and stylus work alike and a tap still opens the panel. - Workspaces save floating panels, the Tools panel position and the panel side. The arrangement as changed is kept across sessions until the workspace is reset or another one is chosen.
A focused control's tooltip waits 300 ms before showing; in CI the test environment can be torn down within that delay, and the late timer threw 'document is not defined' as an unhandled error.
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.
Makes the Vector Studio workspace rearrangeable, with mouse, touch and stylus alike, and saves the arrangement in workspaces.
Panels
Tools panel and sides
Saving
Implementation
src/ui/drag.js: shared pointer-drag helper (per-pointer-type threshold, window listeners so a drag survives its handle moving, swallows the click after a drag).src/ui/dock.js: floating panel windows, drop zones, tab reordering, layout menu items;getLayout/setLayoutcarryfloating.src/features/workspace/window.js: Tools panel grip, positions, panel side, remembered layout, commands.touch-action: tabsnone; strip iconspan-y(pan-xon phones) so a swipe along the strip still scrolls it.Testing
tests/workspace-flexible.test.js(menu float/dock, strip tear-off drag, header move, drop on tabs/strip, touch reorder, resize, close/reopen, clamping, Tools grip float/dock, menu commands, workspace capture/apply, persistence across sessions and reset).tests/panel-menus.test.js: every panel now has a menu button (layout items).