Reputation: 5716
I'm trying to create a Popup widget in Jupyter as described in this vid:
from IPython.html import widgets
which gives the following warning:
ShimWarning: The
IPython.html
package has been deprecated. You should import fromnotebook
instead.IPython.html.widgets
has moved toipywidgets
. "IPython.html.widgets
has moved toipywidgets
."
However, ipywidgets
doesn't have a popup widget and there is nothing in its docs. (By the way, IPython.html.widgets
doesn't have a popup widget either)
How can I create a popup widget in jupyter?
Versions:
Jupyter 1.0.0
IPython 5.1.0
Upvotes: 8
Views: 11879
Reputation: 5716
Searching in IPython's repository I found that.. :
PopupWidget was removed from IPython. If you use the PopupWidget, try using a Box widget instead. If your notebook can't live without the popup functionality, subclass the Box widget (both in Python and JS) and use JQuery UI's draggable() and resizable() methods to mimic the behavior.
(emphasis mine)
@jdfreder's comment in related discussion:
The popup widget is an oddball in the built-in widget collection. After talking to the others during the last dev meeting (or meeting before last, I forget which), we came to the conclusion that it is best to remove the popup widget altogether. However, the underlying API that allows one to implement the popup widget will not be removed, see PR #7341 . If we do include something like the popup widget again, it will be implemented from scratch, probably as a phosphor component (or something similar).
@Sylvain Corlay in github chat:
We are moving away from bootstrapjs widgets. For the good cause bootstrap is a bad citizen of the browser. creates global variable etc.. With jupyterlab richer layouts should be enabled.
Upvotes: 10