Add API to preview custom elements in Drupal

Created on 25 August 2025, 20 days ago

Motivation

For previewing custom elements from within XB-previews, we need a way to generate that preview.

Proposed resolution

Provide a preview mechanism that supports multiple ways of handling previews. Lupus Decoupled needs one for Nuxt while allowing to add one for Next also. So we need some sort of provider/plugin mechanism.

Usually the same plugin/provider would be used for the whole site, but there might be use-cases to switch it based upon request, e.g. consider domain module / multi-site support.

While it makes sense to ship provides with custom elements module, the module lacks the knowledge/infrastructure to know where the frontend is running. So we could ship with the plugins and let Lupus Decouple expose UI and configuration to select and apply the suiting plugin.

For (the probably uncommon) usage of custom elements without Lupus Decoupled, we could add a dedicated module providing UI / config for that also, or leave it up the site-maintainer to add a glue module doing so.

📌 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