Implement automatic fallback to server-side widget value transforms in "page data" (content entity form)

Created on 21 March 2025, 13 days ago

Overview

Quoting @effulgentsia from #3506467-38: Make Media Library widget work from "page data" (content entity form) β†’ :

If a contrib/custom widget doesn't include one (or opt into using the no-op one), the system should fall back to a server request that uses Form API + Widget API to go from widget input to field value and then the prop expression to go from field value to prop value. In this way, Drupal's existing ecosystem of widgets continue to work, and ones that include client-side transforms (or can use the no-op one) just work faster (without a network request once we implement πŸ“Œ Implement endpoint for realtime preview Active ).

For context:

Proposed resolution

User interface changes

None.

πŸ“Œ Task
Status

Active

Version

0.0

Component

Redux-integrated field widgets

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Comments & Activities

  • Issue created by @wim leers
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Even though my quote referenced in the issue summary was in the issue about the "page data" form, it was actually a statement about the component inputs form and just used as a point of comparison. So, re-titling this issue accordingly.

    Currently, there is no client-side transformation that runs when widget inputs are updated on the page data form, so this issue isn't applicable there, though it's possible that at some point we'll want to open a separate issue to add client-side transformations on the page data form. I don't think there's currently a use-case for that though, since the fields on the page data form are intentionally the ones that (for the most part) don't have any representation in or impact on the preview (with the exception of potentially changing the content of Blocks, such as the page title block).

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I don't think there's currently a use-case for that though, since the fields on the page data form are intentionally the ones that (for the most part) don't have any representation in or impact on the preview (with the exception of potentially changing the content rendered in Blocks, such as the page title block).

    That will completely change with 🌱 [META] 7. Content type templates β€” aka "default layouts" β€” clarify the tree+props data model Active !

Production build 0.71.5 2024