-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Part of:
- Block API #41236
- Custom fields connected to Blocks #51373
- Block Bindings API iteration for 6.5 #54536
Related to:
- Pattern Overrides epic (WordPress 6.5) #53705.
- Create a system for inserting site/post metadata into generic blocks #37753.
- Inline Dynamic Content Solutions #21932.
EDIT: Connecting block attributes and custom fields, and the block bindings API tracking issues have been merged into this epic because they are highly related and it seems it is easier to follow having everything under the same discussion.
This issue is meant to keep track of and discuss how to connect block attributes with custom/meta fields and how Block Bindings API should work. It includes a list of tasks needed for this, and we will share updates about the progress here.
- Block Bindings API: Internal API to connect block attributes and different sources. Not only used for custom fields but for other projects like Partially Synced patterns.
- Custom Fields: Using the Block Bindings API, support for the "meta_fields" source to connect block attributes and custom fields.
For more context about the reasoning of the block bindings API, you can take a look at its original tracking issue.
Progress
This is a list of things to consider/questions related to the Block Bindings API that will be updated as we go along:
WordPress 6.5 release process
Click to see the list of issues addressed during 6.5 release cycle
---A couple of things that are important:
- This project depends on the Block Bindings API: link.
- We will start supporting just a few core blocks attributes that can be increased in a later phase. We can start with:
- Paragraph content.
- Heading content.
- Image URL.
- Button link and content.
Fixes/updates for Gutenberg 17.6 RC (Tuesday 30th)
- Decide the final name of the public class and methods included in this pull request.Migrate all the changes suggested in this wordpress-develop pull request to Gutenberg, including the naming decision. #58383Decide the final shape of the bindings object used in the blocks and make the necessary changes: #58337Backports to WordPress.Add more tests for the bindings, especially in the editor.Add validation in the
WP_Block_Bindings_Registry
class like others likeWP_Block_Type_Registry
are doing: link.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Fixes/updates for WordPress 6.5 beta 1 (February 13th)
- Review the accessibility of the editor with the accessibility team, including the suggestions made: link.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Fix a bug with
strcasecmp
reported here.Refactoring the processing of block bindings into two steps: link. This would solve this issue with the empty images in pattern overrides. PR: #6059Add initial documentation. Core changeset: 57560Remove unusedsetAttributes
. PR: #58806Lock editing by default when the source used in the bindings is not registered in the client and adapt pattern overrides. PR: #58787To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Fixes/updates during beta phase
- Fix query loop not working as expected in the editor when blocks are bound. PR #59283Improve the accessibility of the block bindings:To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Fix insert button when pressing enter in bound blocks. #59361Dev note covering how extenders can use the block bindings.Review the current UX and make further improvements: link.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
WordPress 6.6 planning
This section will be used to keep track of the issues that could potentially be addressed for WordPress 6.6.
As explained in this comment, the idea is to keep the scope limited and work on more functionalities if there is time at the end of the release cycle.
Initial plan
Keep in mind that this is not set in stone and it might change. The initial idea is to focus on these aspects:
Polish the existing code
- To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
And work on new aspects like:
- Add the possibility of editing the value of the meta fields directly from the bound blocks.Improve the UX when the editing of bound blocks is locked.Define and implement UX for editing custom fields directly from blocks connected.Add support for more core blocks based on feedback. #59607To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Out of scope for 6.6
Trying to keep the scope limited for this short release, the idea is to work on these functionalities only once the previous points are finished:
- Add a UI to allow users to add bindings through the Editor.Create new sources: Site data, post data, taxonomy data.Explore the possibility of creating a filter to modify the value of the meta field returned. Ex: Change the date format with PHP.Explore the possibility of concatenating custom fields somehow. Ex:
site_url
+field_id
.Explore the possibility of creating "before/after" setting until an Inline Binding functionality is implemented.Replace core blocks like Post Author to use variations using these bindings.Create opt-in mechanism and expand support for custom blocks (This depends on the HTML API supporting any HTML tag).Change the UI to use the upcoming DataViews: link.Probably using DataViews, add the possibility of creating new custom fields.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.