Problem/Motivation
There is something weird about "Data from field" source plugin: it is available for props without a type. Or, more precisely, to props of type UnknownPropType because we have such prop type

Tested with the first props of https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/tests/module...
Props without prop types are not expected to have sources, prop without sources are not expected to show up in the form.
Proposed resolution
So, what do we do ? We fix "Data from field" to avoid targeting UnknownPropType" ? Or we challenge the relevancy of "UnknownPropType" plugin ?
| Comment | File | Size | Author |
|---|
Issue fork ui_patterns-3465524
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 #3
christian.wiedemann commentedI see folowing possible solutions:
Comment #4
christian.wiedemann commented@just_like_good_vibes: I need your 5 cents here :)
Comment #5
just_like_good_vibesmy question, why do we need unknownPropType ? sorry i forgot.
if it is an hardcoded edge case, where no sources should be shown,
my favorite solution between the three solutions proposed would be : "In SourcePluginManager::getDefinitionsForPropType: if ($prop instanceOf UnknownPropType) {return [];}"
Comment #6
pdureau commentedComment #8
christian.wiedemann commentedI added the if.
Comment #9
just_like_good_vibesPierre, would you review please :)?
Comment #11
pdureau commentedComment #12
pdureau commentedComment #13
christian.wiedemann commented