Description
When using Dockview to implement a sidebar-style layout (similar to the Explorer panel in VS Code), panel sizing behavior becomes inconsistent when repositioning panels.
Problem
I have a narrow sidebar panel (~200px width, maxWidth set to 300px) alongside a main content panel that occupies the remaining space.
When I drag the sidebar panel from the left side to the right side:
- Both panels are resized to ~50% of the container width
- The sidebar panel exceeds its configured maxWidth
This breaks expected layout constraints and results in unusable UI proportions.
Expected Behavior
- The sidebar panel should retain its width (or respect maxWidth) when moved
- The main panel should absorb the remaining available space
- Panel movement should not implicitly trigger proportional redistribution if constraints are defined
Actual Behavior
- Panels are resized evenly (50/50 split), ignoring maxWidth
- Sidebar becomes significantly wider than intended
Environment
Proposed Solution
When reordering panels:
- Preserve existing panel sizes where constraints (maxWidth, minWidth) are defined
- Apply proportional resizing only when no explicit constraints exist
- Alternatively, introduce an option like:
preservePanelSizeOnMove: true
Description
When using Dockview to implement a sidebar-style layout (similar to the Explorer panel in VS Code), panel sizing behavior becomes inconsistent when repositioning panels.
Problem
I have a narrow sidebar panel (~200px width, maxWidth set to 300px) alongside a main content panel that occupies the remaining space.
When I drag the sidebar panel from the left side to the right side:
This breaks expected layout constraints and results in unusable UI proportions.
Expected Behavior
Actual Behavior
Environment
Proposed Solution
When reordering panels:
preservePanelSizeOnMove: true