bokeh / ipywidgets_bokeh

Allows embedding of Jupyter widgets in Bokeh applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI cluttered while tring to use this library

ItamarShDev opened this issue · comments

Using the following code:

import panel as pn
from ipywidgets_bokeh import IPyWidget
from ipywidgets import FloatSlider
pn.extension()
angle = FloatSlider(min=0, max=360, value=0, step=1, description="Angle")
wrapper = IPyWidget(widget=angle, width=800, height=800)
pn.Row(wrapper)

resolved most times in the following UI clutter:
image

versions
image

I'm confused. What's hapepning here @ItamarShDev? It looks like your first picture just didn't finish loading.

The image is loaded fine.
What happens is:
Once I run the cell, the whole hi disappear.
Inspecting it shows that some div shrinks to around 80px and everything is hidden below it.

This library should not be used in a Jupyter context it's only for server deployment. In Panel you can instead just use the IPyWidget directly:

import panel as pn
from ipywidgets import FloatSlider

pn.extension()

angle = FloatSlider(min=0, max=360, value=0, step=1, description="Angle")
pn.Row(angle)