Follow-up for #3500386

Created on 25 June 2025, 10 days ago


Overview

Over at πŸ› Page status changes from "Published" to "Changed" even when no actual changes are made Active , I did some tightening of the "collapse/uncollapse" logic. In doing so, I (unintentionally):

  1. arguably reduced robustness
  2. arguably increased integrity
  3. definitely reduced garbage value potential

However, the tests that πŸ“Œ Code Components should render with their auto-saved state(if any) when rendered in the XB UI Active introduced are failing now, with the following exception:

OutOfRangeException: 'voice' is not a prop on the component 'Code component: Hey there'.

… because those tests intentionally were populating a voice prop that

  1. does not exist in the saved/live JavaScriptComponent
  2. but does exist in the auto-saved/draft version of it

However, this never really made sense, but especially no longer since we introduced component versions. It never made sense though, because no entry would exist in prop_field_definitions for the code component's Component config entity, meaning no widget would ever have appeared in its component instance form!

So while in a way HEAD's behavior was good for robustness and #3529622 "almost broke that", it's actually only allowing incorrect values AFAICT.

Proposed resolution

  1. Change \Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\GeneratedFieldExplicitInputUxComponentSourceBase::collapse() like so:
  2. Adjust the two failing tests

User interface changes

None.

πŸ› Bug report
Status

Active

Version

0.0

Component

Component sources

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024