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

Equivalent of the "Voila preview extension" for Voici #88

Open
jsignell opened this issue Aug 4, 2023 · 5 comments
Open

Equivalent of the "Voila preview extension" for Voici #88

jsignell opened this issue Aug 4, 2023 · 5 comments
Labels
enhancement New feature or request feature

Comments

@jsignell
Copy link

jsignell commented Aug 4, 2023

Problem

I have now spent some time developing a voici dashboard and my process looks like:

  1. build the notebook for jupyterlite
  2. open jupyterlite in a new private window to avoid any previous state
  3. make changes and run notebook to make sure things are working
  4. download the notebook
  5. build the notebook for voici
  6. check that things look right
  7. push the changes to github

Proposed Solution

It would be great to use the voila extension in jupyterlite to render voici.

Additional context

This might be related to #19

@jsignell jsignell added the enhancement New feature or request label Aug 4, 2023
@martinRenou
Copy link
Member

Thank you for opening an issue.

Do you mean you are requesting being able to use the voila preview extension inside the JupyterLite lab UI?

@jsignell
Copy link
Author

Do you mean you are requesting being able to use the voila preview extension inside the JupyterLite lab UI?

Yes that is exactly right, but I am also open to other suggestions. There might already be a better pattern than the one I described.

@martinRenou
Copy link
Member

Unfortunately this will be tricky to implement as of today.

Currently, Voici works by pre-rendering the dashboard template prior to serving the webpage.

In order to implement the preview extension (and some equivalent of the voila server extension), we would need Voici to render the template on the fly in the webpage. So we would need to either run Jinja/nbconvert in WASM Python, or we would need to implement a lighter equivalent (https://github.com/mitsuhiko/minijinja compiled to WASM?). We could mimick the server extension by having a worker lying around ready to render templates upon request.

I would love to see something like that happen.

@martinRenou martinRenou changed the title Voici extension support in jupyterlite Equivalent of the "Voila preview extension" for Voici Aug 22, 2023
@trungleduc
Copy link
Member

Actually, we can make a new extension that works with the lab template, and to some extent, the gridstack template, without using Jinja

@martinRenou
Copy link
Member

Indeed, that would be another step in the direction of not supporting the Jinja templates and nbconvert... Still don't know how I feel about this.

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

No branches or pull requests

3 participants