Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2025 at 23:29 UTC
Updated:
7 Feb 2025 at 11:19 UTC
Jump to comment: Most recent
In #3494859: Rename Component config ComponentSource plugin-specific configuration keys for clarity and #3491978: Implement saving block settings forms we've been working on removing references to 'props' outside of the SDC source plugin.
This is to continue that work
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 #2
larowlanComment #3
wim leersWe'll need to update
docs/components.mdetc. as well 😊 Looking forward to making that all consistent and less confusing! 🤓😅Comment #4
wim leers… and also do generalize SDC's
\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent::getClientSideInfo()to not returnfield_databutinput.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 #3491978: Implement saving block settings forms added.
Comment #5
wim leers#3500997: Move SDC-specific validation in ValidComponentTreeConstraintValidator and ComponentTreeMeetsRequirementsConstraintValidator into the SDC source plugin is in, this is the logical next step now.
Comment #7
longwaveGoing to make a start on this.
Comment #9
wim leersYay! :D
And the remaining failures should be largely trivial to resolve, thanks to the detailed validation + test coverage we have:
👆 Failures like that make it easy :)
Comment #10
wim leers99% of docs updates have now been done. Down to renaming, mostly :)
Comment #11
longwaveI think I got everything that is not explicitly linked to SDCs or prop sources.
Comment #12
longwaveTempted to also renamed ComponentTreeStructure to just ComponentTree, to match ComponentInputs, given we have
treeandinputsproperties for them, and a tree is already a structure. ComponentTreeHydrated would then be better as HydratedComponentTree.Thoughts on this?
Comment #13
wim leers#12: Can you do those in an additional MR on the same issue (and do it on top of a squashed version of the current MR)? I'd like to keep the current MR focused on what it currently does, to keep it easy to review.
Comment #14
longwaveAll feedback has been addressed, this is ready for review again.
Comment #15
wim leersDocs
I was already working on the docs parts before you commented (and pushed 😅) — 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.mdANDcomponents.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.mdcan now refer to that more tightly scoped new doc instead of to the waaay biggerdata-model.md.Main commit for this: https://git.drupalcode.org/project/experience_builder/-/merge_requests/5...
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! 🤪)
Comment #17
wim leersComment #18
wim leersI 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 :)
EDIT: also, #3493941 was already in progress and is now the ideal way to verify whether those docs changes left things in a clear enough spot: #3493941-14: Maintain a per-component set of prop expressions/sources.