jewel icon indicating copy to clipboard operation
jewel copied to clipboard

SplitLayout cannot be nested with the current policy

Open fscarponi opened this issue 2 years ago • 4 comments

with the current implementation, creating a split pane with three panes (common use case in IJ) is possible but encounters many issues and no good code readability. (nesting 2 SplitLayouts) As an example, resizing the window or a single pane will break the inner split pane resize if there is a min/max ratio specified, and in some cases you lose control of the divider.

fscarponi avatar Dec 19 '23 08:12 fscarponi

Is anyone currently working on this? I need something like IJ's ThreeComponentsSplitter in a Jewel/Compose app and would be happy to look into some changes to the SplitLayout components to make them a bit more flexible for this use-case.

garyttierney avatar May 01 '24 01:05 garyttierney

I was meaning to, but didn't have time :( we'd be happy to get help on it.

I was looking at using Accompanist's TwoPane as a reference, minus the adaptive part, if this helps

rock3r avatar May 01 '24 06:05 rock3r

Just dropping an update to say I am currently working on this and should have a PR at least in draft sometime this week.

I've replaced the current 2-component splitter with an N-component splitter and am making sure it works for what I think are the main use cases (the current 2-component splitter and an IJ style 3-component splitter where the middle expands on resize).

garyttierney avatar May 07 '24 12:05 garyttierney

Excellent, very happy to hear this Gary :)

rock3r avatar May 07 '24 13:05 rock3r

Merged into #273

rock3r avatar Aug 26 '24 15:08 rock3r