mathuo / dockview

Zero dependency Docking Layout Manager. Supports Vanilla TypeScript, React and Vue.
https://dockview.dev
MIT License
636 stars 45 forks source link

Panel and Group default sizes and bounding dimensions #640

Closed mathuo closed 1 week ago

mathuo commented 2 months ago

To implement

lupod commented 1 month ago

Not sure if it fits this issue but I'd like to request a change of behaviour when dragging a panel onto another panel to create a group with tabs. Let's look at an example where I have a window that is 1000px wide and three panels A, B, C next to each other. A and C are 100px wide each, and B in the middle takes the remaining 800px.

Current Behaviour: If I drag C onto A to create a tab group, then as a result both that tab group and B will each have a width of about 500px. This feels unintuitive as both the dragged panel and the target panel had a width of 100px which is much smaller.

Desired Behaviour: If I drag C onto A to create a tab group, that tab group should remain at the size that A had originally. This feels more like what I'm used to from other software with a dock view layout.

vincent-lecrubier-skydio commented 1 month ago

Piece of advice here: Might be worth considering using the Flexbox model directly

lupod commented 1 month ago

Piece of advice here: Might be worth considering using the Flexbox model directly

Just CSS flex does not give me docking functionality... or do you mean something else?

mathuo commented 1 week ago

1.17.1 Releases changes related to initial, maximum and minimum sizes as well as a small change to prevent group resizing when moving groups.

See http://localhost:3000/docs/core/panels/add#minimum-and-maximum

See https://github.com/mathuo/dockview/issues/708 for continued work on group size preservation