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

Offline voila + font-awesome stylesheet #539

Open
jeffyjefflabs opened this issue Feb 7, 2020 · 3 comments
Open

Offline voila + font-awesome stylesheet #539

jeffyjefflabs opened this issue Feb 7, 2020 · 3 comments

Comments

@jeffyjefflabs
Copy link
Contributor

My organization uses Voila on a corporate network without internet access. The default template links to unpkg.com for the font-awesome stylesheet. We can't get to that, so we're missing icons and things. For example, if you turn off internet then ipywidgets.Button(icon='search', description='hello') will have a placeholder/error icon in Voila instead the normal magnifying glass.

We can patch the template to point at the copy provided by notebook (for anyone in a similar situation: {{resources.base_url}}static/components/font-awesome/css/font-awesome.min.css), but that only works for the server extension, not the standalone app. Is it possible to bundle the stylesheet with Voila? (Worst case, we could host it somewhere on our network, but we'd prefer to avoid patching the template.)

@rjplatt
Copy link

rjplatt commented Jul 31, 2020

It would be great to see this remediated, and possibly a mechanism to block any external resource access (perhaps block-all-mixed-content policy?)

@jeffyjefflabs
Copy link
Contributor Author

I happened to notice jupyter-widgets/ipywidgets#2997 so just wanted to link the tickets together. I don't know if this is better addressed here or in ipywidgets or elsewhere.

As an update to my original post, we've tried a few of the other templates out there, and so far only the built-in lab/classic templates and voila-material work reasonably well offline. The vuetify and gridstack templates both load lots of external stuff so are basically unusable offline. One of the workarounds we're looking at is maintaining an "offline" version of the template. For the built-in lab template, this was pretty straightforward with jinja's inheritance mechanism, and it seems like it should be much less fragile than the diff/patch we're doing now! I haven't looked at doing that for the other templates yet, but we've got some notebooks using the old jupyter dashboards extension so we're definitely interested in the gridstack template.

@jtpio jtpio added this to the 0.5.0 milestone Mar 24, 2023
@trungleduc
Copy link
Member

I'm removing this issue from the 0.5.0 milestone as discussed in #1245 (comment)

@trungleduc trungleduc removed this from the 0.5.0 milestone Aug 1, 2023
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

4 participants