-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Theme JSON schema: Add sticky position to settings, minHeight to styles #48948
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
Theme JSON schema: Add sticky position to settings, minHeight to styles #48948
Conversation
aaronrobertshaw
left a comment
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 bringing the schema up-to-date with the current state of position support @andrewserong 👍
The decision to omit references to fixed position support makes sense.
LGTM!
aaronrobertshaw
left a comment
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 also adding the missing dimensions to the schema styles and settings.
It looks like this has exposed a problem with the previous dimensions setting definition. It needs the object type as well I think.
|
Thanks for the reviews @aaronrobertshaw! Added the missing line, so 🤞 should be good now. |
aaronrobertshaw
left a comment
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.
The latest tweak LGTM. Once the e2es pass, this should be good to go. 🚢
|
I've added the backport label — I'm not sure if it's needed for schema updates? It was flagged in this issue (#49010), though, so to be on the safe side, I've added the label. |
|
All the references I see to the schema just point at https://raw.githubusercontent.com/WordPress/gutenberg/trunk/schemas/json/theme.json, so I don't think the schema is "distributed" with WP installations, so there's nothing that needs to be done there (since that now contains the new properties). With regard to merging this into core, , I suspect that the .md file will get incorporated into the the relevant handbook page during some automated sync'ing that happens after a WP release, but probably best to check with the release/documentation leads. |
…es (#48948) * Theme JSON schema: Add sticky position to settings * Add dimensions.minHeight to styles * Add missing type: objects line
|
I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 33001e5 |
What?
Update
theme.jsonschema to includeposition.stickywithin the settings schema, anddimensions.minHeightwithin the styles schema.Note that while
fixedis treated as a valid value in code, it is not yet in use by any core blocks. To avoid folks thinking they can start using it by switchingfixedtotrue, I've left it off this change for now.Why?
Now that the sticky position support has been added to the Group block, and the feature will be in
6.2, ensure the setting exists within thetheme.jsonschema.Also,
dimensions.minHeightwas missing from the style schema, so that's been added now.How?
theme.jsonschema to reflect thatposition.stickyis a valid setting (boolean) — note that position is not valid as a style withintheme.jsonas it is intended to be set at the individual block level within the editor.dimensions.minHeightas a valid style.Testing Instructions
Proofread to make sure the changes look correct, and are added in the right places. I wasn't too sure how else to test it manually?