Remove tight 1:1 coupling between config entities and components: allow multiple Component config entities using the same SDC

Created on 18 July 2024, 7 months ago
Updated 12 September 2024, 5 months ago

Overview

At present we're using component IDs in code that assume there's a matching config entity with a matching ID pattern

This prevents non config entity components as well as multiple different instances of the same component

Proposed resolution

Wait for 📌 Decorate the SDC plugin manager and allow components defined in code Active and then adapt the code in https://git.drupalcode.org/project/experience_builder/-/merge_requests/68 to allow referencing component IDs without needing a config entity.

User interface changes

✹ Feature request
Status

Needs review

Component

Config management

Created by

🇊🇺Australia larowlan 🇊🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

Sign in to follow issues

Comments & Activities

  • Issue created by @larowlan
  • 🇊🇺Australia larowlan 🇊🇺🏝.au GMT+10
  • Assigned to lauriii
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    This prevents non config entity components as well as multiple different instances of the same component

    (Emphasis mine.)
    @lauriii, do you want that to be supported? This is not answered by the product requirements.

    @larowlan I'm only concerned about that one bit, the "non-SDC components" part makes sense 👍

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • Status changed to Needs review 5 months ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    FYI: the tight coupling itself is being solved in 📌 Prepare for multiple component types: ComponentTreeStructure should contain Component config entity IDs, not SDC IDs Fixed :)

    Retitling/rescoping for what I emphasized >1 month ago in #3.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇫🇮Finland lauriii Finland

    This prevents non config entity components as well as multiple different instances of the same component

    I'm not sure I could think of a good use case for this, at least one that couldn't be achieved by taking another approach. Maybe @larowlan who originally proposed this could elaborate what a good example use case for this would be?

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I suspect Lee is thinking of e.g. creating >=2 Component config entities for the experience_builder:heading SDC (for example), one with it preconfigured to <h2>, one with it preconfigured to <h3>.

    @larowlan is that right?

  • 🇊🇺Australia larowlan 🇊🇺🏝.au GMT+10

    At one point we were talking about default values being saved in the config entity

    I think that was the use case.

    I don't think we're doing that anymore

    But with the work to support other components (eg blocks) this is probably not needed anymore

    The main driver here is to get rid of the magic config entity id to SDC plugin, which the source plugin work Felix started does anyway

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Great! 😊 Thanks!

Production build 0.71.5 2024