- Issue created by @larowlan
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Split the component model values into raw and resolved.
To make sure I don't misunderstand: you're saying that this is necessary on the client-side, i.e. in the UI's data model?
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Also, AFAICT this relates to π Move form state into the global store Active too? Is that a third kind of value?
raw
: as stored in aFieldType
plugin on the server sideresolved
: as resolved into a shape expected by an SDC propform
: as represented by aFieldWidget
for aFieldType
, aka π Move form state into the global store Active
β¦ or am I misinterpreting things now? π
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yes, client side - we post a model to the preview and form endpoints and there's some hard-coded stuff happening with e.g. images to flip them back from a file URL to a target ID. Look at
\Drupal\experience_builder\Controller\ClientServerConversionTrait::findTargetForProps
for example - that can only go away if the client-side model stores a reference to[ 'alt' => 'This is a random image.', 'width' => 100, 'height' => 100, 'target_id' => (int) $this->mediaEntity->id(), ]
As well as
[ 'src' => '/path/to/some/image.webp', 'alt' => 'This is a random image.', 'width' => 100, 'height' => 100, ],
In terms of the form state, that is only a global place to store the current form values before we commit them to the model. Previously it was done via a context provider but that didn't work for ajax form additions - the global state does