Colour Scheme - can't select light theme

With the new composer rolled into tests-passed I was just looking at colour schemes and found that selecting the light theme exhibits some strange behaviour:

Customize > Themes > New

By default the scheme appears as:

07

If I select the dark theme it appears as:

52

And if I select the light scheme again:

26

Prior to rebuilding I was seeing a similar problem with Customize > Colors, where I could create new schemes based on dark, but if I tried to clone the light scheme the +New button was active, but did nothing.

To be clear it’s technically not a select-kit issue, the theme causing the issue has null as value, and I think we should fix it instead of adding one more special case in select-kit. I will look what could be the most appropriate solution.

2 Likes

Definitely, if this is an issue with a theme we ship, we should absolutely fix it!

1 Like

Ok, as the light theme isn’t directly editable can that be fixed?

let me see if I can push a quick fix

Should be fixed by:

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

I finally decided to fix it in select-kit directly, it was an issue to allow this at the beginning of select-kit, but it should work as long as we only have one item with null value in the content.

FWIW the null value comes from here: https://github.com/discourse/discourse/blob/master/lib/wizard/builder.rb#L151

2 Likes

This topic was automatically closed after 20 hours. New replies are no longer allowed.