Light/dark mode toggle is illogical/buggy

AI-generated summary

The Light/Dark Mode Toggle in Discourse is considered illogical/buggy by ozzi due to its visibility settings. To show the toggle, specific conditions must be met, including setting the site default dark color scheme ID and enabling the interface color selector. However, the toggle is only visible if the scheme is set to light, which can be confusing for users. Dave247 suggests that the toggle should be forcefully enabled for all users, as the current system is unnecessarily complex. awesomerobot confirms that this issue is being addressed, and improvements to light/dark color palettes are in the works. Meanwhile, Andrew_Rowe is using the Dark/Light Mode Toggle Plugin as a workaround and is glad to hear that further development is being considered for the official feature.

Dark/Light Mode Toggle was released in core but it is illogical/buggy. I would like to offer light and dark themes and show the toggle always to all users. Default would be automatic setting based on device preference.

To get the toggle to show I need to:

  • Set site default dark color scheme ID in settings to correct dark scheme
  • Enable interface color selector to header or sidebar
  • Set theme default color scheme to light scheme (if dark, not visible to logged out users)

This will show the toggle for logged out users. However, to show the toggle for logged in users, the user needs to:

  • From user settings change color scheme to light
  • From user settings enable “automatic dark mode color palette”

Now the toggle is visible and can be used to switch between dark/light schemes. If the user changes the scheme to light in the user settings the toggle will disappear.

To go around this, I could only set the light theme to be selectable for users but then the user would still need to enable “automatic dark mode color palette” from the settings to show the toggle.

As a summary, the switch is only visible if scheme set to light (system default or user setting). This is confusing for the users.

4 Likes

I assume it was done like this so not to mess with existing sites and users settings, but it makes the whole thing unnecessarily confusing. There should be a way to force enable it for all users, as there’s not really much reason why there needs to be two systems that both do the same thing (with one of them doing it better) to exist at the same time.

4 Likes

Yeah this issue has been bugging us for a while too. We’re currently working on improving the way light/dark color palettes work, hopefully that will make this all more straightforward soon.

8 Likes

I think the title of the topic is a little harsh but I am also trying to find a good solution, I currently use the Dark/Light Mode Toggle Plugin, because I can’t get the new feature to work properly as posted here and glad to hear the official version is still being considered fro further development because it is important for the look of my forum :blush: (obviously selfish request) :roll_eyes: