#61641 closed enhancement (fixed)
Block Bindings: Expose sources in the editor settings to consume them in the client
Reported by: | santosguillamot | Owned by: | cbravobernal |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | 6.6 |
Component: | Editor | Keywords: | has-patch, has-unit-tests |
Focuses: | Cc: |
Description
Add a new property to the editor settings to expose the block bindings sources registered in the server. This allows to reuse some of its properties like label and uses_context without having to replicate that in JavaScript.
It makes some block bindings editor functionalities work by default, improving the user experience, and it simplifies how sources are registered in the client.
Change History (10)
This ticket was mentioned in PR #7020 on WordPress/wordpress-develop by @santosguillamot.
5 months ago
#1
5 months ago
#4
I’m wondering if we can update an existing unit test to validate the setting is correctly propagated to the editor
@santosguillamot commented on PR #7020:
5 months ago
#5
I’m wondering if we can update an existing unit test to validate the setting is correctly propagated to the editor
I have just added this new unit test to check that the registered sources are properly added to the editor settings: link.
#6
@
5 months ago
- Owner set to cbravobernal
- Resolution set to fixed
- Status changed from new to closed
In 58798:
@cbravobernal commented on PR #7020:
5 months ago
#7
Completed with my first commit to Core in https://core.trac.wordpress.org/changeset/58798
@noisysocks commented on PR #7020:
5 months ago
#9
Thanks for committing this early in the 6.7 cycle ❤️
Originally explored in this other pull request: https://github.com/WordPress/wordpress-develop/pull/6456
## What?
It adds a new property to the editor settings to expose the block bindings sources registered in the server. This allows to reuse some of its properties like
label
anduses_context
without having to replicate that in JavaScript.## Why?
It makes some block bindings editor functionalities work by default, improving the user experience, and it simplifies how sources are registered in the client.
## How?
Add a new property including all the registered sources while the editor settings are being initialized.
Trac ticket: https://core.trac.wordpress.org/ticket/61641