jupyter-widgets / ipywidgets

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

Make output widgets specific to widget manager with private rendermime reference #1788

Open jasongrout opened 6 years ago

jasongrout commented 6 years ago

Output widgets depend very much on the widget manager. Right now, this forces the widget manager to provide interfaces for things like the document rendermime and the kernel context - things we generally don't want widgets to rely on because they are very specific to the widget manager.

It may be cleaner to special-case the output widget, so that it has a private reference to the rendermime and kernel context, but not expose those things to general widgets.

jasongrout commented 6 years ago

See also #1781

pbugnion commented 6 years ago

That sounds like a great idea. Having to reference the rendermime in the widget manager always seemed odd.