Improve mapping of SDCs custom elements

Created on 25 August 2025, about 2 months ago

Motivation

At the moment, XB integration maps SDC simply to custom elements based on the naming pattern, e.g. see ::getCustomElementTag

This results into custom elements like <xb-test-sdc-props-no-slots>.
This works if for every SDC a frontend component is existing, what we do not know. But even if so, atm this does not comply with XB component preview, which renders the SDC via twig.

Proposed resolution

Instead of blindly converting every to custom elements, we need to apply different strategies:
* Support twig-based rendering for SDCs (e.g. via drupal-markup)
* For CE-rendered elements: Make XB component preview for SDCs rendered via CE
* Extend twig-based rendering support with full slot support (embed CE-elements within SDC and vice versa)

For twig based rendering support, we have to take care of situations where we have slots which are not twig-based, so we need to be able to jump back and forth between twig/render-API based rendering and CE-conversion. As a start we could only allow embedding in one direction, e.g. only support CE-conversion to embed twig-SDC rendered elements.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇦🇹Austria fago Vienna

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

Comments & Activities

Production build 0.71.5 2024