Different tasks which make sense together.
Preparatory work
Add noUi to Sources
- Add the property to attributes
- Filter the sources in the source selector.
SourceWithSlotsInterface
From Display Builder's #3531521: Layout plugins support;
- Add
SourceWithSlotsInterfaceexactly as defined in Display Builder - Add
LayoutSourcewith a few changes:- Add
no_uiso it will not be shown on component selector - challenge
context_requirements: ['layout_discovery'], - filter available layout plugins by removing the ones provided by ui_patterns, to avoid duplicates?
- Add
- Update
ComponentSourcewithSourceWithSlotsInterfaceimplementation - Add
LayoutSourceTestandComponentSourceTest?
SourceInterface::getGroup()
From #3534217: Use groups in Pattern presets library:
- Add SourceInterface::getGroup(
- Copy implementation in ComponentSource.php
- Add Plugin/UiPatterns/Source/TestGroupSource.php ?
Follow-up
Once merged, let's go back to Display Builder: #3572186: Use SourceWithSlotsInterface from UI Patterns
Once #3576395: Add SourceWithChoicesInterface::choiceForm() is merged, we can complete LayoutSource plugin and remove no_ui attributes
Issue fork ui_patterns-3571009
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
pdureau commentedWork in progress
Comment #4
pdureau commentedComment #5
pdureau commentedSomething else to port from Display builder to UI Patternns: #3573805: Empty renderables in regions prevent layouts rendering
Comment #6
pdureau commentedThis is also the opportunity of adding new methods in SouceInterface and SourceWithChoicesInterface following #3534217: Use groups in Pattern presets library
Comment #7
pdureau commentedComment #8
pdureau commentedLet's challenge
context_requirements: ['layout_discovery'],inLayoutSource.Comment #9
pdureau commentedComment #10
pdureau commentedA change to report https://git.drupalcode.org/project/display_builder/-/commit/d7303d10bba5...
Comment #11
pdureau commentedComment #12
pdureau commentedSourceWithSlotsInterface
We need to challenge
SourceWithSlotsInterface::settingsFormPropsOnly(): the naming is ugly and feel alien related to the interface name.Maybe it is time to also add the already planned
SourceWithPropsInterface(which will be used byComponentSourceandIconRenderableSource) and move this (renamed) function thereRemoved because not used and because we will remove
context_requirementskind of soon: #3540247: Tidy source contextsWe are not able to move Display Builder tests to UI Patterns because they extends a base class specific to Display Builder.
SourceInterface::getGroup()
TODO