Skip to content

#3452497: Edit Any Prop … pick from a suggestion of either structured data reuse (`dynamic`) or a instantiated-out-of-thin-air matching field type (`static`) πŸš€

Wim Leers requested to merge sdc_prop_choices into 0.x

Closes #3452497.

⚠ On top of !15 (merged), !16 (merged) and !27 (merged).

(Legend: ❌ = TODO, βœ… = working)

Goals

  • βœ… PoC UI to change the expression used for a sourceType == dynamic prop value
  • βœ… PoC UI to toggle between sourceType: from dynamic to static:field_item:… and back
  • βœ… Get rid of experience_builder_entity_view_alter()
  • βœ… Get adapter sources working too.
  • βœ… Initial end-to-end functional test: fde818b8

Screencast demonstrating: https://drupal.slack.com/archives/C072JMEPUS1/p1716925610355849

Or try it locally:

vendor/bin/drush si standard --account-name=root --account-pass=root --yes
vendor/bin/drush pm:install experience_builder --yes
# navigate to /node/add/article and observe!

Non-goals

  • Good UX
  • Nested components
  • Translations
  • "default" component trees aka bundle-defined defaults (in the Capabilities Doc: "content type templates"), which this field ought to store the additions/overrides for; it should no repeat the defaults.
  • API representation (JSON:API) or otherwise

MR contents

  • New FieldForComponentSuggester service.
  • Updates to the terrible widget, to illustrate the choices we could offer to the user, with it being VERY CLEAR that this is currently a πŸ’© UX
  • EndToEndDemoIntegrationTest, to prove this works end-to-end, on a fresh install.

Reviewer guidelines

@f.mazeikis:

Is any part of this MR likely to be part of the XB in the long term? (edited)

Excellent question! I'll add a section like this going forward πŸ€“

  • yes: the changes to DataType + FieldType + PropSource
  • maybe: the new service + kernel test
  • HELL NO, KILL IT WITH FIRE: FieldWidget + config/optional
Edited by Wim Leers

Merge request reports