Evolve component instance edit form to become simpler: generate a Field Widget directly

Created on 15 July 2024, 4 months ago
Updated 6 August 2024, 4 months ago

Overview

📌 Add component instance edit form to contextual panel RTBC introduced a first iteration of a form in the right sidebar to edit the props of a component instance (not to be confused with ComponentEditForm, introduced by 📌 "Developer-created components": mark which SDCs should be exposed in XB Fixed ).

It introduces a lot of infrastructure to be able to render PHP-defined widgets ("field widget plugins") using React by lifting a subset of the functionality out of https://www.drupal.org/project/jsx , thus allowing React to render Form API render arrays generated by field widget plugins! 🤯💥

But what it does not do, is generating that Form API render array using something sane/understandable: it does so by extracting a subset of the form that \Drupal\experience_builder\Plugin\Field\FieldWidget\TwoTerribleTextAreasWidget generates. But that is itself — as the name already indicates — a very temporary throw-away kind of code.
Since Allow specifying default props values when opting an SDC in for XB Fixed , \Drupal\experience_builder\PropSource\StaticPropSource::getWidget() (and sibling methods) can be used to generate a new static prop source and a widget to accept a value, even if no host entity exists yet.

Proposed resolution

  1. ✅ : https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...
  2. https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...
  3. ✅ → https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...

Out-of-scope:

IOW: The sole purpose of this issue is to simplify the right sidebar.

User interface changes

Less noisy UI — it should start resembling the actual UX, and be somewhat reasonable.

📌 Task
Status

Fixed

Component

Page builder

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024