Create a new config action to robustly configure an entity form or view display

Created on 2 April 2024, 9 months ago
Updated 31 July 2024, 5 months ago

Problem/Motivation

Currently, the only way to modify an entity view or form display is by effectively calling setComponent() via the entity method exposed as a config action. This is way too limited.

How do we:

  • Change the settings of an existing component?
  • Remove a component? (This is often necessary to configure a view or form display the way you want - I would not call this a "destructive" operation that deletes data.)

(cricket sounds)

We need a better way.

Proposed resolution

I think we should remove the setComponent action and replace it with a new, dedicated action called setDisplay or something.

I think it should be able to set multiple components at once, by name. Something like:

core.entity_view_display.taxonomy_term.tags.default:
  setComponents:
    name:
      options:
        // some component options here. Any existing ones will be overwritten.
    field_something:
      update: true
      options:
        // some component options here; these will be merged into any existing ones.
    another_thing: false  // remove this component entirely

Remaining tasks

Decide on whether this is a good idea, and if we think it is, implement it.

✨ Feature request
Status

Closed: outdated

Version

11.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024