Fix pick-theme-row and behavior of default theme mode #20783
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
I do not believe the
Use default theme
setting is currently working fully correctly.For example, consider these two example themes from the website:
Say that user makes two service calls, and sets
happy
as the default light theme:and
sad
as the default dark theme:My expectation now would be that in the user profile, the user can pick
Use default theme
from the theme picker, and then should see the Auto/Light/Dark radio set. WhenLight
is selected, we should usehappy
theme. WhenDark
is selected, we should use dark-variant ofsad
theme. WhenAuto
is selected, we would either usehappy
(if browser does not prefer dark) or dark-variant ofsad
(if browser prefers dark).What currently actually happens:
if
light
mode is currently selected, the auto/light/dark radio set is not displayed, based on the fact that the default light mode theme (happy
) does not have a dark mode. This seems wrong, and we should show the radio set due to the default theme having default light and dark modes defined. Ifdark
mode is currently selected, we do see the radio set, but if you click onlight
, the set instantly disappears and you cannot go back todark
.if
light
mode is currently selected, I would expect to see the happy theme applied. However the theme mixin is instead applying the light-variant ofsad
, due to my browser/OS setting is to prefer dark. Unless darkMode is set toAuto
, I would not expect the browser preference to be considered.Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: