User-defined theme switcher disappears on admin pages


(Robert McIntosh) #1

The user-defined option selector disappears from the hamburger menu if you switch while you are in Admin pages - and stays missing if you navigate back to the main site - until you hard refresh.

BEFORE

AFTER

repro steps:

  • Navigate to dashboard, then click the hamburger menu so can see the theme options.
  • Select a different theme
  • When this loads, the options to switch again are missing on the menu

This does not happen outside of admin area


(Jeff Atwood) #2

Isn’t this in fact expected since admin areas are intentionally not themed, e.g. we don’t allow admin to be broken by theming as it becomes impossible to fix it because you need the admin UI to work in order to change anything about theming in the first place?

Also, isn’t the trivial workaround to… simply avoid switching themes in the admin area?


(Robert McIntosh) #3

Possibly, but if that is the case, then the option to switch themes should disappear when you navigate to admin, but it doesn’t so I am able to switch themes here. It is only after doing it that it disappears, so it looked to be an omission rather than a safety issue.

yes, and this may be an edge case. I was testing a possible issue with column headers not appearing (or rather being white on white) so wanting to see if the reported issue was theme-related - i.e. some OTHER setting was breaking the admin interface when it should not. So there will be some possible occasions where you might want or need to, but one could keep switching out of admin to do this, but since the option appears here, others may experience the same


(Jeff Atwood) #4

This is also a component, not a part of core Discourse at all. To be honest, I’m not even a fan of this optional add-on feature here. It clutters the menu.


(Sam Saffron) #5

This is totally unrelated to this specific component, happens on any component that amends the hamburger menu, eg:

Must be leftover from “auto disable customization in admin on reload”, that we created prior to safe mode


(Sam Saffron) #7

Good catch @robmc , we had some archeological code that is no longer needed and no longer makes sense:

This is now fixed.


(Sam Saffron) #8