Request to overhaul experimental widget to reuse content entity form

Created on 11 February 2025, about 2 months ago

Problem/Motivation

The experimental widget does not support content moderation, nor does it support translation. See:

We've tried to make it work, but both issues take a wildly different approach to get around the constraints of the current implementation where parts of a content entity form are mimicked. In the translation issue, the taken approach was even marked as something that cannot be committed due to it touching the LayoutParagraphsLayout class.

Now, layout_paragraphs does work with content moderation and translation when using the regular edit, translate and revision form pages. So rather than trying to reinvent the wheel and manually massaging forms, form states, form displays, temp stores, etc. wouldn't it be better to simply load the same form we have in the admin UI, but reduced in size?

We could filter on just the paragraphs and content_moderation fields.

Steps to reproduce

Try to use experimental widget on a multilingual site with content moderation and see your data get corrupted.

Proposed resolution

Load the forms that we know work, without any alterations. Just reduce them to the bare minimum using an allowlist.

Remaining tasks

Approve or deny this feature request, preferably with feedback.

User interface changes

Very little, look and feel can largely remain the same

API changes

Experimental widget does the same, but functions differently internally

Data model changes

No data corruption when using the experimental widget

Feature request
Status

Active

Version

2.2

Component

Code

Created by

🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

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

Comments & Activities

Production build 0.71.5 2024