Skip to content
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

Pontoon should use light theme for visitors requesting light theme #3339

Open
flodolo opened this issue Sep 13, 2024 · 9 comments
Open

Pontoon should use light theme for visitors requesting light theme #3339

flodolo opened this issue Sep 13, 2024 · 9 comments

Comments

@flodolo
Copy link
Collaborator

flodolo commented Sep 13, 2024

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.

@mathjazz
Copy link
Collaborator

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?

@flodolo
Copy link
Collaborator Author

flodolo commented Sep 16, 2024

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).

@mathjazz
Copy link
Collaborator

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.

@flodolo
Copy link
Collaborator Author

flodolo commented Sep 16, 2024

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.

@mathjazz
Copy link
Collaborator

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.

@flodolo
Copy link
Collaborator Author

flodolo commented Sep 16, 2024

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?

@mathjazz
Copy link
Collaborator

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).

@flodolo
Copy link
Collaborator Author

flodolo commented Sep 16, 2024

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?

@mathjazz
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Needs triage
Development

No branches or pull requests

2 participants