Open madhu-mallisseri opened 8 years ago
@madhu-mallisseri Can you tell me more about your setup? Are you using the developer docker containers / images in this repo?
I am using the setup as provided in the "All-in-one" example. https://gist.github.com/parente/527cea0481afe9fabbcd
modified the docker-compose.yml, to remove notebook container.
Confirmed with the gist. Checking to see if things are better on master. If not, it's quite possible we don't have the right code in place to support ipywidgets dynamically creating other widgets.
we don't have the right code in place to support ipywidgets dynamically creating other widgets.
Yep.
https://github.com/jupyter-incubator/dashboards_server/blob/master/public/js/widget-manager.js#L74
We track the initial pending kernel executions to link up the output of a code execution with an output area. But when the code execution is dynamically triggered by an existing widget after initial load, we don't have the source of the execution stashed anywhere in order to put the result into the DOM when it comes back.
Here's what the nbextension for ipywidgets does:
Relies on the notebook and code cell objects as well as the kernel to map message IDs to cells containing widgets. We don't have either so we'll have to invent something new.
Notebook for future ref when we are in a position to tackle this: https://gist.github.com/parente/767147f18c69794f0cee190b6741a52f
Possibly related, even simpler problem to tackle: ipywidget calls a function, function prints, print output comes in on a regular stream message (not comm), stream message is lost because the widget association is not known.
we don't have the right code in place to support ipywidgets dynamically creating other widgets.
@parente Is there a solution for this yet?
No and development has stalled.
The dashboard code has to be updated to use newer versions of the jupyterlab + ipywidgets packages before this bug can get tackled. Otherwise, the fix runs the risk of being immediately out of date and irrelevant.
I have a notebook (snippet below) which has an ipywidget button. I need to display a checkbox on click of the button. This works as expected in jupyter. When this notebook is deployed to a dashboard server, on click of button, checkbox is not displayed.
notebook:
JS Console error: