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";
}); |
|
@cgjgh Can I do this using ui_template node |
|
@Aridzki No, this PR needs to be merged first. |
|
This looks great and I love the idea of being able to manipulate the theme, but may I suggest we simply expose the ability to control theme changes through ui_control node? We can define multiple themes and then direct the ui_node which theme to load programmatically through the flows like anything else. |
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/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel