Skip to content

feat(layout): split, close, move and resize individual views - #1054

Merged
PaulHax merged 4 commits into
mainfrom
flexible-view-splits
Nov 29, 2026
Merged

PaulHax merged 4 commits into
mainfrom
flexible-view-splits

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Lets users build their own view layouts instead of choosing only from the fixed named layouts.

What users can do

  • Split any view side by side or top and bottom from the View actions button to the right of the view type selector. The new view starts with the same image, slice, window/level, camera and en face settings as the original.
  • Maximize or restore a view from the same menu, in addition to double-clicking it.
  • Close any view. Its space goes to an adjacent view, usually the other half of the split it came from. Closing the view a split just added returns to the previous layout.
  • Move a view by dragging the grip at the end of its controls, after the View actions button, onto another view. Dropping near an edge of that view docks the moved view on that side, taking half of its space; dropping in the middle swaps the two views. A highlight shows where the view will land, and Escape cancels. Edges are offered only where the target is large enough to split. The grip is disabled while a view is maximized or when only one view is open.
  • Drag the line between two views to resize them. Lines that line up across rows or columns, such as the center of Four Up, move together. Double-clicking a line makes its two neighbors equal again. Views cannot be dragged below a size where their controls stop being usable.
  • Save and load sessions with custom layouts, including view sizes. A saved layout is restored only when each pane names a saved view exactly once; otherwise the current views stay and show the session's data.

Menu actions stay visible but disabled, with a tooltip, when they cannot apply: a split when the view is too small or maximized, and Maximize or Close when only one view is open.

Behavior changes

  • The layout tree now refers to views by ID instead of slot index, and layoutSlots is gone.
  • Choosing a named layout or a grid size starts over: every pane gets a new view showing the current image, and earlier views and their settings, such as slice and zoom, are deleted. Window/level, the base image palette and visibility carry over to the new views, except en face views. A session opened together with a config keeps its own layout. Picking the current layout again resets it. A named layout counts as current only while its panes match the template, so after a split or close it no longer shows as selected.
  • Closing a view deletes it and its settings.
  • The state file version is now 9.0.0. Older files are migrated: slot-based layouts become view ID layouts, and views the old layout hid are dropped. A layout with a slot no saved view fills is dropped, so the file opens in the current layout.
  • The overlay text in each view now truncates instead of running under the view controls in narrow views. The en face rendering controls button uses the same quiet style as the View actions button.

@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 7748924
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6b0b73912024529fb62460b9
😎 Deploy Preview https://deploy-preview-1054--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@PaulHax PaulHax changed the title feat(layout): split, close and resize individual views feat(layout): split, close, move and resize individual views Nov 26, 2026
@PaulHax
PaulHax force-pushed the flexible-view-splits branch 8 times, most recently from 9b217c2 to 5670f17 Compare November 28, 2026 23:47
The View actions button beside each view's type selector splits it side
by side or top and bottom, or closes it. A closed view's space goes to
the other half of its split, so closing a view a split just added
restores the previous layout. A new view starts with the original's
image, slice, window/level, camera and en face settings. Split actions
stay visible but disabled, with the reason, when the new panes would be
too small or a view is maximized.

Dragging the line between two views resizes them. Dividers that line up
across rows or columns move together, a double click restores equal
sizes, panes stop at the split guard's minimum size, and Escape or a
canceled pointer reverts the drag.

The layout tree names views by ID instead of slot index and carries
optional sizes, so layoutSlots is gone and the state file version is
9.0.0. Older files migrate their slot layouts to view IDs and drop views
the old layout hid. A saved layout is restored only when each pane
names a saved view exactly once, and only the views it shows load their
settings; otherwise the current views stay and show the restored data.
A session opened together with a config keeps its own layout and views,
whichever file loads first, and the config's named layouts still join
the layout menu.

Picking a named layout or a grid size starts over with new views of the
current image, which keep each image's window/level, palette and
visibility. Closing a view deletes it and its settings.
The split menu becomes View actions and gains Maximize view, or Restore
view on the maximized view. Maximize is disabled when only one view is
open, which is also the reason Close view now gives. A lone view never
counts as maximized, so double-clicking it leaves Split and Move
available.
A grip at the end of each view's controls, after the View actions
button, drags the view onto another pane. Dropping near an edge docks
it on that side, halving the target; dropping in the middle swaps the
two views. The drop highlight shows the pane the view will take in the
layout the drop commits. Escape cancels, as does removing the handle
mid-drag.
A pane too narrow for the full controls row shows only the View actions
and move handle, and the View actions menu lists the view types. Cine
panes drop the FPS label instead. Every view's controls now fit inside
the minimum pane width. Picking the current type from the menu keeps the
view and its settings.
@PaulHax
PaulHax force-pushed the flexible-view-splits branch from 5670f17 to 7748924 Compare November 29, 2026 00:36
@PaulHax
PaulHax merged commit 751ddf5 into main Nov 29, 2026
17 checks passed
@PaulHax
PaulHax deleted the flexible-view-splits branch November 29, 2026 02:38
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.

1 participant