You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Javascript inconsistent between PyPI and npm/unpkg #291
Qgrid widget does not display in Voila in certain scenarios. Please see ongoing discussion at voila-dashboards/voila#72. A couple people identified a workaround where they changed the first line of qgrid/index.js from this (which is what you get from PyPI):
Hey @jeffyjefflabs - thank you for reporting this (and apologies for the late response). This is currently fixed on master. Once we get through #287 (comment), we'll cut a new release.
Hmm ok so maybe the problem is actually that the nbextension and the labextension are different? The nbextension (installed via pip) contains (in local file nbextensions/qgrid/index.js) define(["@jupyter-widgets/base","base/js/dialog"].... Voila, when configured to server local nbextensions, will try to serve that local file, but since base/js/dialog is provided by the classic notebook and isn't there in Voila, you get an error. If you're offline, game over, qgrid won't work. If you're online, Voila will fallback to unpkg.com, in which case it's actually getting the labextension code instead, which then works.
Does that sound like a more plausible explanation for what's happening?
I know my colleagues really like the full-screen feature so I wouldn't want that to go away!
From this bit of code it seems like at one point base/js/dialog could be conditionally required. But without that external I'm guessing it ends up like the npm version (search for dialog), where it looks like webpack was unhappy about it. I'm not familiar with webpack at all, so I don't know if there's a way to make it play nice here.
Has this now been resolved ? We are impacted by this issue - qgrid not displaying in voila - causing all widgets to not be displayed -> Voila renders a blank screen (no errors).
I've applied the qgrid/index.js patch temporarily and voila now rendering my dashboard correctly (ipywidgets/qgrid).
Using:
python 3.8.1
qgrid 1.3.1
voila 0.2.7
ipywidgets 7.6.3
jupyter 1.0.0
jupyter_client 6.1.11
jupyter_core 4.7.1
jupyter_server 1.4.1
Activity
gerrymanoim commentedon Feb 18, 2020
Hey @jeffyjefflabs - thank you for reporting this (and apologies for the late response). This is currently fixed on master. Once we get through #287 (comment), we'll cut a new release.
gerrymanoim commentedon Feb 25, 2020
This is now released - let us know if it is still an issue.
jeffyjefflabs commentedon Feb 28, 2020
Looks good to me, thanks!
jeffyjefflabs commentedon Mar 6, 2020
@gerrymanoim did this get reverted somehow? I definitely tested it last week and it worked, but now it seems broken again. Am I losing my mind?
Fresh pip install, pip freeze shows 1.3.0, but does not work in voila (offline). Index.js line 1:
If I remove
base/js/dialogfrom thedefine, it works in voila. The unpkg.com version does not havebase/js/dialog.Thanks for the help.
gerrymanoim commentedon Mar 6, 2020
@jeffyjefflabs - We had to move to a new npm package - see the discussion here: #288.
The
unpkgversion for qgrid2 shows the right thing (I believe): https://unpkg.com/qgrid2@1.1.2/dist/index.js The instructions at https://github.com/quantopian/qgrid#jupyterlab-installation should also be referencing qgrid2 now.Apologies for the confusion.
jeffyjefflabs commentedon Mar 6, 2020
Hmm ok so maybe the problem is actually that the nbextension and the labextension are different? The nbextension (installed via pip) contains (in local file
nbextensions/qgrid/index.js)define(["@jupyter-widgets/base","base/js/dialog"].... Voila, when configured to server local nbextensions, will try to serve that local file, but sincebase/js/dialogis provided by the classic notebook and isn't there in Voila, you get an error. If you're offline, game over, qgrid won't work. If you're online, Voila will fallback to unpkg.com, in which case it's actually getting the labextension code instead, which then works.Does that sound like a more plausible explanation for what's happening?
gerrymanoim commentedon Mar 6, 2020
Ah - yes, I think that makes sense?
I believe that's coming in via https://github.com/quantopian/qgrid/blob/master/js/webpack.config.js#L63 which was added in b3f8379#diff-69efad4a1399d8cd8a26a3771ae156df.
I'm unclear on what effect that will have, if any, on non-lab users if we just drop that external.
jeffyjefflabs commentedon Mar 7, 2020
I know my colleagues really like the full-screen feature so I wouldn't want that to go away!
From this bit of code it seems like at one point
base/js/dialogcould be conditionally required. But without that external I'm guessing it ends up like the npm version (search for dialog), where it looks like webpack was unhappy about it. I'm not familiar with webpack at all, so I don't know if there's a way to make it play nice here.gerrymanoim commentedon Mar 9, 2020
I'm also not all that familiar with webpack, but it seems like it should be possible.
I've created #298 to track this outside the PR thread. Will try to find some time to research a solution.
jeffyjefflabs commentedon Mar 11, 2020
Awesome, thanks for continuing to look into it. Fortunately we have a couple workarounds, so we're not dead in the water.
bytesemantics commentedon Mar 8, 2021
Has this now been resolved ? We are impacted by this issue - qgrid not displaying in voila - causing all widgets to not be displayed -> Voila renders a blank screen (no errors).
I've applied the qgrid/index.js patch temporarily and voila now rendering my dashboard correctly (ipywidgets/qgrid).
Using:
python 3.8.1
qgrid 1.3.1
voila 0.2.7
ipywidgets 7.6.3
jupyter 1.0.0
jupyter_client 6.1.11
jupyter_core 4.7.1
jupyter_server 1.4.1
Any ideas ? (Thanks in advance)