[META] Support component types other than SDC, block, and code components
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3454519. --> Reported by: [larowlan](https://www.drupal.org/user/395439) Related to !68 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>At the moment the component config entity (introduced in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3444417" title="Status: Closed (fixed)">#3444417: "Developer-created components": mark which SDCs should be exposed in XB</a></span>, being refined in subsequent issues) is tightly coupled to an SDC but it feels like we need to support other things - like blocks (views, menus). Making this pluggable could also mean a bridge for paragraphs users.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Make the "component" config entity and data model support other component types (does that even make sense as a name?).</p> <table> <tr> <th>"Component type"/"Renderable"/&hellip; NAME TBD</th> <th>Inputs</th> <th>Required context</th> <th>Input UI</th> <th>Has slots or not?</th> <th>Issue</th></tr> <tr> <th>SDC (no plugin interface because zero PHP logic, plugin manager: <code>\Drupal\Core\Theme\ComponentPluginManager</code>)</th> <td>props</td> <td>Depending on <a href="https://git.drupalcode.org/project/experience_builder/-/tree/0.x/src/PropSource?ref_type=heads"><code>PropSource</code></a>: no context needed, or host entity needed</td> <td>Shape-matched field types + widgets, current PoC: <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3452497" title="Status: Closed (fixed)">#3452497: [MR Only] Edit any component prop, powered by a new FieldForComponentSuggester service, which will power the JS UI</a></span></td> <td>&#9989;</td> <td>N/A</td> </tr> <tr> <th>Nuxt (TBD)</th> <td>props</td> <td>same as SDCs</td> <td>probably same as with SDCs (shape-matched form)</td> <td>&#9989;</td> <td><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3520666" title="Status: Closed (fixed)">#3520666: Prototype rendering JavaScript components with Nuxt</a></span></td> </tr> <tr> <th>Block (<code>BlockPluginInterface</code>)</th> <td>block settings</td> <td>None (although blocks themselves can react to context using Context API)</td> <td>each block plugin's form<br>Details/concerns: <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-3"><a href="https://www.drupal.org/project/experience_builder/issues/3462241" title="Status: Closed (duplicate)">#3462241: [PP-1] Decorate the SDC plugin manager and allow components defined in code</a></span></td> <td>&#10060;</td> <td><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3475584" title="Status: Closed (fixed)">#3475584: Add support for Blocks as Components</a></span></td> </tr> <tr> <th>Layout (<code>LayoutInterface</code>)</th> <td>&#10060;</td> <td>None (although layouts themselves <a href="https://www.drupal.org/node/3183338">can react to context using Context API</a>)</td> <td><em>some</em> layout plugins have a settings form (thanks to composing with <code>PluginFormInterface</code>)</td> <td>&#9989;</td> <td><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-13"><a href="https://www.drupal.org/project/canvas/issues/3483307" title="Status: Needs work">#3483307: New `ComponentSource`: `Layout`, to allow for a Layout Builder-to-Canvas migration</a></span></td> </tr> <tr> <th>Paragraphs (<code>TBD Interface</code>)</th> <td>Fields</td> <td>TBD</td> <td>TBD</td> <td>&#9989; [Paragraphs can be nested]</td> <td><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-1"><a href="https://www.drupal.org/project/canvas/issues/3517216" title="Status: Active">#3517216: New `ComponentSource`: `ParagraphType`, to allow for a Paragraphs-to-Canvas migration</a></span></td> </tr> </table> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3> > Related issue: [Issue #3444417](https://www.drupal.org/node/3444417) > Related issue: [Issue #3453690](https://www.drupal.org/node/3453690) > Related issue: [Issue #3455036](https://www.drupal.org/node/3455036) > Related issue: [Issue #3444424](https://www.drupal.org/node/3444424) > Related issue: [Issue #3456064](https://www.drupal.org/node/3456064) > Related issue: [Issue #3455753](https://www.drupal.org/node/3455753) > Related issue: [Issue #3379725](https://www.drupal.org/node/3379725) > Related issue: [Issue #3475584](https://www.drupal.org/node/3475584) > Related issue: [Issue #3520484](https://www.drupal.org/node/3520484)
issue