Skip to content
Snippets Groups Projects

#3462441: Contextual form -> redux Model

Closes #3462441

Edited by Ben Mullins

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jesse Baker
  • Jesse Baker
  • I think you can remove <Button onClick={handleEditClick} className={styles.editButton}>Edit</Button> from ContextualPanel.tsx - it was just a PoC proving that updating the model would update the preview - but now we really are updating the model with the real form!

  • Jesse Baker requested changes

    requested changes

  • Ben Mullins added 1 commit

    added 1 commit

    Compare with previous version

  • Ben Mullins added 1 commit

    added 1 commit

    Compare with previous version

  • Ben Mullins added 1 commit

    added 1 commit

    • d3723946 - endpoint wait needs to account for subdir, and progress bar needs accessible label

    Compare with previous version

  • Ben Mullins added 2 commits

    added 2 commits

    Compare with previous version

  • Harumi Jang
  • Harumi Jang approved this merge request

    approved this merge request

  • Ben Mullins added 1 commit

    added 1 commit

    • f909eead - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Wim Leers
  • This is very cool!

    But I have many questions :sweat_smile:

    The values that this client-side logic extracts from the form all appear to be testing a single pattern: every tested field type here has a single property named value, and it has a simple equivalent field widget representation.

    IOW: all FieldTypePropExpressions being tested so far are of the shape ℹ︎string␟value: ℹ︎<field type>␟value.

    But what about more complex ones, like for the experience_builder:image component's {src↝entity␜␜entity:file␝uri␞␟value,alt↠alt,width↠width,height↠height}?

    In other words: what about field types with multiple props, such as ImageItem? That requires:

    • target_id, of the File entity that was created
    • … and from that, the width and height properties are populated … by ImageItem::preSave(), which never gets called in this approach, and from talking to @lauriii, is never intended to get called?

    Because in the end, every one of these must be stored as a static prop source, so the client must be able to pass JSON like this to the server:

    {"sourceType":"static:field_item:string","value":"Hello, world!","expression":"ℹ︎string␟value"}

    (see \Drupal\Tests\experience_builder\Kernel\PropSourceTest::testStaticPropSource() for more examples)

  • Wim Leers changed title from Contextual form -> redux Model to #3462441: Contextual form -> redux Model

    changed title from Contextual form -> redux Model to #3462441: Contextual form -> redux Model

  • Ben Mullins added 3 commits

    added 3 commits

    • f909eead...a7536ec2 - 2 commits from branch project:0.x
    • 5565ae55 - Merge remote-tracking branch 'origin/0.x' into 3462441-redux-props-form

    Compare with previous version

  • Wim Leers
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading