WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
40 stars 5 forks source link

Using the Block Bindings editor API (JS) in WP 6.7 #317

Closed justintadlock closed 3 weeks ago

justintadlock commented 1 month ago

WordPress 6.7 exposes a partial set of JS-based editor functions for working with Block Bindings: https://github.com/WordPress/gutenberg/pull/65713

These are now stable, public functions for theme and plugin authors to extend how Block Bindings work in their projects, especially custom Block Binding sources. I'm proposing a tutorial that walks developers through using these APIs to manipulate bindings in the editor.

There is an additional getFieldsList property that will also be public in the Gutenberg plugin only, which could also be a showcase of what's to come in the future.

justintadlock commented 1 month ago

The "create ticket from discussion" feature on GitHub seems to broken (at least for me) right now, so I just copied this over from: https://github.com/WordPress/developer-blog-content/discussions/316

justintadlock commented 1 month ago

I'm working on this one here: https://docs.google.com/document/d/17o20lmRBxbak8hegX-RmtpKjS2hKlyyc18mbaYR4IWs/edit?usp=sharing

Code examples are up with a rough idea of an outline. Now it's time to fill in all the blank space with words!

justintadlock commented 1 month ago

This one's ready for its first review now: https://docs.google.com/document/d/17o20lmRBxbak8hegX-RmtpKjS2hKlyyc18mbaYR4IWs/edit?usp=sharing

justintadlock commented 1 month ago

This has received a first review by @cbravobernal, @artemiomorales, and @gziolo. This was primarily a technical review, so the next round should be heavy on copyediting.

justintadlock commented 1 month ago

Second review by @ndiego.

ndiego commented 1 month ago

Second review by @ndiego.

Yup! Sorry, I forgot to comment here. Great article, as always.

SantosGuillamot commented 4 weeks ago

I just left some comments there. I think the article is great 👏

bph commented 3 weeks ago

Published: Getting and setting Block Binding values in the Editor