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 SourceWithSlotsInterface exactly as defined in Display Builder
  • Add LayoutSource with a few changes:
    • Add no_ui so 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?
  • Update ComponentSource with SourceWithSlotsInterface implementation
  • Add LayoutSourceTest and ComponentSourceTest?

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

Command icon 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

pdureau created an issue. See original summary.

pdureau’s picture

Status: Active » Needs work

Work in progress

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Something else to port from Display builder to UI Patternns: #3573805: Empty renderables in regions prevent layouts rendering

pdureau’s picture

This is also the opportunity of adding new methods in SouceInterface and SourceWithChoicesInterface following #3534217: Use groups in Pattern presets library

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Let's challenge context_requirements: ['layout_discovery'], in LayoutSource.

pdureau’s picture

Issue summary: View changes
pdureau’s picture

pdureau’s picture

pdureau’s picture

SourceWithSlotsInterface

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 by ComponentSource and IconRenderableSource) and move this (renamed) function there

Let's challenge context_requirements: ['layout_discovery'], in LayoutSource.

Removed because not used and because we will remove context_requirements kind of soon: #3540247: Tidy source contexts

Add LayoutSourceTest and ComponentSourceTest?

We are not able to move Display Builder tests to UI Patterns because they extends a base class specific to Display Builder.

SourceInterface::getGroup()

TODO