Problem/Motivation

mappingFields can only be set in the template JSON. On the frontend it removes the block, so the value only shows where the display puts the field. It also only uses the first value of a field.

Steps to reproduce

Proposed resolution

  • A drupal/entity-field block bindings source, using the upstream Block Bindings API.
  • Blocks are connected to fields from the "Attributes" panel, in the template builder and in the editor:
    • paragraph and heading content
    • button text and URL
    • image URL, alt and title
  • The field widget stays the source of truth. The bound block edits it in the canvas.
  • On the frontend, the block renders the field value in place, and the field is hidden from the display.
  • Bindings can target an item of a multi-value field (delta).
  • mappingFields keeps working and is deprecated.

Remaining tasks

User interface changes

API changes

The drupal/entity-field source and the new connect gutenberg block bindings permission.

Data model changes

metadata.bindings in the block attributes.

Comments

marcofernandes created an issue.