Slots restrictions according to suggestions and cardinality

Created on 11 October 2025, about 2 months ago
Updated 30 October 2025, 26 days ago

Problem/Motivation

With Allow SDCs to specify what components are allowed in its respective slots Active , Core will introduce 3 new optional keywords in each SDC slot definition:

  • expected with a list of values: SDC plugin IDs (if they have a colon inside) or tags/groups (if no colon inside)
  • minimum and maximum with a strictly positive integer value: Enforce a lower/maximum limit on the number of children

SDC and the Render API will only suggest, not enforce. So, both UI Patterns 2 (in the slot part of the component form) and Display Builder will need to find a way to leverage those properties.

Display Builder already have a dedicated issue 📌 Cardinality constraint for slots Active

Proposal

We don't need to wait the Core issue to be merged to start. The consensus has been reached and Core will not do much anyway.

et's ignore minimum for now.

Specific to maximum:

  • Disable the "Select a source to add" select in ComponentSlotForm when the limit is reached
  • The restriction works for all sources, because if a source can have many renderables but many sources can't generate a single renderable
  • because if a source can have many renderables, we may overpass the limit without knowing it but it is OK, this is the sitaution we can accept

Specific to suggested:

  • Filter out components from ComponentSource source plugin select list.
  • This restrictions works only on components, other sources are still free to be put anywhere
Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024