pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

Pontoon should use light theme for visitors requesting light theme

Open flodolo opened this issue 1 year ago • 9 comments

On a new profile, set Firefox to request light color scheme and visit Pontoon. Pontoon keeps using the dark theme, while it should follow the user's preferences.

flodolo avatar Sep 13 '24 08:09 flodolo

Is this issue about changing the default theme for newly registered users from the dark theme to the system theme?

What about users that are not authenticated?

mathjazz avatar Sep 16 '24 11:09 mathjazz

No, this is about visitors (i.e. unauthenticated users), and matching their preferences. If the preference is not set, then we would use the default (dark).

flodolo avatar Sep 16 '24 11:09 flodolo

I think the behavior should be the same for unauthenticated users and new users. If you choose a light theme in your system settings and we honor that in Pontoon, why should we switch to the dark theme after you create an account?

Also note that we'd use prefers-color-scheme to support this behavior, which always returns either "light" or "dark". It's based on the OS and browser settings.

mathjazz avatar Sep 16 '24 12:09 mathjazz

I think the behavior should be the same for unauthenticated users and new users. If you choose a light theme in your system settings and we honor that in Pontoon, why should we switch to the dark theme after you create an account?

It's a good point. The only reason not to change that default would be that we have introduced theme selection ~15 years into the life of Pontoon, so this has the potential of being disruptive for a lot of active users.

Consistency or potential annoyance (and added communication to mitigate it)? Not sure which one is better.

flodolo avatar Sep 16 '24 12:09 flodolo

For existing users everything stays the same. That link above indicates that we have set the theme to "dark" for all users when the feature was shipped.

The only thing that would potentially impact the existing users is changing the default for unauthenticated users to the "system" theme.

mathjazz avatar Sep 16 '24 12:09 mathjazz

I feel like there's a disconnect somewhere.

  • Unauthenticated users: follow user preferences (change from current behavior, where dark is default).
  • New users: dark theme.

I read your comment as "we should change the default for new users from Dark theme to Match system. That sounds reasonable, because they might end up registering on a light theme (their OS/Browser choice), and it would become dark after logging in.

To confirm, would such change affect only new users registering after the change, or also existing users who never set their theme preferences?

flodolo avatar Sep 16 '24 12:09 flodolo

To confirm, would such change affect only new users registering after the change, or also existing users who never set their theme preferences?

Changing the default for registered users only impacts new users. All existing users already have the theme set to "Dark", "Light" or "System". There is no such thing as "Theme preference not set".

Changing the default for unauthenticated users OTOH impacts all users (when they aren't logged in).

mathjazz avatar Sep 16 '24 13:09 mathjazz

Changing the default for unauthenticated users OTOH impacts all users (when they aren't logged in).

It changes the current behavior for users who have not set their browser or OS to request dark content.

I think that would be acceptable? Or do you think the majority of users have light settings, and it would be disruptive?

flodolo avatar Sep 16 '24 13:09 flodolo

I think the default must be the same for unauthenticated users and new accounts.

Not sure what's the best default though - keep doing what we've been doing forever and nobody complained, or start doing what everybody else is doing.

mathjazz avatar Sep 16 '24 13:09 mathjazz

To summarize, we should:

  • Change the default value of the UserProfile.theme setting to Themes.SYSTEM.
  • Honour prefers-color-scheme for unauthenticated users.

mathjazz avatar Nov 27 '24 08:11 mathjazz