Skip to content

Block Bindings: Notify on save when users edit the value of a connected custom field instead of the post content #61405

@SantosGuillamot

Description

@SantosGuillamot

This is part of a broader effort to improve the block bindings UI.

What?

When saving a post, specify if it updates the post content or the value of the custom fields.

As part of the block bindings project, it is expected to allow the users to edit the value of the source connected to the block directly through the rich text. It was showcased in this Gutenberg Hallway Hangout, and there is an ongoing PR for post meta here.

This means that if a paragraph's content is connected to a custom field, users will edit the value of the custom field instead of the post content. It'd be great to clarify that during the saving in the same way we do with other entities.

Screenshot 2024-05-06 at 13 35 28

At first, I thought it was gonna work out of the box because it is actually using the proper editEntityRecord function: link. However, in the end we are just editing the post entity, and it doesn't differentiate between editing the content or other parts like meta fields.

Would it make sense to specify which parts of the entity are being updated and, in case the meta fields are part of that, trigger the same "warning" as when we edit an external entity like in the previous example? Something like this but properly designed:

Screenshot 2024-05-06 at 13 45 13

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions