- Issue created by @larowlan
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
We'll need to update
docs/components.md
etc. as well π Looking forward to making that all consistent and less confusing! π€π - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
β¦ and also do generalize SDC's
\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent::getClientSideInfo()
to not returnfield_data
butinput
.This will allow
BlockComponent::getClientSideInfo()
to match that, and return the block plugin's default settings.That will allow instantiating an SDC component or a Block component to happen in identical ways, and hence allow removing the work-around that π Implement saving block settings forms Active added.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Move SDC specific validation in ValidComponentTreeConstraintValidator::validate into the SDC source plugin Active is in, this is the logical next step now.
- First commit to issue fork.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Yay! :D
And the remaining failures should be largely trivial to resolve, thanks to the detailed validation + test coverage we have:
--- Expected +++ Actual @@ @@ Array &0 [ - 'component_tree' => 'The 'Drupal\Core\Block\TitleBlockPluginInterface' component interface must be absent.', - 'component_tree.props.block-invalid.' => Array &1 [ - 0 => ''label' is a required key.', - 1 => ''label_display' is a required key.', + 'component_tree' => Array &1 [ + 0 => 'The 'Drupal\Core\Block\TitleBlockPluginInterface' component interface must be absent.', + 1 => 'The array must contain an "inputs" key.', ], ]
π Failures like that make it easy :)
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
99% of docs updates have now been done. Down to renaming, mostly :)
- π¬π§United Kingdom longwave UK
I think I got everything that is not explicitly linked to SDCs or prop sources.
- π¬π§United Kingdom longwave UK
Tempted to also renamed ComponentTreeStructure to just ComponentTree, to match ComponentInputs, given we have
tree
andinputs
properties for them, and a tree is already a structure. ComponentTreeHydrated would then be better as HydratedComponentTree.Thoughts on this?
- π¬π§United Kingdom longwave UK
All feedback has been addressed, this is ready for review again.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Docs
I was working on the docs parts β I think it can be a lot clearer: by lifting all of the βshape matchingβ and βprop shapeβ and βprop sourceβ stuff OUT of
data-model.md
ANDcomponents.md
, and into a newshape-matching-into-field-types.md
.That now means that those 2 pre-existing docs talk only about the general case, and leave the additional complexity for generating an input UX and storing those inputs for that new doc.
It also means that
redux-integrated-field-widgets.md
can now refer to that more tightly scoped new doc instead of to the waaay biggerdata-model.md
.Stragglers
I fixed a bunch of
"component prop"
stragglers (including renaming some of those to "SDC props") β if you search for it new, you'll find only 3 occurrences, and all 3 are for React component props, which is indeed an accurate term there.(This also helps make the Redux-integrated Field Widgets doc clearer, because I remember going back-and-forth with @bnjmnm about how confusing all the different "props" meanings were! π€ͺ)
-
wim leers β
committed 1776a6a4 on 0.x authored by
longwave β
Issue #3500994 by longwave, wim leers, larowlan: Remove references to '...
-
wim leers β
committed 1776a6a4 on 0.x authored by
longwave β
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I figured rather than delaying the landing of this major clarification by awaiting review from @longwave, @larowlan and/or others, I'd just merge this. This is a major improvement compared to the state in HEAD!
But please feel free to reopen this issue if you feel the docs are still not clear enough! π I'm confident that what I did is an improvement, but I certainly do not think that my docs are perfect π
IOW: I merged for the sake of enabling the majority of us working on XB to move on from this :)
Automatically closed - issue fixed for 2 weeks with no activity.