-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lost interaction between ipywidgets when wrapped into bokeh #39
Comments
interaction between widgets is not working - I am digging into the |
Cross-posting from: https://discourse.bokeh.org/t/bokeh-2-4-issue-rendering-ipywidgets/8441/2 Can't manage to get a basic example working. The IPywidgets are rendered correctly into a bokeh server app, but the linking between widgets is lost. For the code above, see a running demo here: https://bokeh.epinux.com/ipw Thanks for any help! |
cc @mattpap @philippjfr for any comments |
Hi, is there any plan to re-add the ability to interact between I've tried different combinations of versions for the software involved, one that worked is the following:
|
@mattpap @philippjfr any hints on how can I debug this issue? is there any relevant log I can capture to help you debug this issue? perhaps by changing/adding logging statements into the src code? Thanks for any advice! |
@mattpap @philippjfr Any pointer on how to debug? (jslink not working between "wrapped" ipywidget linked to bokeh widget ) -- Is this bug going to be addressed ? |
This is still an issue :( I updated all the involved libraries to the latest stable version.:
the js console log:
|
There's not really anyone maintaining this at present. I expect this extension is of most interest to the panel/holoviz folks so perhaps issues on their trackers could encourage them to take up work on it.
you might try again, Bokeh 3.3 was just released and that 404 seems consistent with a "localhost' but that was just fixed. (Not enough information here to say at all for sure, though, just some speculation) |
Lightly maintained is probably more accurate, @mattpap and I have tried to fix the most crucial issues and put in a good amount of work to support latest releases of ipywidgets and Bokeh. Getting |
I understand that, it is such a cool feature to be able to get the best of two great ecosystem back working together. If there is anything I can do to help debuging and test changes - I will be more than happy to spend time on this. |
That would be really great. I'm not 100% sure what it would take. We need to understand how jslinks work. As far as I can tell jslink creates a |
I don't know if that can help, but I have pinned the last version where this system was actually working well - I can share a docker image if helpful. A starting point .. could be changing the src code to add some debug statements .. ? |
I experience similar issue. panel=1.5.0,bokeh=3.5.2,ipywidgets-bokeh=1.6.0,ipyaladin=0.5.0 .jslink worksHere we layout via an ipywidgets from ipyaladin import Aladin
from ipywidgets import Box, Layout, widgets
cosmetic_options = {"show_projection_control": False, "show_fullscreen_control": False}
a = Aladin(layout=Layout(width="100%"), target="M 81", fov=0.3, **cosmetic_options)
b = Aladin(layout=Layout(width="100%"), survey="P/DSS2/red", **cosmetic_options)
c = Aladin(layout=Layout(width="100%"), survey="P/2MASS/color", **cosmetic_options)
# synchronize target between 3 widgets
widgets.jslink((a, "_target"), (b, "_target"))
widgets.jslink((b, "_target"), (c, "_target"))
# synchronize FoV (zoom level) between 3 widgets
widgets.jslink((a, "_fov"), (b, "_fov"))
widgets.jslink((b, "_fov"), (c, "_fov"))
items = [a, b, c]
box_layout = Layout(
display="flex", flex_flow="row", align_items="stretch", border="solid", width="100%"
)
box = Box(children=items, layout=box_layout)
# See also https://github.com/cds-astro/ipyaladin/blob/master/examples/01_Getting_Started.ipynb
"""# 🛸 Getting Started
Displays an interactive sky view of the
[Mars Viking MDIM21 survey](https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21/) using \
[ipyaladin](https://github.com/cds-astro/ipyaladin) and \
[Panel](https://panel.holoviz.org/index.html).
[**More Examples**](./)
"""
import panel as pn
from ipyaladin import Aladin
pn.extension("ipywidgets", sizing_mode="stretch_width")
pn.template.FastListTemplate(
site="",
title="Getting Started with ipyaladin and Panel",
sidebar=[
pn.pane.PNG(
"https://avatars.githubusercontent.com/u/26145382?s=200&v=4",
link_url="https://cds.unistra.fr/",
),
__doc__,
],
main=[box],
accent="#296bb5",
main_layout=None,
).servable() ipyaladin-jslink.mp4.jslink not workingHere we layout via a panel from ipyaladin import Aladin
from ipywidgets import Box, Layout, widgets
cosmetic_options = {"show_projection_control": False, "show_fullscreen_control": False}
a = Aladin(layout=Layout(width="100%"), target="M 81", fov=0.3, **cosmetic_options)
b = Aladin(layout=Layout(width="100%"), survey="P/DSS2/red", **cosmetic_options)
c = Aladin(layout=Layout(width="100%"), survey="P/2MASS/color", **cosmetic_options)
# synchronize target between 3 widgets
widgets.jslink((a, "_target"), (b, "_target"))
widgets.jslink((b, "_target"), (c, "_target"))
# synchronize FoV (zoom level) between 3 widgets
widgets.jslink((a, "_fov"), (b, "_fov"))
widgets.jslink((b, "_fov"), (c, "_fov"))
# See also https://github.com/cds-astro/ipyaladin/blob/master/examples/01_Getting_Started.ipynb
"""# 🛸 Getting Started
Displays an interactive sky view of the
[Mars Viking MDIM21 survey](https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21/) using \
[ipyaladin](https://github.com/cds-astro/ipyaladin) and \
[Panel](https://panel.holoviz.org/index.html).
[**More Examples**](./)
"""
import panel as pn
from ipyaladin import Aladin
pn.extension("ipywidgets", sizing_mode="stretch_width")
box = pn.Row(
pn.panel(a, margin=0),
pn.panel(b, margin=0),
pn.panel(c, margin=0),
height=300,
margin=0,
)
pn.template.FastListTemplate(
site="",
title="Getting Started with ipyaladin and Panel",
sidebar=[
pn.pane.PNG(
"https://avatars.githubusercontent.com/u/26145382?s=200&v=4",
link_url="https://cds.unistra.fr/",
),
__doc__,
],
main=[box],
accent="#296bb5",
main_layout=None,
).servable() |
When wrapping interconnected
ipywidgets
(e.g.: anIPyWidget.IntSlider
with aipyleaflet.Map.zoom
) into anipywidgets_bokeh
, we lost the interaction between widgets.Attempt to reproduce the issue:
In the code above, the zoom slider should be connected with the zoom level into the
ipywidgets
map canvas.The text was updated successfully, but these errors were encountered: