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
Schemas: Allow custom blocks in theme.json styles #36411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
schemas/json/theme.json
Outdated
}, | ||
"core/legacy-widget": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
"allOf": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is allOf
required here, or can patternProperties
just be used alongside properties
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That should work. I followed how it was done in settings.blocks
.
I'll update the PR and change it in settings.blocks
as well (for consistency).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajlende Updated.
Testet locally that:
- autosuggest for core blocks still works
- custom blocks are allowed
- custom properties with invalid name shows warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up that other spot too! Tested locally in VSCode and IntelliJ; LGTM 👍
Backported to 5.9.1. |
* Schemas: Allow custom blocks in theme.json styles * Remove allOf and use patternProperties
Description
This PR fixes the JSON Schema to add support for custom blocks in the styles blocks section of theme.json files. Support for custom blocks in the settings section was added in #36341
How has this been tested?
Types of changes
Update JSON Schema to allow custom blocks
Checklist:
*.native.js
files for terms that need renaming or removal).