jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.16k stars 3.38k forks source link

Create CSS bundle for @jupyter/theme-[light/dark]-extension #6315

Open SylvainCorlay opened 5 years ago

SylvainCorlay commented 5 years ago

It would be very useful if the unpkg distribution of theme-light-extension and theme-dark-extension included a CSS bundle inlining all the resources (images, urls.css, variables.css) to that it can be included as nbconvert inlining resources.

This is related to https://github.com/jupyterlab/jupyterlab/pull/6314, and such a bundle could be produced in the same way.

blink1073 commented 5 years ago

I think that is better than adding a new no-op package to the core distribution.

blink1073 commented 5 years ago

Unless you need both. 😁

SylvainCorlay commented 5 years ago

Unless you need both. :grin:

Yes, I think I need both.

It seems that theme-[light/dark]-extension version 0.19.1 has exactly what I need in the generated embed.css file, which is not generated anymore in 1.0.0-alpha.6.

blink1073 commented 5 years ago

This PR removed the static css: https://github.com/jupyterlab/jupyterlab/pull/5505.
To bring it back, we'd have to reinstate the webpack config, deps and static files metadata in the packages, reinstate the build-themes.ts script, and run that script as part of prepublish.ts.

jasongrout commented 5 years ago

We could just build the embed css file to be in the published package without using it ourselves, and keep the existing streamlined build for jlab itself. So basically:

Is that what you were saying above, @blink1073? Or were you imagining us reverting to use the two-step webpack process for jlab itself?

SylvainCorlay commented 5 years ago

We could just build the embed css file to be in the published package without using it ourselves, and keep the existing streamlined build for jlab itself

That is exactly what I had in mind.

blink1073 commented 5 years ago

Ditto

SylvainCorlay commented 5 years ago

Note: the same issue is coming up for other contexts than voila at the moment.