Support Image Widget fully in page data form

Created on 4 June 2025, 2 months ago

Overview

Image props use the media library widget, but an entity can still have an image field and as a result use the image widget.

There's at least one problem with this ATM - the Alternative text field is not editable. Other issues might surface once that is addressed.

Proposed resolution

  • get the alternative text field working
  • Address any other issues that surface after alt text is fixed
  • Provide e2e tests that confirm things work. File upload might not be possible with e2e (at least not easily). If this is the case perhaps the setup script can provide some of the needed scenarios.

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Redux-integrated field widgets

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

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

Merge Requests

Comments & Activities

  • Issue created by @bnjmnm
  • 🇺🇸United States effulgentsia

    This doesn't need to block a beta since the Page entity type doesn't have an image field (only a media field), but ideally, a stable release of XB 1.0 should work with all core field widgets.

  • 🇫🇮Finland lauriii Finland

    Since we are not supporting editing nodes at 1.0.0, I don't think this needs to block the release.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Diagnosis

    For an input to be React-controlled, it needs to have the 'data-form-id' attribute, which is added recursively to everything in the form array in \Drupal\experience_builder\Hook\ModuleHooks::formAlter

    However, inputs such as alt are not part of this array, as they are added later in a #process callback. This may be a simple as running FormIdPreRender::addAjaxAttribute at a later stage in the render process.

  • Merge request !1285#3528384 add attributes in after_build → (Open) created by bnjmnm
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    The 3528384-image-widget-etc MR I just pushed has a fix for the alt text field not working. The underlying problem will occur on any form element added in a #process callback.

  • Pipeline finished with Failed
    about 1 month ago
    #547097
Production build 0.71.5 2024