You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with iSEE trying to get plots in dark mode. I noticed that even when browser is set to dark mode, plots are still white. There is a package called ggdark that turns plots to dark mode. Not all plots look wonderful (the rowTreePlot for example doesn't), but others do.
Do you think it would be possible to add a switch button to turn iSEE to dark mode? I tried adding a switch button in the app control dropdown menu, but I don't know how to access that input from within the plotting functions. Otherwise, plots could be easily switched to dark mode by:
if (input[[.generalAppMode]]){
plot_cmds[["dark_mode"]] <- "dark_mode() +"
}
I'm pretty curious if we can get this to work. Thanks in advance!
It seems that native shiny + bslib package or alternatively Bootstrap 4 version of shinydashboard (called bs4Dash) provide simple built-in observers (toggle sliders) to switch between light and dark mode. However, shinydashboard would require creating custom css and mode observer and using the package "thematic" to expand the theme to plots.
I quickly tried to use bs4Dash instead of shinydashboard, but the interface changes quite a lot and it even throws an error, so it's not straightforward to use.
shinydashboardPlus with dashboardPage(skin = "midnight", ...) is the simplest solution I could find. But unfortunately plotting functions from scater or miaViz which specify a theme will overwrite thematic dark theme so plots will still be white.
My impression from what I have seen so far is that only the newer wave with bslib enables what you would want to have.
And that, looking ahead, might be the way to go.
Still, iSEE as a whole is very tied onto the many features that are there in shinydashboard, which, unfortunately, went pretty stale in its development (but this was expected)...
IF we were to rewrite iSEE today, I would probably go strong on bslib. But luckily we do not need to do that (yet 😬 )
Yes good points. Plus even if it is actually possible to "upgrade" shinydashboard functionality with shinydashboardPlus, unfortunately many scater and miaViz plotting functions include a ggplot theme, so even setting dark mode in the app would be overwritten by the themes in those functions.
Activity
RiboRings commentedon Aug 11, 2025
It seems that native shiny + bslib package or alternatively Bootstrap 4 version of shinydashboard (called bs4Dash) provide simple built-in observers (toggle sliders) to switch between light and dark mode. However, shinydashboard would require creating custom css and mode observer and using the package "thematic" to expand the theme to plots.
I quickly tried to use bs4Dash instead of shinydashboard, but the interface changes quite a lot and it even throws an error, so it's not straightforward to use.
shinydashboardPlus with
dashboardPage(skin = "midnight", ...)is the simplest solution I could find. But unfortunately plotting functions from scater or miaViz which specify a theme will overwrite thematic dark theme so plots will still be white.Example with shiny + bslib: https://shiny.posit.co/r/components/inputs/dark-mode-switch/
Example with bs4Dash: https://bs4dash.rinterface.com/articles/step-by-step#create-a-basic-page
federicomarini commentedon Aug 22, 2025
My impression from what I have seen so far is that only the newer wave with
bslibenables what you would want to have.And that, looking ahead, might be the way to go.
Still, iSEE as a whole is very tied onto the many features that are there in shinydashboard, which, unfortunately, went pretty stale in its development (but this was expected)...
IF we were to rewrite iSEE today, I would probably go strong on bslib. But luckily we do not need to do that (yet 😬 )
RiboRings commentedon Aug 22, 2025
Thanks for the reply!
Yes good points. Plus even if it is actually possible to "upgrade" shinydashboard functionality with shinydashboardPlus, unfortunately many scater and miaViz plotting functions include a ggplot theme, so even setting dark mode in the app would be overwritten by the themes in those functions.