Redux support for ImageWidget: `[image] String value found, but an object is required`

Created on 4 September 2024, 12 days ago
Updated 16 September 2024, about 12 hours 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).

YouTube is still processing but here's a screen recording:

https://youtu.be/Qt_9atfSoks

Steps to reproduce

  • Update demo_design_system (I've added the test component)
  • Delete XB component config and clear cache
  • Drag "Testing title with image" component into desktop area
  • Try to change the title on the sidebar

Proposed resolution

TBD

User interface changes

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

๐Ÿ› Bug report
Status

Postponed

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