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?)

Command icon 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

just_like_good_vibes created an issue. See original summary.

just_like_good_vibes’s picture

just_like_good_vibes’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.