Document why card_body exists

Created on 11 March 2024, 4 months ago
Updated 13 April 2024, 2 months ago

Problem/Motivation

We have both https://git.drupalcode.org/project/ui_suite_bootstrap/-/tree/5.0.x/templ... and https://git.drupalcode.org/project/ui_suite_bootstrap/-/tree/5.0.x/templ...

The split was done very early in the 5.0.x branch

It is not the only component from upstream we have split like that, but the other ones are related to the need of stacking multiple "sub" components into a container (accordion_item, list_group_item, carousel_item, toast_container....).

It is not the case here. So, do we keep such a component which seems to be useless and is asking the site builders to do extra work to build 2 different dispalys and nest them?

Proposed resolution

Move card_body slots & props to card definition and templates, and display the card-body wrapper only if one of title, subtitle, text, content (to be renamed to not mess with the current content slot) or link slot is filled.

API changes

Breaking by nature, but we can avoid it by keep card's content slot and card_body component and marking them as deprecated. We can remove them in 5.1.x branch for example.

📌 Task
Status

Fixed

Version

5.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024