Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any support for "compound panels"? #48

Open
deeplook opened this issue Jul 14, 2020 · 4 comments
Open

Any support for "compound panels"? #48

deeplook opened this issue Jul 14, 2020 · 4 comments

Comments

@deeplook
Copy link

I think it's not existing yet, but it would be very nice to have some workspace-like support for panels. This would allow to create panel sets with some predefined layout as in the attached example from the start. At the moment I can create these only as a sequence filling up (and cluttering) the space, and I have to drag and drop them heavily to achieve some desired layout. I have used HBox/VBox hierachies before, but this is just so much more dynamic. ;)

codeview

@jtpio
Copy link
Owner

jtpio commented Jul 27, 2020

Thank @deeplook for opening and this and the screencast!

Yes it should eventually support restoring workspaces programmatically, so it becomes possible to script the UI in Python even more (by supporting the underlying Lumino layout format, or hooking into the lab workspace restoration).

@jtpio jtpio mentioned this issue Dec 14, 2020
@bollwyvl
Copy link
Contributor

Some more stuff here: jupyterlab/jupyterlab#12644 (comment)

@bollwyvl
Copy link
Contributor

I might be able to take a look at this in the near term.

I'm thinking the rough python API would be something like:

app = JupyterFrontEnd()
app.shell.workspace.data = {"layout-restorer:whatever": {}}
app.shell.workspace.metadata = {"layout-restorer:whatever": {}}

Presumably these would also be observable as individual traitlets. Going deeper into the model is probably not advisible as the children tabpanels come and go.

This would allow:

  • listing the current open panels
  • interactively updating the list of documents... within reason
    • it's probably not trivial to add ipylab panels declaratively via the restorer data
    • maybe we need some commands?
  • messing with all the sidebars, etc.

This would work... poorly in retro/notebook 7 of course, though...

@bollwyvl
Copy link
Contributor

Hm, one thought here: this might require a new widget_serialization kind of thing, with opaque Activity placeholders for things not create by ipylab (like the Notebook that launches them). It's also maybe worth separating the workspace into a WorkspaceManager which can handle multiple named things, potentially switching between them, as well as not incurring the sync overhead if nobody is listening to workspaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants