Skip to content

Features like pattern overrides and block bindings have limited control over block UI #58233

@talldan

Description

@talldan

What's the problem?

Several features require a way to manage specific block attributes and the UI controls for those attributes in a way that's difficult currently:

  • Block bindings (e.g. bindings to Custom fields) - At the time of writing a requirement is locking the editing of specific bound attributes and their UI controls, but in the future it's easy to see this evolving. Users may be able to directly update custom field values from a block control, and potentially create and see the status of bindings.
  • Pattern overrides - Currently the pattern block is making use of useBlockEditingMode( 'contentOnly' ) to manage the visibility of block controls. This hides the majority of block controls that are considered unrelated to content. The way contentOnly works is very inflexible—it completely hides the block inspector, even if there are content controls there (like the image block alt/title fields). It also doesn't do a great job of managing toolbar controls—lots of blocks have internal conditional logic for handling the visibility of controls based on the block editing mode, which becomes hard to manage. There's a problem in that the controls displayed or hidden are a fixed list that has no relation to the pattern overrides supported attributes. Changing the visibility of UI controls will also affect other usages of useBlockEditingMode( 'contentOnly' ) outside of patterns.

Offering better management over block attributes and controls might also tie into future initiatives around workflows and extensibility.

My feeling is that these problems are closely related, and this is an area that needs some exploration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions