[2.0.7] Add third_party_settings to ui_patterns_slot_source schema

Created on 10 August 2025, 2 months ago

Problem/Motivation

Following 📌 [2.0.1] Make Componenent element builder alterable Active , the hook is used in Display Builder with a custom _third_party_settings property.

Proposed resolution

Let's make this property official by introducing:

    third_party_settings:
      type: mapping
      label: 'Third party settings'

Remaining tasks

However, this proposal is different from other definitions in Core:

layout_builder.section:
  type: mapping
  label: 'Layout section'
  mapping:
    ...
    third_party_settings:
      type: sequence
      label: 'Third party settings'
      sequence:
        type: '[%parent.%parent.%type].third_party.[%key]'
config_entity:
  type: mapping
  mapping:
    ...
    third_party_settings:
      requiredKey: false
      type: sequence
      label: 'Third party settings'
      sequence:
        type: '[%parent.%parent.%type].third_party.[%key]'

Is it also the opportunity to be more complaint with Core usage?

API changes

Display Builder will need to update _third_party_settings to third_party_settings and maybe change the structure.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Merge Requests

Comments & Activities

  • Issue created by @pdureau
  • 🇫🇷France pdureau Paris

    @grimreaper: Let's talk about that because you are the config schema fan.

  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France pdureau Paris

    Fixed.

    What about this question: Is it OK this proposal is different from other definitions in Core?

    layout_builder.section:
      type: mapping
      label: 'Layout section'
      mapping:
        ...
        third_party_settings:
          type: sequence
          label: 'Third party settings'
          sequence:
            type: '[%parent.%parent.%type].third_party.[%key]'
    
    config_entity:
      type: mapping
      mapping:
        ...
        third_party_settings:
          requiredKey: false
          type: sequence
          label: 'Third party settings'
          sequence:
            type: '[%parent.%parent.%type].third_party.[%key]'
    
  • 🇫🇷France Grimreaper France 🇫🇷
    theme_settings:
      type: config_object
      mapping:
    ...
        third_party_settings:
          # Third party settings are always optional: they're an optional extension
          # point.
          requiredKey: false
          type: sequence
          label: 'Third party settings'
          sequence:
            type: theme_settings.third_party.[%key]
    

    I was not aware theme settings also got third_party_settings, thinking about ui_styles_entity_status, ui_skins....

    field_formatter:
      type: mapping
      label: 'Field formatter'
      mapping:
    ...
        third_party_settings:
          # Third party settings are always optional: they're an optional extension
          # point.
          requiredKey: false
          type: sequence
          label: 'Third party settings'
          sequence:
            type: field.formatter.third_party.[%key]
    
    core.entity_form_display.*.*.*:
      type: config_entity
      label: 'Entity form display'
      mapping:
    ...
        content:
          type: sequence
          label: 'Field widgets'
          sequence:
            type: mapping
            label: 'Field widget'
            mapping:
     ...
              third_party_settings:
                # Third party settings are always optional: they're an optional extension
                # point.
                requiredKey: false
                type: sequence
                label: 'Third party settings'
                sequence:
                  type: field.widget.third_party.[%key]
    

    I think it is ok to not have automatically type: '[%parent.%parent.%type].third_party.[%key]', but in the current state, the sequence type needs to be specified.

  • 🇫🇷France pdureau Paris

    We can do this:

    --- a/config/schema/ui_patterns.schema.yml
    +++ b/config/schema/ui_patterns.schema.yml
    @@ -67,6 +67,12 @@ ui_patterns_slot_source:
         third_party_settings:
           type: sequence
           label: 'Third party settings'
    +      sequence:
    +        type: ui_patterns_slot_source.third_party_setting.[%key]
         _weight:
           type: weight
           label: 'Slot source weight'
    

    And then do this in UI Patterns:

    ui_patterns_slot_source.third_party_setting.ui_styles:
      label: 'UI Styles settings'
      type: ui_styles.selected_mapping

    But this new policy make this kind of synchronous changes to cumbersome:

    As discussed with @just_like_good_vibes seems working with ui_patterns 2.x-dev and 2.0.8 release, so need to come back and finish here when 2.0.8 is out.

    https://www.drupal.org/project/display_builder/issues/3529260#comment-16... 📌 [1.0.0-alpha2] Flatten the Fields list Active

    So, postponed.

Production build 0.71.5 2024