Image prop makes it so other props are not editable in prop form

Created on 4 September 2024, 9 months ago

Overview

When playing around with images, I tried this:

'$schema': 'https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json'

name: Title with image

status: experimental

group: Organisms

props:

  type: object

  properties:

    title:
      type: string
      title: Title
      description: Title.
      examples:
        - Title which runs across two or three lines

    image:
      $ref: json-schema-definitions://experience_builder.module/image
      type: object
      title: Image
      examples:
        - src: https://placehold.co/600x400.png
          alt: 'placeholder'
          width: 600
          height: 400

and if you try editing the title prop, then you get:

Drupal\Core\Render\Component\Exception\InvalidComponentException: [image] String value found, but an object is required in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of /var/www/html/web/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).

Shouldn't this work?

Proposed resolution

TBD

User interface changes

All props can be edited with the sidebar even if one is an image.

๐Ÿ’ฌ Support request
Status

Active

Component

Page builder

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States Kristen Pol Santa Cruz, CA, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024