ComponentMetadataRequirementsChecker::check() should validate no prop is of type object

Created on 9 May 2025, 3 days ago

Overview

We don't support object shapes, so XB becomes unusable if there are object props.

In Drupal 11.2.0, navigation module provides a title SDC, which breaks XB.

icon:
  title: Icon
  type: object
  properties:
    pack_id:
      title: Icon Pack
      type: string
      default: navigation
    icon_id:
      title: Icon ID
      type: string
    settings:
      title: Icon Settings
      type: object
      default:
        class: toolbar-button__icon
        size: 20

Proposed resolution

  1. Add an SDC to the xb_test_sdc module with invalid example
  2. Update SingleDirectoryComponent::checkRequirements() to detect and disallow this
  3. Update \Drupal\Tests\experience_builder\Kernel\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponentTest::testDiscovery() expectations

User interface changes

XB works when navigation is enabled.

πŸ“Œ Task
Status

Active

Version

0.0

Component

Component sources

Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024