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 viewScriptModule field #59060

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Feb 15, 2024

Related to #58203

What?

This PR adds a viewScriptModule field to the schema of block.json.

Why?

To enhance the developer experience. My understanding is that viewScriptModule is now officially published instead of viewModule.

Testing Instructions

Create a JSON file like the one below and open it in a code editor.

{
	"$schema": "https://raw.githubusercontent.com/WordPress/gutenberg/schema/block-json-view-script-module/schemas/json/block.json",
	"name": "test/test",
	"title": "Test"
}

You should see viewScriptModule reference.

Screenshots or screencast

image

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Feb 15, 2024
@t-hamano t-hamano self-assigned this Feb 15, 2024
@t-hamano t-hamano marked this pull request as ready for review February 15, 2024 08:51
@t-hamano t-hamano requested a review from ajlende as a code owner February 15, 2024 08:51
Copy link

github-actions bot commented Feb 15, 2024

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 <[email protected]>
Co-authored-by: c4rl0sbr4v0 <[email protected]>

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

Copy link

github-actions bot commented Feb 15, 2024

Flaky tests detected in 12ee830.
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/7913243044
📝 Reported issues:

Comment on lines +808 to +811
"type": "array",
"items": {
"type": "string"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR!
I need to test if we are supporting arrays at this moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@cbravobernal cbravobernal left a comment

Choose a reason for hiding this comment

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

LGTM!

@cbravobernal cbravobernal enabled auto-merge (squash) February 15, 2024 10:28
@cbravobernal cbravobernal merged commit fd75a20 into trunk Feb 15, 2024
68 checks passed
@cbravobernal cbravobernal deleted the schema/block-json-view-script-module branch February 15, 2024 10:43
@github-actions github-actions bot added this to the Gutenberg 17.8 milestone Feb 15, 2024
@gziolo
Copy link
Member

gziolo commented Feb 16, 2024

This is great. Thank you for extending the block.json schema.

@sirreal
Copy link
Member

sirreal commented Feb 20, 2024

Thanks for handling this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants