jtpio / ipylab

Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle restore

jtpio opened this issue · comments

At the moment the panels are not restored on page refresh.

not-restored

We could transparently use the LayoutRestorer to transparently restore these panels that are added to the shell.

Maybe we could use a similar approach as @saulshanabrook did in https://github.com/Quansight-Labs/jupyter-widgets-takeover, instead of relying on the widget's pWidget.

I spoke too soon, unfortunately...

Issue is we don't save the arguments to restorer.restore(tracker, options) anywhere so we have no way of re-restoring widgets later :(

It sounds like it should be doable, but would maybe require writing a custom widget manager though.

But it looks functional :)

I guess it would even make sense to be able to remove the chrome in core lab as well.

Ah I see you posted in jupyterlab/jupyterlab#2031 👍

Yeah it's functional haha after many tears...

I think this can be closed, now?

Thanks @dsblank. Yes there is now basic support for this using the widget restoring process.

The next steps could be looking into more advanced layouts like in #48, and be able to restore the layout even if the widgets don't exist on the Python side yet (recreating them from a notebook path).