-
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
Docs: Add variations
key to block.json
JSON schema definition
#42539
Conversation
One question I have for this addition is how we handle the actual versioning of this. Technically this is possible in |
Was it WP 5.8 when it got introduced? It would make perfect sense to cherry-pick this commit tho all those branches then 👍🏻 We also miss the section for It doesn't need to be so detailed as we can always reference another page: The only remark would be that JavaScript functions ( |
@gziolo I added Variations to the block metadata documentation and included the callout you've mentioned 👍 |
Also @gziolo I just checked in Core and it looks like it was introduced in 5.9 WordPress/wordpress-develop@d9599ad So we should only cherry-pick it on the |
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.
Excellent job documenting block variations with block.json
❤️
I left some nitpicks to polish just before landing this PR. Thank you so much for the initiative!
Awesome, good job checking it 👍🏻 |
Co-authored-by: Greg Ziółkowski <[email protected]>
variations
key to block.json
JSON schema definitionvariations
key to block.json
JSON schema definition
…2539) * add variations key to block.json JSON schema definition * Update docs/reference-guides/block-api/block-metadata.md with information about variations key Co-authored-by: Greg Ziółkowski <[email protected]>
…2539) * add variations key to block.json JSON schema definition * Update docs/reference-guides/block-api/block-metadata.md with information about variations key Co-authored-by: Greg Ziółkowski <[email protected]>
@gziolo Added two new PR's to backport the changes to the release branches here: |
…2539) (#42553) * add variations key to block.json JSON schema definition * Update docs/reference-guides/block-api/block-metadata.md with information about variations key Co-authored-by: Greg Ziółkowski <[email protected]> Co-authored-by: Greg Ziółkowski <[email protected]>
…2539) (#42552) * add variations key to block.json JSON schema definition * Update docs/reference-guides/block-api/block-metadata.md with information about variations key Co-authored-by: Greg Ziółkowski <[email protected]> Co-authored-by: Greg Ziółkowski <[email protected]>
What?
Add the
variations
key with all of its available sub properties to theblock.json
JSON schema.Why?
The JSON Schemas are great because they greatly improve the Developer Experience of working with custom blocks. However, they aren't of much use if they are not including all the options that are actually available.
Closes #40490.
Part of #41236.
How?
Testing Instructions
will update this once the initial testing passes