#3462441: Contextual form -> redux Model
Closes #3462441
Merge request reports
Activity
- Resolved by Ben Mullins
- Resolved by Ben Mullins
- Resolved by Ben Mullins
added 1 commit
- d3723946 - endpoint wait needs to account for subdir, and progress bar needs accessible label
added 2 commits
- Resolved by Ben Mullins
- Resolved by Ben Mullins
This is very cool!
But I have many questions
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
FieldTypePropExpression
s 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 theFile
entity that was created - … and from that, the
width
andheight
properties are populated … byImageItem::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)-
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
-
f909eead...a7536ec2 - 2 commits from branch
- Resolved by Ben Mullins