Add component instance edit form to contextual panel

Created on 4 June 2024, 6 months ago
Updated 9 August 2024, 3 months ago

WIP/iterative improvements (Not intended as final)

This issue is to add the ability to edit the props of a selected component using the contextual sidebar (right side). We still need to wait for new endpoints to actually make changes to the backend so this is still in early stages.

The current end goal is to render the Drupal form in JSX in the sidebar so we can hook up redux and undo/redo functionality to it. We want the redux on the form to see real-time updates to the preview when a form value is changed.

How to approach building this even though the UI is not currently tied to an entity

  • At least for now, the best way to generate a props edit form is via a field widget for the component_tree field type
  • HOWEVER! The XB UI is not currently coupled to an entity, and field widgets are difficult to render without belonging to an entity (I'm sure there is a way but not an easy one)

For the time being, we will take advantage of XB adding a component_tree to article with the field name field_xb_demo. When we need to access an edit form for one of these SDCs, we can generate a form for creating a new article entity and populate the field_xb_demo field with the prop values to be edited.

Obviously hard-coding to a specific entity type & field name is not how to do this long term, but this provides a means of progressing on the props edit without being blocked on how this UI is coupled to a given entity.

๐Ÿ“Œ Task
Status

Fixed

Component

Page builder

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom jessebaker

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