[1.0.0-alpha2] Flatten the Fields list

Created on 9 June 2025, 27 days ago

Problem/Motivation

Today, "Data from a field" ("[Entity] => [Field]" starting UI Patterns 2.0.5) is a single source in the Blocks library panel. So, we need to drop it and then pick the chosen field in the instance panel.

Proposed resolution

Add a new "Field" section in the Blocks library panel, alongside "List (Views)", "Menus" and "Others".

However, it will not be hardcoded like "List (Views)", "Menus" and "Others" (it was OK to hardcode them because they are Drupal blocks), but it will rely on the ui_patterns_overrides's SourcesBundlerInterface to get the list of sources.

So, instead of dragging only to the builder panel:

  source_id: entity_field
  source: {  }

We are dragging directly something like that:

  source_id: entity_field
  source:
    derivable_context: 'field:node:article:title'
    'field:node:article:title':
      value: {}

It would be nice to move this SourcesBundlerInterface logic to UI Patterns 2 by the way: 📌 [2.0.3] Source usability : better interfaces for sources relying on child plugins Active

📌 Task
Status

Active

Version

1.0

Component

display_builder_entity_view

Created by

🇫🇷France pdureau Paris

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

Comments & Activities

Production build 0.71.5 2024