Native theme feature feedback, bugs, thoughts, feelings, prayers

Good to know, though it might take a bit for me to get used to for me. Mind if I ask if this was because it was technically more simple (as it allowed nothing more to be needed to store in the DB), or was it a top level design choice/use case (more user freedom)?

I’m just used to changing themes per phpbb, which allowed a user to pick a theme everywhere they logged in. This allowed a consistent look+feel for the site everywhere – set once, and forget – while still placing exactly what the look was in the hands of the user.

It was about freedom. If your phone has an OLED screen, black background literally saves battery, and I might pick that for that device. Even though I really hate black backgrounds…

3 Likes

Fair point.

I still have to suggest having some way to be able to save a user’s default theme, so I’m able to log in on any new device and be able to immediately feel “at home”. There’s a greater incentive for a user to customize + pick a theme if it applies everywhere they log in. Allowing them to customize a per-device theme is an interesting use case, and it is wonderful that discourse can support that out of the box, but I was a bit surprised that it was the default functionality.

2 Likes

I am on the fence here, I worry that providing an extra option here will confuse users:

Theme
[ Dark ]

Make this the default theme everywhere.

This kind of interface is very confusing cause now I can select my global default and then override it locally, something that conceptually would be a nightmare and a :whale: to explain to users.

Technically it is quite easy to amend the backend to support a global default theme per user. Providing the option to users is where the huge cost is encountered.

3 Likes

If you label that check box “Make this the default theme on all devices” it would also have the advantage of educating users that this is a “per device setting” by default…

4 Likes

Not a bad idea

Make this my default theme on all my devices

is better wording, as it emphasizes YOU.

4 Likes

Not saying the UI/UX to support both options would be trivial to do ‘right’, but consider that by default there are a bunch of apps and software that apply a user theme everywhere by the profile - E.g. Slack, Discord, Gmail, Chrome, PHPBB, and Firefox all allow a user to apply a theme against a user profile. This built my expectations of how picking a theme should work.

I haven’t seen many apps that allow custom themes per device, so I’m coming from a mindset that applying a theme everywhere should be the base case, and overriding as a ‘per device’ setting should be a more advanced (possibly hidden) option.

2 Likes

I am not strongly attached to “per device” vs “per user”, I can confirm that Google and Slack do it globally, so yeah there is tons of precedence in just following suit here @codinghorror cause, why be different?

I do feel a bit uneasy about a “device override” or “per user override” I think picking a winner here is better than supporting both. Especially cause there are very weird edge cases like: user sets default… user picks theme on device 2 … user sets default again (what is the theme on device 2?)

1 Like

I thought you wanted it this way? I don’t care.

But I don’t think “supporting both” is this huge nightmare you make it out to be though. If the user checks the box, then force it across all devices at the time the submit button is clicked or tapped. If they don’t check the box, just set it on the current device. I’m not getting what is so complicated or hard to understand about that.

2 Likes

OK I will change this tomorrow. Getting a bit late today.

9 Likes

I agree with @awole20. I’ve been trying the dark theme for a week and having to enable it on all my devices was startling at first and quickly got annoying after a couple of devices…

3 Likes

Theme selection is now global per-user per:

https://github.com/discourse/discourse/commit/2d96a0785d02db69413db31b061d3fcee5bcabd6

7 Likes

@sam, if there are zero user selectable themes, should the dropdown appear in preferences? It seems odd to have a preference dropdown that you can’t actually do anything with.

1 Like

I will fix that … one sec…

2 Likes

Addendum: the field should also not show if there is one user selectable theme that is also the default theme.

1 Like

Fixed per:

https://github.com/discourse/discourse/commit/3113a6a18a80376e101d8b4fbf2269f85332a0dd

7 Likes

We already have complaints about this being forced global, within minutes of deploying it:

Oh crap. Per device is better, pretty sure.

and

Awww man. I’ve been digging the deep blue at home, but really love the true black oh my phone :frowning:

Since the whole point of this feature is user choice, it seems nonsensical to deny that. We really need the

:ballot_box_with_check: Make this my default theme on all my devices

checkbox on that preferences page. It can of course be default on.

4 Likes

I’m not really sure what the exact semantics of such a checkbox should be – it’s a hard UI problem to explain this!
I have two suggestions for that.

Here is suggestion :one::

Theme: Light Theme ▾

:ballot_box_with_check: Use this theme on all my devices

The checkbox would basically switch between the old and new behavior: When it is checked, the theme is stored on the account and used everywhere. When it is unchecked, each device stores the selected theme in a cookie; new devices use the admin-defined default theme.

And here’s suggestion :two::

Theme: Light Theme ▾

Apply to all my devices

In this version, each device always stores its own theme in a cookie. Changing the theme in the dropdown updates the local theme. When the button is pressed, the theme is stored on the server, which has two effects: It becomes the default for new devices. Additionally, by comparing a timestamp stored in the cookie to a timestamp stored in the account, all other devices identify their cookie as stale and apply the server-stored theme locally (only once).

Suggestion :one: has the drawback of not offering a way to set a default for new devices. Suggestion :two: is slightly more complicated, but I think it’s still easy to grasp.

What do you think?

2 Likes

I still firmly lean towards some method that make “apply everywhere” the default, so I’d be more inclined for a checkbox (with it default as selected) if it’s deemed necessary to have a per device setting.

It might also be difficult/confusing to introduce this kind of feature because this is also the first user setting so far to consider a “device only” setting, aside for the ones that need to explicitly accept permissions per client. And even then those come with the following text:

Note: You have to change this setting on every browser you use.

Completed per

https://github.com/discourse/discourse/commit/e1dd543a936d8880c6168ae29dbc3d0ad7fa6491

https://github.com/discourse/discourse/commit/f114d63de4b2ed9612347c7d5bcfff61decb0b9e

Checkbox is selected by default, but people can override local.

The tricky bit was that the cookie now stores a “sequence number” so you can override globally.

So, for example:

  • Browser A - pick “material” don’t set it globally - so theme_key cookie now has “theme_key, theme_seq”
  • Browser B - pick “default” set it globally
  • Browser A - Using the power of :hatching_chick: now has the “default” theme set even though it has a cookie setting the theme key to the wrong theme.
7 Likes