-
Notifications
You must be signed in to change notification settings - Fork 896
feat: add optional dark mode feature #5065
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
base: main
Are you sure you want to change the base?
Conversation
This PR adds an optional dark mode to TeslaMate with three appearance options: - Light (default): Always use light theme - Follow System: Automatically match OS/browser dark mode preference - Dark: Always use dark theme Key features: - Database-persisted theme preference in GlobalSettings - Comprehensive dark mode styling for all UI components - Monochrome map tiles in dark mode (Tesla-inspired aesthetic) - Instant theme switching without page reload - No flash of wrong theme on page load - Defaults to light mode for existing users Technical implementation: - New theme_mode field in settings table (migration included) - CSS custom properties for theme colors - JavaScript theme detection and system preference monitoring - LiveView hook for instant theme changes - Inverted OSM map tiles with grayscale filter for dark mode Maintains backward compatibility - existing installations will default to light mode and users can opt-in to dark mode.
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Dutch: Thema, Weergave, Licht, Donker, Volg systeem - French: Thème, Apparence, Clair, Sombre, Suivre le système - German: Design, Darstellung, Hell, Dunkel, Systemeinstellung folgen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! It is very much appreciated, as #461 and #2729 /#2730 were never finished.
Currently, we only have the status bar sync to system; see #2840.
From my point of view:
- We should default to
system, as this is the best and default state-of-the-art UX - Add a test for the new setting
- Add it to the README and docs and Screenshots
priv/repo/migrations/20251207212310_add_theme_mode_to_settings.exs
Outdated
Show resolved
Hide resolved
JakobLichterfeld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for processing the findings.
Beside of the small .gitignore finding, this PR is near perfect, thanks so much!
JakobLichterfeld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, ty!
After some tests on my side, it will be merged.

This PR adds an optional dark mode to TeslaMate with three appearance options:
Key features:
Technical implementation:
Maintains backward compatibility - the migration sets the default to "system", providing the best out-of-box experience by respecting user preferences.