-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add Light & Dark Theme #1461
base: main
Are you sure you want to change the base?
Add Light & Dark Theme #1461
Conversation
I need some time to think about this one, so won't put it in with this current release (sorry for the delay in getting to this in the first place) I understand the value in having a dark/light theme, but I'm thinking, as a first point of call, we could just offer to two themes as default in the configuration of the Dashboard, rather than expose a light/dark switch more in the side navigation directly. The positioning of the toggle is also tricky, I have dashboards, and have seen many others that have a full sidebar of pages, so this will float above a page and get in the way of navigation - that said, I can't necessarily think of better positioning. |
@joepavitt No problem, take your time. I realize there would be significant changes, and some clean-up might be required. Alternatively, we could use the JS approach: if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// dark mode
}
// watch for changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
const newColorScheme = event.matches ? "dark" : "light";
}); |
Description
Adds light and dark mode to D2.
Toggling theme
ScreenRecording_11-11-2024.21-43-11_1.MP4
Theme color config
Screen.Recording.2024-11-12.073931.mp4
Any ideas on how to improve theme color palette display? Or just leave out dark colors maybe...
UI Preview While Editing
(Might become obsolete with WYSIWYG editor)
Screen.Recording.2024-11-17.153557.mp4
Related Issue(s)
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label