Skip to content
Snippets Groups Projects

feat: implement dark mode edge labels

Merged Dennis Collaris requested to merge feat/dark-mode-edge-labels into main

This PR also moves the dark mode setting into the global config (redux). I don't think it makes sense for dark mode to be included in the saveState session, and can be different per device. Hence I opted for persisting using localStorage like Duncan's original implementation.

There are two new fields: theme (which can be system, dark, light), and currentTheme (which is only dark and light). The latter automatically updates when the system configuration changes (i.e., I change my MacOS to dark mode).

From any view, you can now observe useConfig().currentTheme and ensure the view is always up to date.

I am a bit new to redux though, so let me know if there is a better option. I explored redux selectors, but ultimately gave up because I couldn't manually trigger an update event for those.

Preview

Screen_Recording_2024-07-26_at_15.25.03

Edited by Dennis Collaris

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading