[later phase] Support props defaults that have config dependencies

Created on 9 July 2024, 2 months ago
Updated 10 July 2024, about 2 months ago

Overview

Follow-up for Allow specifying default props values when opting an SDC in for XB Fixed .

That issue added support for static prop sources, but with some (unenforced) limitations:

A static prop source uses a field type. For many field types, the above won't be an issue, because the data is entirely self-contained (e.g. the string, uri etc. field types).

This issue is for adding support for static prop sources whose default value (experience_builder.component.*:defaults.props.SOME-PROP.default_value) causes it to depend on another config entity:

The text field type uses a Text Format. That is a config entity too: filter.format.*. Therefore, as soon as a text field type is used for a default value, a config dependency on the relevant filter.format.* must be declared.

Related: the link field type allows linking to node entities using entity:node/<nid> — see #3460232-5: Default props values should support files/images . But there, merely selecting the link field type (experience_builder.component.*:defaults.props.SOME-PROP.field_type) introduces a config dependency.

Look at how Drupal's existing Field UI handles this.

User interface changes

The UI (ComponentEditForm) now allows using more field types thanks to https://git.drupalcode.org/project/experience_builder/-/blob/9ccf646d71c... being broadened. At minimum, the following field types should be allowed, and explicit test coverage should be added to prove their config dependencies are handled correctly:

  • link (depends on one additional module, due to field type)
  • text (depends on additional config entities, not due to field type nor widget, but due to default value)
📌 Task
Status

Postponed

Component

Data model

Created by

🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024