voila-dashboards / voici

Voici turns any Jupyter Notebook into a static web application
https://voici.readthedocs.io/
Other
143 stars 8 forks source link

Embeddable voici app #79

Closed ogrisel closed 1 year ago

ogrisel commented 1 year ago

I would be convenient to provide a way to embed a voici app into an HTML pages such as a sphinx-based user guide to make it more interactive.

By default the demo just display a static png rendering with an overlay "play" or "run demo" button in the center (in the spirit of an HTML5 video player) so as to not download a big WASM app by default if the reader is not interested in running it.

When clicking on the run demo button the WASM app would start loading and replace the place holder png image by a the usual voici loading wheel. Ideally the height and width of the placeholder would be preserve to avoid causing a resize or movement in the rendering of the surrounding of the web page.

The bottom right corner of the embedded demo could have a fullscreen icon to make it possible to switch to running the demo in full screen (especially useful when interacting with the demo from a mobile device).

martinRenou commented 1 year ago

It may already be possible by combining jupyterlite-sphinx with voici, because voici a jupyterlite plugin.

I haven't had the time to play with this yet but it is on the roadmap.

By default the demo just display a static png rendering with an overlay "play" or "run demo" button in the center (in the spirit of an HTML5 video player) so as to not download a big WASM app by default if the reader is not interested in running it.

jupyterlite-sphinx already does this 👍🏽

We may want to update jupyterlite-sphinx to provide some sphinx directives for Voici specifically.

ogrisel commented 1 year ago

We may want to update jupyterlite-sphinx to provide some sphinx directives for Voici specifically.

That would be great thanks!

martinRenou commented 1 year ago

This is now possible to use Voici with the latest jupyterlite-sphinx!

Please report there if you have any issue :)

See https://jupyterlite-sphinx.readthedocs.io/en/latest/directives/voici.html