Skip to content

Replace WinBox with native Vue scratchbook component#22095

Merged
mvdbeek merged 16 commits intogalaxyproject:devfrom
dannon:scratchbook-styling
May 1, 2026
Merged

Replace WinBox with native Vue scratchbook component#22095
mvdbeek merged 16 commits intogalaxyproject:devfrom
dannon:scratchbook-styling

Conversation

@dannon
Copy link
Copy Markdown
Member

@dannon dannon commented Mar 13, 2026

Summary

Replaces the third-party WinBox dependency with a native Vue WindowManagerWindow component backed by a Pinia store. Styling follows Galaxy's GModal aesthetic -- rounded corners, white header, layered shadow, clean typography -- and the window manager supports minimize with taskbar-style stacking at the bottom of the viewport, clamps drag/resize to viewport bounds, and persists open windows across page reloads via localStorage.

Builds on #22088 (merged), which landed the persistence plumbing. Also adds a Vitest smoke suite covering the new windowManagerStore: add/remove, focus z-index, position/size updates, minimize/maximize, beforeUnload, and the localStorage round-trip.

Comment thread client/src/components/Scratchbook/ScratchbookWindow.vue Outdated
Comment thread client/src/components/Scratchbook/ScratchbookWindow.vue Outdated
@dannon dannon moved this to In Progress in GCC Live Planning Board Mar 25, 2026
@dannon dannon force-pushed the scratchbook-styling branch from 353263e to 0c5d3db Compare March 26, 2026 16:16
@dannon dannon force-pushed the scratchbook-styling branch 2 times, most recently from 4b326fc to b81a690 Compare April 23, 2026 10:54
@dannon dannon force-pushed the scratchbook-styling branch from b81a690 to 619cb26 Compare April 29, 2026 16:15
@guerler guerler added the highlight Included in user-facing release notes at the top label Apr 29, 2026
@dannon dannon marked this pull request as ready for review April 29, 2026 16:44
@github-actions github-actions Bot added this to the 26.1 milestone Apr 29, 2026
dannon added 12 commits April 30, 2026 22:40
Replaces the plain JS WindowManager class with a reactive Pinia store
that tracks window state, handles persistence to localStorage (ported
from the persistent-scratchbook branch), and provides the same public
interface (active, add, toggle, beforeUnload) so Galaxy.frame compat
is straightforward.
Draggable, resizable floating window rendered with position:fixed and
scoped styles matching the GModal aesthetic (rounded corners, white
header, soft layered shadow, clean typography). Drag is delta-based
via mousedown/mousemove on the header; resize via a bottom-right
handle. Focus management uses an iframe overlay that passes through
pointer events on the focused window.
App.vue now uses useWindowManagerStore and renders ScratchbookWindow
components directly instead of delegating to the WinBox-based
WindowManager class. Galaxy.frame still points to the store for
backward compat with router-push, ContentItem, and ChatGXY. Masthead
test updated to use a plain windowTab object instead of importing the
old WindowManager.
Drop the winbox npm package, delete window-manager.js and windows.scss,
remove the SCSS import from base.scss. Update navigation YAML selectors
and Selenium test helpers to use the new .scratchbook-window class
names. The core.windows.yaml tour still references #winbox-1 which
will need a follow-up update.
Scratchbook iframes load Galaxy with hide_masthead=true. Without this
guard, the inner App.vue would call restore(), read the parent's saved
windows from localStorage, and create windows inside itself recursively.
Gate both the store setup and window rendering on showMasthead.
Minimized windows collapse to just their title bar and stack
horizontally along the bottom edge, matching WinBox's minimize
behavior. Clicking a minimized window's header restores it.
Prevents windows from being dragged off-screen or resized beyond the
viewport edges, matching WinBox's default boundary behavior.
The old #winbox-1 ID no longer exists now that WinBox has been
replaced with a native Vue component.
dannon added 4 commits April 30, 2026 23:10
Nothing in the tree uses it; it was added during the rename out of an
abundance of caution but there are no callers.
Drop the stray blank line where 'winbox' lived, and let prettier sort
the imports while we're here.
The earlier rename commit replaced 'WinBox' with 'scratchbook' in the
selenium helper docstrings and the frame() context manager, which just
swapped one inconsistent name for another. Converge on 'window manager'
for everything I'm touching here.
@ahmedhamidawan ahmedhamidawan force-pushed the scratchbook-styling branch from ec116b5 to 5f037de Compare May 1, 2026 04:10
Copy link
Copy Markdown
Member

@ahmedhamidawan ahmedhamidawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran locally, works well and looks very sleek! Thank you @dannon !

(I believe failing tests are unrelated but reran one just to make sure...)

@mvdbeek mvdbeek merged commit 7572964 into galaxyproject:dev May 1, 2026
58 of 64 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies May 1, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in GCC Live Planning Board May 1, 2026
@guerler guerler added the release-testing-26.1 PRs marked for testing for the 26.1 release label May 2, 2026
@itisAliRH itisAliRH deleted the scratchbook-styling branch May 4, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client area/testing/selenium area/testing area/UI-UX highlight Included in user-facing release notes at the top kind/feature release-testing-26.1 PRs marked for testing for the 26.1 release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants