Skip to content

Conversation

t-hamano
Copy link
Contributor

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

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
Copy link

github-actions bot commented May 30, 2025

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.

Copy link
Member

@Mamaduka Mamaduka left a comment

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