jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.1k stars 946 forks source link

DRAFT: Single widget manager per kernel #3922

Open fleming79 opened 1 month ago

fleming79 commented 1 month ago

Replaces https://github.com/jupyter-widgets/ipywidgets/pull/3920.

Features:

Significant changes

Notebooks and Consoles can share widgets.

image

When the notebook closes (its kernel connection has the comms), the connection is broken.

image

Opening a new kernel connection (in this case a console) restores the connection.

image image

Closing the console that has the kernel comms connection again breaks the connection.

image

Shutting down the kernel breaks the connection.

image

Loading a new notebook (that was tracking the widget state) with a new kernel, doesn't have widgets in the kernel, so the widgets appear with broken links.

image

Connecting a notebook to another kernel means the connection to the widgets in the original connection remain unbroken when the notebook is closed.

image image

github-actions[bot] commented 1 month ago

Binder :point_left: Launch a binder notebook on branch fleming79/ipywidgets/per-kernel-widget-manager