mozillabrasil / sumo_live_helper

Helper Add-on for SUMO forum contributors
https://addons.mozilla.org/firefox/addon/sumo-live-helper-/
Mozilla Public License 2.0
7 stars 8 forks source link

Add "dark mode" option in the settings #114

Closed WesleyBranton closed 4 years ago

WesleyBranton commented 4 years ago

The automatic dark mode is not working on all browsers. We should include a dark mode toggle option on the preferences page to allow the user to select dark mode.

dannycolin commented 4 years ago

It should because prefers-color-scheme is supported on Firefox 67+. Do you have more details about the issue (OS, FF version, etc)?

WesleyBranton commented 4 years ago

I can't get it to work on Windows 10 release or beta Firefox. It might just be easier to add a dark mode option in the settings.

dannycolin commented 4 years ago

Maybe but it'd still be interesting to find the problem. Have you set Windows to dark mode and also Firefox to dark mode (not the default theme)?

jhonatasrm commented 4 years ago

It should because prefers-color-scheme is supported on Firefox 67+. Do you have more details about the issue (OS, FF version, etc)?

I got feedback from a user with the OS: OS X El Capitan and Firefox version 71

jhonatasrm commented 4 years ago

Maybe but it'd still be interesting to find the problem. Have you set Windows to dark mode and also Firefox to dark mode (not the default theme)?

I think is a good option use a button to select the theme, this gives the user more options... 🤔

dannycolin commented 4 years ago

I think is a good option use a button to select the theme, this gives the user more options

I'm ok with a <select> option containing "auto-detect" (can be hidden while we find the issue), "dark" amd "light". Sounds good to you? :)

WesleyBranton commented 4 years ago

Maybe but it'd still be interesting to find the problem. Have you set Windows to dark mode and also Firefox to dark mode (not the default theme)?

My OS is not set to dark mode, but the Firefox theme is. When I set Windows to dark mode, it works. I would think that the dark mode would be set by the Firefox theme, but maybe I'm wrong.

dannycolin commented 4 years ago

I would think that the dark mode would be set by the Firefox theme, but maybe I'm wrong.

Ah that's why. prefers-color-scheme specification follows the OS preferences. So currently, it's not a bug but a feature :P. However, there's a bugreport upstream to make it respect the Firefox theme instead of the OS one. (See https://bugzilla.mozilla.org/show_bug.cgi?id=1529323).

dannycolin commented 4 years ago

Posting some info here to remember it later this week:

dannycolin commented 4 years ago

Hey @WesleyBranton @jhonatasrm,

I've pushed a branch called issue-108. There's a few styling issue to fix (e.g wrong arrow icon color) but the option to choose a light, dark or auto-detect theme works. Suggestions, comments are welcomed :).

jhonatasrm commented 4 years ago

It is getting amazing! I think could be a good idea, do a reload of the tab after select the theme. 🙂

dannycolin commented 4 years ago

It is getting amazing! I think could be a good idea, do a reload of the tab after select the theme.

Done. It should now reload everytime you change the pref.