Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create export to Gridstack Voila (Dejavu?) HTML menu item in Jupyter Lab? #180

Open
bdklahn opened this issue Aug 2, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@bdklahn
Copy link

bdklahn commented Aug 2, 2022

Screenshot_20220802_152058
Hello!
I love the gridstack template! I almost feel like it should be used as the default one for HTML export. It seems only natural to not want to limit display to only one column, for an html page.
Even old-school, primitive, web pages have sidebars, etc. :-)

But I understand the legacy of just wanting to clearly display the linear progression of a notebook exploration.

Anyway . . . I wonder how hard it might be to include a menu option to (apply the Voila/Dejavu settings and) export using the gridstack template. I mean . . . I guess one can download the displayed "breakout web page", but . . .

Here's how I now do it in a small "render_utils" library I created (which also handles papermill parameters cell injection).

    c = Config()
    c.TemplateExporter.exclude_input = True
    c.TemplateExporter.exclude_output_prompt = True
    c.TemplateExporter.exclude_input_prompt = True
    c.ExecutePreprocessor.enabled=True
    c.HTMLExporter.template_name = 'gridstack'

(and I guess that might even be able to just inherit from the Voila template???)
Would it be too hard to add something like the Reveal.js one?

Thanks!

PS. It occurs to me that maybe the Jupyter Lab repo is a more appropriate place to post this, but . . .

@bdklahn bdklahn added the enhancement New feature or request label Aug 2, 2022
@bdklahn bdklahn changed the title Create export to Gridstack Voila (Dejavu?) HTML menu item? Create export to Gridstack Voila (Dejavu?) HTML menu item in Jupyter Lab? Aug 2, 2022
@hbcarlos
Copy link
Member

hbcarlos commented Aug 3, 2022

Hi @bdklahn! Thank you for the kind words.
I believe the items on the export menu come from nbconvet, and Jupyterlab just uses nbconvert to export the notebook with the desired template.

We will need to move the template to the nbconvert project and then add the option in JupyterLab.

PS. It occurs to me that maybe the Jupyter Lab repo is a more appropriate place to post this, but . . .

I think the place would be here and in nbconvert:
https://github.com/jupyter/nbconvert

@bdklahn
Copy link
Author

bdklahn commented Sep 1, 2022

Yes, I know that these templates are nbconvert-based, and (should) leverage that standard. But I didn't think that nbconvert maintained the graphical interfaces for manipulating and rendering these, nor was responsible for maintaining all the community-provided templates. I was/am thinking that, whoever maintains, say, the Jupyter Gridstack editor (which I assume must already utilize nbconvert rendering when it "pops out" a new browser window, with html), could fairly easily add another small graphical element in the form of an export menu entry. It seems like the entry would have to activate a very similar rendering config to that pop out, but maybe also offer the export location to be a server writable location (if/where available).
I thought maybe that was here.
But maybe it is not here where that editor is maintained . . . or maybe the menu items are considered more "core" additions to the Jupyter Lab UI.
Is it the case that nbconvert, in addition to offering rendering and the templating spec, is also responsible for what templates are "blessed" to have a place in that menu?

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

No branches or pull requests

2 participants