-
Notifications
You must be signed in to change notification settings - Fork 13
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
Disable "save widget state automatically" via notebook command? #137
Comments
Looks like the command id should be: It's not part of core JupyterLab, it comes from the ipywidgets extension. For reference you can use |
Ohh, that's amazing, thanks for these great snippets! from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute('@jupyter-widgets/jupyterlab-manager:saveWidgetState') and indeed, this toggles the saveWidgetState. If it was off before, it's on afterward. That's great, however this is not very useful in a real live scenario. |
Maybe the best would be to add commands for saving and clearing the state to ipywidgets directly, like it was the case in the classic notebook. There is an issue tracking this: jupyter-widgets/ipywidgets#3672 To have 3 commands:
|
I'm looking for a snippet similar to
but instead of insert-cell-below, I would like to disable "save widget state automatically".
That way, I could enable "save widget state automatically" by default for all my notebooks, and exclude some notebooks where I don't want to save widget states.
Here's a list of notebook commands that I found, but I don't know which one is right for disabling saving the widget state
https://github.com/jupyterlab/jupyterlab/blob/49f6ec28b738243a53a947d544bebafafcbd4a73/packages/notebook-extension/src/index.ts#L136-L325
Looking forward to suggestions and ideas!
The text was updated successfully, but these errors were encountered: