Skip to content
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

Block JSON schema: add heading/button key to color definition #55675

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Oct 28, 2023

Follow-up on #49131
Similar to #55674

What?

This PR adds heading/button key to color definition in block.json schema.

Why?

To allow developers to design block.json with reference to the correct schema.

How?

Testing Instructions

Create the following JSON file locally, specifying the JSON schema changed by this PR.

{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "test/test",
	"title": "Test"
}
  • You should see the button and heading keys listed in the supports.color property.
  • The default value of true false should be set when the button or heading key is selected.

block-json-schema

@t-hamano t-hamano added [Feature] Block API API that allows to express the block paradigm. [Type] Developer Documentation Documentation for developers labels Oct 28, 2023
@t-hamano t-hamano marked this pull request as ready for review October 28, 2023 03:14
@t-hamano t-hamano self-assigned this Oct 28, 2023
@github-actions
Copy link

github-actions bot commented Oct 28, 2023

Flaky tests detected in 6db2eb1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6674433953
📝 Reported issues:

@carolinan
Copy link
Contributor

carolinan commented Oct 30, 2023

I tested it manually, following the instructions.

The default value of true should be set when the button or heading key is selected.

I believe you meant that the default value should be false? VSCode shows the default as false, I believe the updated schema is correct.

Screenshot from VSCode:
Block.json using the updated schema, with heading added under colors.

@t-hamano
Copy link
Contributor Author

I believe you meant that the default value should be false

Yes, that's right 😅 I also updated Testing Instructions.

@t-hamano
Copy link
Contributor Author

Thanks for the review, @carolinan!

@t-hamano t-hamano merged commit 3d51806 into trunk Oct 30, 2023
57 checks passed
@t-hamano t-hamano deleted the schema/block-button-heading branch October 30, 2023 05:49
@github-actions github-actions bot added this to the Gutenberg 17.0 milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants