Simplify entity-ce-display form and AJAX logic

Created on 10 May 2024, about 1 month ago

Problem

As determined in πŸ“Œ Improve entity display editing UI Needs work the form attaches the library `field_ui/drupal.field_ui'`. This library does some complex ajax logic we don't really needed.

Proposed resolution

Simplify things by dropping `field_ui/drupal.field_ui'` and adding a custom JS for what we really need, if anything.

What I see needed:
* AJAX reloads for handling the settings forms. That seems to be handled separately from `field_ui/drupal.field_ui'` via regular form ajax.
* Some logic to add/remove fields. We don't need regions. We only need to store region 'hidden' if disabled, and 'content' if enabled.

As UI for removing/hiding fields I think it would be much cleaner to drop the long-list of hidden fields. Instead, we should simply not render hidden fields but show a small select "Add fields", it lists hidden-fields and has a AJAX "Add field" button which reloads the form.

Then we need to have some alternative for removing a field. So some "X" button in the end, next to the settings button should be good enough there.

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

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

Comments & Activities

Production build 0.69.0 2024