bokeh / ipywidgets_bokeh

Allows embedding of Jupyter widgets in Bokeh applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ipywidget bokeh messes up jupyter lab css

govinda18 opened this issue · comments

Ipywidget bokeh does not seem to work well with jupyter lab's css. Whenever it is loaded on the page with lab's css, it messes up the css of the lab. Here is a simple reproducer:

import panel as pn
import ipywidgets_bokeh
import ipywidgets as w
pn.extension()
pn.Row(ipywidgets_bokeh.IPyWidget(widget=w.HTML("asd")))

image

Note that the above is just for a reproducer. My use case requires me to load some javascript extensions I need dynamically on the page. For now, a workaround for me is to to not load it when I am in an ipynb environment.

In Panel docs we warn about this and ask you to load ipywidgets via the extension (i.e. with pn.extension('ipywidgets')) so that we can appropriately dispatch to the appropriate renderer depending on the environment we are running in.

In Panel docs we warn about this and ask you to load ipywidgets via the extension (i.e. with pn.extension('ipywidgets')) so that we can appropriately dispatch to the appropriate renderer depending on the environment we are running in.

Yep, I remember seeing that. My issue was actually related to holoviz/panel#4074. With the workaround I mentioned in the issue, ipywidgets-bokeh will always load on the page

@govinda18 I am going to work on #67 to see if updating ipywidgets_bokeh to use Bokeh 3.0 fixes these CSS issues. If it doesn't, then I'll try to figure out the culprit and will update this issue with anything I find out.