Problem/Motivation
Drupal core now lets a component say which components a slot expects and how many items it takes #3514072: SDC slots can set expectations and cardinality . UI Patterns uses it in the slot form #3551587: Slots restrictions according to suggestions and cardinality: the component list only offers the expected ones.
Proposed resolution
Add expected to these slots, and state the expected component in each slot description:
- accordion_group, accordions: accordion
- tabs, items: tab; panels: tab_panel
- button_group, buttons: button
- link_group, links: link
- badge_group, badges: badge
- tag_group, tags: tag
- skiplinks, items: link
- follow, social: button (no minItems, the zone is optional)
Older cores ignore these keys. Blocks, fields and text stay available in the slot form, only the component source list is filtered. A component already saved in a slot stays selectable.
Later, we could eventually do the same in other parts: card footer and badges zones, tile badges, modal actions, notice link, callout button, follow newsletter, header tools links and navigation (later follow-up issue?)
Issue fork ui_suite_dsfr-3626485
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
just_like_good_vibesComment #5
just_like_good_vibes