[PP-2] Consider moving ComponentPropsValues::getPropSourceTypePrefixList into source plugins

Created on 23 January 2025, 7 days ago

Overview

In πŸ“Œ Move SDC specific validation in ValidComponentTreeConstraintValidator::validate into the SDC source plugin Active we decided to defer this change

Remove \Drupal\experience_builder\Plugin\DataType\ComponentPropsValues::getPropSourceTypePrefixList as it should be internal to the SDC source plugin

because it could be something other component sources support.

Once that and ✨ Create a ComponentSource plugin for JS components Active land we will be in a position to decide if it should remain where it is or if it needs changes.

Proposed resolution

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Data model

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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

Comments & Activities

  • Issue created by @larowlan
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    A risk with removing this from the XB-wide storage of explicit inputs (currently ComponentPropsValues in the XB field property named 'props', but πŸ“Œ Remove references to 'props' outside of SDC - use 'inputs' instead Active will change that), is that we may lose the ability to apply update paths across all stored XB component trees.

    It is the ability to consistently detect what field type the stored input for an SDC prop uses that enables us to e.g. automatically upgrade all SDCs that use an image field+widget to instead use an entity_reference restricted to Media + the Media Library Widget. (See media_library_storage_prop_shape_alter() β€” which now runs always, but we do not want to prevent the ability for different site owners to make different choices for field type + widget. Nor the ability to change their decision later, which requires the ability to write such an update path.)

    Idea:

    • Add interface ComponentSourceWithCustomizableExplicitInputStorageInterface extends ComponentSourceInterface, similar to how we already have interface ComponentSourceWithSlotsInterface extends ComponentSourceInterface. Only the SDC component source (and the upcoming "code component" component source) would implement this.
    • Add ComponentSourceWithCustomizableExplicitInputStorageInterface:: getPropSourceTypePrefixList().
Production build 0.71.5 2024