Skip to content
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

Altair and other JS extensions do not work in Voila or Colab #486

Closed
maartenbreddels opened this issue Jan 29, 2024 · 5 comments
Closed

Comments

@maartenbreddels
Copy link
Contributor

In https://github.com/widgetti/solara/blob/master/solara/widgets/vue/vegalite.vue
we assume the /_solara/_cdn/ endpoint can be reached. This endpoint exists in notebook, lab and solara server, but not in Voila (except when running as a voila extension in jupyter server) or colab.

A workaround for now is to manually set the solara_cdn javascript variable.

import IPython.display
# make solara use a real cdn, since the solara cdn proxy is not available
display(IPython.display.Javascript("solara_cdn = 'https://cdn.jsdelivr.net/npm/'"))
@maartenbreddels
Copy link
Contributor Author

Found this our while writing a test for #479

maartenbreddels added a commit that referenced this issue Jan 29, 2024
Based on:
 * #479
 * #480
 * #486

We decided that using the proxy and the cdn if the proxy is not used
is not only something to be used in solara server. In vscode
or colab, we cannot use the proxy, and need to use the cdn directly.
maartenbreddels added a commit that referenced this issue Jan 30, 2024
Based on:
 * #479
 * #480
 * #486

We decided that using the proxy and the cdn if the proxy is not used
is not only something to be used in solara server. In vscode
or colab, we cannot use the proxy, and need to use the cdn directly.
maartenbreddels added a commit that referenced this issue Jan 30, 2024
Fixes #486

We now default to not using the CDN proxy when we detect we are running
in voila.
maartenbreddels added a commit that referenced this issue Jan 30, 2024
Based on:
 * #479
 * #480
 * #486

We decided that using the proxy and the cdn if the proxy is not used
is not only something to be used in solara server. In vscode
or colab, we cannot use the proxy, and need to use the cdn directly.
maartenbreddels added a commit that referenced this issue Jan 30, 2024
Fixes #486

We now default to not using the CDN proxy when we detect we are running
in voila.
@maartenbreddels
Copy link
Contributor Author

Altair should work now due to #487, other js libraries not yet

@Jhsmit
Copy link
Contributor

Jhsmit commented Feb 5, 2024

For me Altair also doesnt work in notebooks

404 GET /_solara/cdn/[email protected]/require.js

@maartenbreddels
Copy link
Contributor Author

Should be fixed due to #479

Keeping this open till we fix this for the other libraries.

@maartenbreddels
Copy link
Contributor Author

Fixed in #763 (Solara 1.39.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants