-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Somewhat related to pydata/pydata-sphinx-theme#745
pydata-sphinx-theme has a theme switch allowing to go from a light to a dark theme. We could have the embedded jupyterlite respect the current theme flavor.
In order to do this, we need to tell JupyterLab app which theme to use:
Proposed Solution
For replite
For replite it's quite straightforward, we can simply change the URL to pass the right query parameter ?theme=Jupyterlab Dark.
For JupyterLite and RetroLite
We can probably force JupyterLab to expose its app object with:
iframe.addEventListener('load', () => {
iframe.contentWindow.document.body.dataset.exposeAppInBrowser = "true";
});And then use the iframe.contentWindow.jupyterapp object to access the themeManager and make it switch to the theme flavor that is currently used in the docs?
Pinging @jtpio in case you have some ideas
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request