Simplify Image list pattern

Created on 5 March 2023, almost 2 years ago
Updated 17 March 2023, almost 2 years ago

Problem/Motivation

"Items" field is in between a slot and a prop:

   items:
      type: array
      label: Items
      description: "A flat list of items, where each item is made of: - image: a renderable image. - label: an optional item label"
      preview:
        - image:
            theme: image
            uri: assets/image-1.png
        - label: Image 2
          image:
            theme: image
            uri: assets/image-2.jpg
        - label: Image 3
          image:
            theme: image
            uri: assets/image-3.jpg

Source: https://git.drupalcode.org/project/ui_suite_material/-/blob/2.0.x/templa...

So, it is not usable for site building :

Impossible to use it with field source plugins (so, as a slot) because of the nested structure
Impossible to use it with field settings plugins (so, as a prop) because of the renderables

Proposed resolution

Make it simpler

📌 Task
Status

Fixed

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.

Production build 0.71.5 2024