User-defined theme switcher disappears on admin pages: A bug was reported by robmc where the user-defined theme switcher option disappears from the hamburger menu after switching themes while on admin pages. codinghorror suggested that this might be expected behavior since admin areas are intentionally not themed, but robmc pointed out that the option should disappear when navigating to admin, not after switching themes.
codinghorror also mentioned that this feature is an optional add-on and not part of Discourse core. sam noted that this issue is not specific to the theme switcher component, but rather a general issue with components that modify the hamburger menu.
The issue was eventually tracked down to leftover code from an older feature, “auto disable customization in admin on reload”, which is no longer needed. sam provided a link to the fixed commit on GitHub, resolving the issue.
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.
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?
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
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.