compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Improve SplitPaneState

Open vdshb opened this issue 2 years ago • 6 comments

Improve SplitPane programmatic configuration through changes in SplitPaneState. Add programmatic SplitPane programmatic configuration changes to demo.

vdshb avatar Nov 25 '23 08:11 vdshb

BTW, I'm not slightly insist on changing the demo-app. I just thought this change might be benificial. It might be easily reverted.

vdshb avatar Dec 19 '23 03:12 vdshb

@m-sasha , could you please review this PR?

vdshb avatar Apr 22 '24 08:04 vdshb

@m-sasha , @MatkovIvan What can I do to clarify the state of this PR? It's pretty small (tiny if you are not interested in demo-app changes), but it's ignored for quiet a while.

vdshb avatar Apr 29 '24 10:04 vdshb

Making moveEnabled settable makes sense, but I'm not sure what the change to positionPercentage is trying to achieve. Also, I don't like the code duplication in the positionPercentage setter and dispatchRawMovement.

m-sasha avatar Apr 30 '24 11:04 m-sasha

I'm not sure what the change to positionPercentage is trying to achieve.

Effectively it's making positionPercentage settable as well. I've just overcomplicated it initially.

You can revert SplitPaneState and see, that new functions in changed demo-app (Set fraction V and Set fraction H) are not working without it.

I personally use it to save state of multiple SplitPanes on application close, to restore them on fresh application start.

Also, I don't like the code duplication in the positionPercentage setter and dispatchRawMovement.

Fair. It was my initial laziness to investigate how positionPercentage and dispatchRawMovement really work. I've changed it. It is much simpler now.

vdshb avatar May 06 '24 08:05 vdshb

@m-sasha, any feedback?

vdshb avatar May 17 '24 09:05 vdshb

@m-sasha, @MatkovIvan What can I do to make this PR closer to merge? It's become pretty simple and even smaller since the last change.

vdshb avatar Jun 04 '24 09:06 vdshb

Sorry, I've just been busy with more urgent issues recently. I'll try to give it another look soon.

m-sasha avatar Jun 04 '24 11:06 m-sasha

Thanks for eventually merged improvement!

vdshb avatar Jun 17 '24 15:06 vdshb