-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Support JupyterLab dark mode in dashboard plots #5200
Comments
Longer term, if there dashboard can be themed then that would be the way forward, as you suggest. If there are ways we could pass a theme as a URL query that could work for dynamically choosing a theme, or it could just be separately configurable. I am actually surprised that anything changes right now, since we don't pass any theme information to bokeh. I've noticed it before, but am not sure how bokeh reasons about/discovers the information to change it's text colors. @bryevdv do you have any suggestions about how to investigate that? I'm given to think that, unless there is an easy way for bokeh to change more colors for theming purposes, that we should just set a white background on the iframes until #2305 is resolved. |
@ian-r-rose @gjoseph92 Bokeh relies on whatever The only things that could conceivable react "automatically" are non-canvas elements, which include widgets and hover tools, since they are styled via CSS. Nothing on the canvas is styled with CSS, since canvas does not support that. However, we do try to namespace our CSS fairly rigidly so I'd also be surprised if external CSS changes showed up on non-canvas elements, either. As for how to move forward, I'm not very familiar with jupyter-lab extensions (and tbh I try to avoid Jupyter, mostly) Can the dark labextension call python code in the kernel? If so then perhaps the |
When using the dask labextension, plots are hard to read in dark mode because some of the colors don't adjust:
Text colors do change (titles, ticks) but others don't. Even just getting the grid lines to be dark instead of light would be 90% of the way to usability.
That said, I highly doubt there's a way for the dashboard to actually know it's being viewed by JupyterLab in dark mode. Since the plots are all iframe'd, we couldn't even do it with CSS variables that Jupyter sets, right? Maybe the extension could inform the scheduler to please change its dashboard theme?
xref #2305, jupyterlab/jupyterlab#3855
The text was updated successfully, but these errors were encountered: