-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not remove theme presets if defaults are hidden #37008
Do not remove theme presets if defaults are hidden #37008
Conversation
Have some issues in my local environment so couldn't test properly. I'll resume work tomorrow. |
Chiming in here. If the default color palette is disabled, it would make sense that themes should have free reign to enable any colors they like. Otherwise, it locks out a fair number of color slugs. |
6c33e62
to
45d91ca
Compare
Pushed changes to implement this for the top-level, I need to make it work for the block-level as well. |
This is ready for review. |
In #36772 we made it so that theme presets with the same slug as a default preset will be removed.
In doing so, we missed one case that was brought up by @chthonic-ds: when the defaults are disabled by the theme, we still need to show all theme presets, whether or not they have the same slug as a default one.
By doing this, we also make sure that themes with no
theme.json
will see no changes (defaults are disabled for them unless they opt-in), and they'll have the same number of presets values they had before the introduction of default presets.