Overview
ClientsideConversionTrait has SDC specific logic that should be moved into the component source plugin
Proposed resolution
User interface changes
Issue fork experience_builder-3495126
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
longwaveFirst pass at doing the simplest thing possible here, also opened #3497203: Throw exceptions instead of returning tuples for validation errors as passing the violations around is kinda messy when we could just throw exceptions.
I also feel like the source plugins are now doing way too much, SingleDirectoryComponent has 11 dependencies and 41 use statements and we're not really close to finishing it.
Comment #5
tedbowreviewing
Comment #6
tedbowI agree that is a lot. But also seems like this issue doesn't make it much works. Adds 1 dependency, entity type manager, but maybe the would removed in #3473336: The UI only handles resolved props values, hence complex widgets do not show the current value in props form (e.g. image with Media Library Widget) which is linked from
\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent::findTargetForPropsalso seems like
findTargetForPropscould be replace by genericgetTargetForSrc(string $src, string $type)somewhere but maybe it will go away completely.I had 1 question on the MR but think it is find the way it is
Comment #8
tedbowThanks @longwave!
Comment #9
wim leersNice incremental improvement 👍
@larowlan's post-merge MR comment will be addressed in #3497203: Throw exceptions instead of returning tuples for validation errors 👍