Skip to content

block.json schema: Add role field#70272

Merged
t-hamano merged 1 commit into
trunkfrom
block-json-schema-role
May 31, 2025
Merged

block.json schema: Add role field#70272
t-hamano merged 1 commit into
trunkfrom
block-json-schema-role

Conversation

@t-hamano

@t-hamano t-hamano commented May 30, 2025

Copy link
Copy Markdown
Contributor

See: #65484 (comment)
Dev note: https://make.wordpress.org/core/2024/10/20/miscellaneous-block-editor-changes-in-wordpress-6-7/#stabilized-role-property-for-block-attributes

What?

Add a missing role field.

Why?

The role field was stabilized in WordPress 6.7, but was not exposed in the schema.

Testing Instructions

Create the following JSON file to test code editor assistance:

{
	"$schema": "https://raw.githubusercontent.com/WordPress/gutenberg/refs/heads/block-json-schema-role/schemas/json/block.json",
	"apiVersion": 3,
	"title": "Test",
	"name": "core/test",
	"attributes": {
		"test": {
			"type": "string"
		}
	}
}

Screenshots or screencast

image

@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers Developer Experience Ideas about improving block and theme developer experience labels May 30, 2025
@t-hamano t-hamano marked this pull request as ready for review May 30, 2025 13:38
@github-actions

github-actions Bot commented May 30, 2025

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @t-hamano!

@t-hamano t-hamano merged commit 77f40fd into trunk May 31, 2025
69 checks passed
@t-hamano t-hamano deleted the block-json-schema-role branch May 31, 2025 06:17
@github-actions github-actions Bot added this to the Gutenberg 21.0 milestone May 31, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Developer Experience Ideas about improving block and theme developer experience [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants