Closed
Description
Iteration of the Block bindings API tracking issue.
This issue will be used to gather the new functionalities and bug fixes expected to be included in WordPress 6.7. It will serve to share regular updates and progress.
Please keep in mind that the list of issues will change once new ones come up.
For this iteration of WordPress 6.7, the focus will be on these items (no specific order):
- Follow-ups from 6.6 and bug fixes: There were a few items that weren't included in the 6.6 iteration that will need some work. Additionally, bugs need to be addressed.
- Add UI to connect attributes with the binding sources: Basically, add the first iteration to be able to create the bindings through the UI instead of having to go to the Code Editor.
- Polish and open block bindings editor’s APIs for extenders: Core sources like "Post Meta" use some private APIs to handle bindings in the editor. The idea is to polish those APIs to enable external developers to use them.
- Experiment supporting more core sources: In order to ensure that the editor APIs fit future use cases, it'd be great to add support for more core sources, or at least experiment with them in case we want to create them in the future.
- Support anything needed by pattern overrides: We can expect some work needed to support new functionalities in pattern overrides.
EDIT: I created a new section for "Saving workflows" after the issues raised and because it seems a big topic to be discussed.
Follow-ups and bug fixes
- Don't show post meta fields that start with an underscore. (Temporary fix)
- Fix empty custom fields not being editable in bindings.
- Add warning when block attribute is connected to an invalid source.
- Rely on Text component instead of Truncate in bindings panel.
- Can't save changes to the source if custom fields are opened
- Potential filter to modify the value returned by bindings.
- Prioritize existing placeholder over bindingsPlaceholder.
- Only use canUserEditValue when setValues is defined.
- Only pass context included in usesContext from rich text component.
- Only pass usesContext properties to editor APIs.
- Refactor passing select and dispatch instead of full Registry.
- Fix editing protected custom fields in block bindings.
- Refactor e2e tests.
- Unify logic in getPostMetaFields function.
- Register bindings sources in widgets screens.
- Accept client ID as parameter for useBlockBindingsUtils.
- Don't render image when src attribute is empty.
- Bootstrap server sources earlier: Core & Gutenberg.
- Improve performance.
- Improve accessibility of bound paragraphs when using a screenreader in Navigation Mode.
- Change "This block is connected" indicator to make it accessible.
- Keep bindings editor calls in their own logic useSelect.
Nice to have
- Add indicator that an attribute is connected instead of hiding the controls.
- Add support for image caption.
- Add support for image href.
- Ensure custom field changes work fine with revisions.
- Send only edited values to the POST API requrest
UI to create bindings
For more info about the tasks, most of the discussions happened here.
- Create initial UI for connecting block attributes and custom fields.
- Block Bindings: Fix long keys overflow in bindings panel.
- Create utils to add/remove bindings in the object that can be reused.
- Decide where the bindings panel should live and in which cases it should be available: link.
- Remove experimental flag once the UI is considered ready.
- Add label argument to register meta.
- Add support for connecting custom fields in templates.
- Use post meta label from register_meta in block bindings workflows.
- Explore how permissions should work with bindings creation: link.
Nice to have
Abstract the.useToolsPanelDropdownMenuProps
util- Add backdrop-color to connected blocks.
- Keep iterating on the UI:
Polish and open editor APIs
- Improve the way sources are registered: This includes a refactoring to work as
blockTypes
,blockVariations
,blockCollections
... It also includes new functions likeunregisterBlockBindingsSource
and unit tests. - Use @wordpress/warning during block registration instead of console.error and console.warn.
- Unify getValue/getValues and setValue/setValues APIs.
- Don't provide default canUserEditValue in reducer.
- Bootstrap sources defined in the server.
- Improve how the context is handled in the editor.
- Improve how the context is handled in the server.
- Allow bindings bootstrap after registration.
- How should bindings handle placeholder/fallback values?
- Revisit the extensibility mechanism to allow other sources to appear in the UI. See link.
- Make the editor APIs public: link.
- Add docs and types to source registration.
Support for more core sources
Nice to have
- Create an experiment to support taxonomy meta and decide if it should be included as a core source.
- Create an experiment to support site data and decide if it should be included as a core source.
- Create an experiment to support post data and decide if it should be included as a core source.
Saving workflows
Nice to have
It isn't still clear if saving workflows should be modified or not as discussed here.
- Editing bound paragraph in post editor causes "Site Updated" message to appear.
- How/if to improve save workflows to notify users of specific post data changes?.
- Output granular post meta changes in a list.
- Add indicator for modified post meta in pre-publish flow
Backports
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done
Activity