jupyterlab / lumino

Lumino is a library for building interactive web applications
https://lumino.readthedocs.io/
Other
598 stars 127 forks source link

Splits with merge option for dock panels #582

Closed tavin closed 1 year ago

tavin commented 1 year ago

The point of this new feature is to avoid the following situation: Screenshot

I think it's a widely accepted convention to work in a layout of 3 panels: file tree, text editor, and preview. But if launching the preview always splits the editor widget, you keep winding up with 2 preview splits and you repeatedly have to drag one of the preview tabs over to the adjacent split.

To solve this I have introduced 4 new insert modes (merge-left, merge-right, merge-top, merge-bottom) which function like (split-left, split-right, split-top, split-bottom) but any existing splits will be reused. The behavior effectively changes to tab-after on the tab layout found to the left/right/top/bottom.

See the dockpanel example which now has a context menu for split and merge operations on the content widgets.

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

tavin commented 1 year ago

sure @krassowski maybe give me a few days, but I'm happy to address the fit & finish

tavin commented 1 year ago

@krassowski all the checks have passed now except macos/firefox which I guess is a known issue

tavin commented 1 year ago

@krassowski You're welcome. I presume someone will merge this (I don't have merge access)?

welcome[bot] commented 1 year ago

Congrats on your first merged pull request in this project! :tada: congrats Thank you for contributing, we are very proud of you! :heart: