Provide field group formatter Details card

Created on 20 March 2024, 8 months ago
Updated 6 May 2024, 7 months ago

Problem/Motivation

In 3186003 we provided "details as a collapsible fieldset, with all the fields rendered inside using the details element in the field ui and adding a class social-collapsible-fieldset to ensure we can also theme it specifically" (code reference how "class social-collapsible-fieldset to ensure we can also theme it specifically" is added).

We want to avoid approaches like this where "magic" class need to be added via configuration, just because we need to load different twig template to render details card. Furthermore, Details with "social-collapsible-fieldset" class has also a bug, that collapsible card can not be open by default. By providing new working field group formatter, this issue will also be fixed. It is suggested, that from this point on, Details Card should be used instead of Details with "social-collapsible-fieldset" class.

Steps to reproduce

To crate collapsible details card:
- install open social
- enable field_ui and field_group
- open any entity where fields can be added
- go to Manage form display or Manage display and click on "+ Add field group"
- Select details and add "social-collapsible-fieldset" class to it.
- Go to display and you should see something like on image bellow

Proposed resolution

IMPORTANT: this issue does not yet provide new field group formatter Details Card.
What is provided for now is just theme suggestion that will allow load different twig template needed for new field group formatter Details Card.
Follow up will be prepared to provide new field group formatter Details Card.

Remaining tasks

Provide new field group formatter Details Card

User interface changes

It is suggested, that once Details Card is prepared, it should be used instead of Details with "social-collapsible-fieldset" class.

API changes

N/A

Data model changes

N/A

Feature request
Status

Fixed

Version

2.5

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024