Overview

XB was originally developed with support SDCs, exclusively.

Then in November 2024, we added support for block plugins (in #3475584: Add support for Blocks as Components) and introduced the ComponentSource plugin concept.

The problem:

  • ComponentSourceInterface and surrounding infrastructure was built (and evolved) on an as-needed basis, not always with an eye towards making this a public API
  • hence test coverage is partial at best
  • there have been many ComponentSource-specific bugs for aspects/edge cases other component source plugins already fixed
  • combined, this means it's hard to be confident about the production-readiness: robustness, edge case handling, etc.

We know there's both known technical debt, and more features that we'll eventually need to support:

  1. debt: the explicit input schema must be able to evolve, and each ComponentSource may have different needs for that. For example: block plugins may change their settings (and their config schema), SDCs may gain new optional inputs, JS components may gain new required inputs
  2. debt: we know we'll need to support implicit inputs (e.g. block plugins can declare required + optional "contexts" that allow block plugins behave differently not only to component instance author's explicit wishes ("explicit inputs"), but also based on the component developer's logic ("implicit inputs")
  3. feature: asymmetric translation will need some explicit inputs to be locked, because some explicit inputs may be considered to be not translatable — for example an image input of some component

Note: All ComponentSources targeted for XB 1.0-beta1 (#3515932: Milestone 1.0.0-beta1: Enable creation of non-throwaway sites):

  1. sdc\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent
  2. block\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\BlockComponent
  3. js\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\JsComponent
  4. _name tbd_ → stabilizing this highly experimental component source is out of scope for this meta, that has its own issue: #3519737: ADR for dynamic code components

Beta blockers (July 2025)

Beta blockers (tag: beta blocker) MUST happen before #3515932: Milestone 1.0.0-beta1: Enable creation of non-throwaway sites.

(Numbered lists must happen one after the other, bulleted lists can happen in parallel.)

  1. Test coverage to gain baseline confidence, and establish equivalent test coverage for all component sources, powered by a new ComponentSourceTestBase:
    1. #3501290: Introduce unit test coverage for both ComponentSource plugins (Block + SDC)
  2. Incomplete functionality (due to demo-driven development) — which must ALWAYS expand a ComponentSourceTestBase-powered test:
    1. Discovery of components in a source, and only allowing the ones we know will work reliably:
    2. Correct rendering of components in a source:
    3. 🟢 Source's explicit inputs:
    4. ✅ Other

    Stable ComponentSource plugin API blockers (date: TBD)

    Stable blockers (tag: stable blocker) do not block #3515932: Milestone 1.0.0-beta1: Enable creation of non-throwaway sites, but would be nice-to-have at that point in time. They MUST happen before #3517885: Milestone 1.0.0: Production Sites. This is for after #3517885: Milestone 1.0.0: Production Sites.

    To prevent contrib disruption prior to this being done: #3546903: Disallow using any ComponentSource other than SDC/JS/Block unless `canvas_dev_mode` is installed.

    Post-stable priorities (after achieving a stable PHP API)

    Post-stable priorities (tag: post-stable priority) do not block any release, and are things we'd like to see happen, but are intentionally NOT happening any time soon. We're highly confident that these will be net additions without the need for backwards compatibility breaks.

Comments

wim leers created an issue. See original summary.

wim leers’s picture

Priority: Normal » Critical
Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

wim leers’s picture

Issue summary: View changes
wim leers’s picture

Assigned: wim leers » longwave
wim leers’s picture

Discussed #explicit-input-schema-change-strategies in detail with @longwave just now. Here are the meeting notes:

  1. @longwave came up with a really really interesting proposal in #3501708-9: Prove that it *will* be possible to apply block settings update paths (assuming #3521221 in core) to stored XB component trees in config/content for allowing us to reuse all of the existing block update path logic, seemingly without the need for additional logic/burden on block plugin maintainers!
    However … it can't actually work because we won't know which of those post-update hooks are associated with which block plugins! In theory, we could run all those block-targeting post-update hooks, but then we'd need to track for every single block-sourced component instance which update hooks have already been executed (equivalent to how core does the system-wide UpdateRegistry). That doesn't scale, just like it doesn't scale to update potentially millions of (revision) rows.
  2. We agreed that different update strategies (perhaps the 3 in ExplicitInputSchemaChangeStrategyEnum in the current IS) will be necessary. And there may be a need for even more. It really depends on how a particular component source functions. Future ones: layout types, paragraph types, web components, external API shenanigans, etc. — it's literally anything. So we cannot lock ourselves into one corner.
  3. … but short-term, the primary challenge is block plugins. (Worst case: we disable the SDCs and code components which add new required properties and let #3517941: [META] Robust component instance error handling during hydration+rendering handle it for us until that SDC/code component is edited and gets the missing props.)
  4. The "track different explicit input schema versions" part described in the sibling meta needs massive rethinking because "provider version" is meaningless in a world of post-update hooks (which is the block plugin reality today!)

Conclusion: both my ideas (articulated in this issue + #3520449) and @longwave's (at #3501708-9) have been invalidated 😅 But we both agree that #3457504: XB field type: calculate all dependencies, store them, surface in new Component "Audit" operation is an important step towards more clarity on how we might solve this.

larowlan’s picture

I think we're missing #3500795: [PP-1] Implement client-side validation of block settings in the scope here - at present we're relying on the 'jsonSchema' of SDC (and via the ephemeral SDC plugin in Code components) to show validation errors in the UI but we don't have another source component that has clientside validation so can't be sure the API is ready

wim leers’s picture

wim leers’s picture

Issue summary: View changes
lauriii’s picture

Issue summary: View changes
larowlan’s picture

penyaskito’s picture

wim leers’s picture

Issue summary: View changes

New category in the issue summary: Source's explicit inputs:. Prompted by the addition of #3521444: Required image field becomes non-functional after publishing with empty field.

wim leers’s picture

wim leers’s picture

Issue summary: View changes

#3523496 was in there twice 🙈

wim leers’s picture

👉️🔄

wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes

Updated the issue summary to more clearly distinguish between:

  1. beta blockers (i.e. necessary for #3515932: Milestone 1.0.0-beta1: Enable creation of non-throwaway sites)
  2. stable blockers (i.e. necessary for #3517885: Milestone 1.0.0: Production Sites)
wim leers’s picture

wim leers’s picture

wim leers’s picture

Issue summary: View changes

Fix HTML.

wim leers’s picture

Issue summary: View changes

Some crucial text was lost in the #47 reshuffle.

wim leers’s picture

wim leers’s picture

Issue summary: View changes
wim leers’s picture

wim leers’s picture

wim leers’s picture

wim leers’s picture

wim leers’s picture

wim leers’s picture

Assigned: longwave » wim leers

The beta parts are 99% done 🥳 — the only remaining one is #3516602: SDC `enum` props should have human-readable labels: use `meta:enum`, which is in the final stages, and the "land upstream support for this" part is already complete: #3493070: SDC `enum` props should have translatable labels: use `meta:enum`. 😊

wim leers’s picture

Issue summary: View changes

h3 → h2

wim leers credited bnjmnm.

wim leers’s picture

Given #3526644-9: Make basic webform experience work with Drupal Canvas, I think we actually need something like the all-props SDC but for block plugins.

I suspect we actually need to expand what \Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\BlockComponent::checkRequirements() does, because block forms can use arbitrary render arrays, and those are definitely not guaranteed to just work in XB.

So I think BlockComponent::checkRequirements() would at minimum need to be expanded with calling ::blockForm() and traversing it to see if only "known to be working" #types are present 😅

It seems that in core only the following #types are used:

  • actions
  • checkbox
  • container
  • details
  • entity_autocomplete
  • fieldset
  • select
  • submit
  • textfield

Some of those likely will require some work in XB's Semi-coupled theme engine AFAICT.

Crediting @bnjmnm for putting #3526644 on my radar!

wim leers’s picture

Together with @bnjmnm I articulated a proposal at #3500795-8: [PP-1] Implement client-side validation of block settings 😊

wim leers’s picture

wim leers’s picture

wim leers’s picture

Issue summary: View changes

ℹ️ @lauriii (together with @effulgentsia and I) decided to descope a stable ComponentSource plugin API to after 1.0.

It'll still be around for contrib to experiment, but we realistically won't have the time to actually make it a stable PHP API with a BC promise before DrupalCon Vienna.

wim leers’s picture

wim leers’s picture

Project: Experience Builder » Drupal Canvas
Version: 0.x-dev » 1.x-dev
wim leers’s picture

Issue summary: View changes
wim leers’s picture

penyaskito’s picture

wim leers’s picture

wim leers’s picture

wim leers’s picture

AFAICT we've got our first example of a slot-only ComponentSource: the Layout source, which will enable a Layout Builder-to-Canvas migration.

wim leers’s picture

wim leers’s picture

Issue summary: View changes
wim leers’s picture

wim leers’s picture