[2.0.0-alpha1] Make our plugin manager ready SDC in Core

Created on 9 January 2024, 6 months ago
Updated 29 January 2024, 5 months ago

Problem/Motivation

SDC is close to be merged into Core namespace: 🌱 [META] Move code from the experimental SDC module to core Active

And there is some good news. As promised, the final classes are removed : https://git.drupalcode.org/project/drupal/-/blob/e9a21f83a6b0d71fd0c2375...

Unfortunately, there is still no $this->alterInfo('sdc_info'); but we may not need it.

It is the good time to do some clean-up in our Component plugin manager to be ready when we will be able to extends SDC without patch.

Service management

Remove decorator stuff.

We may add it again later if we go the decorator way, but it is not useful for now. Service overriding is enough.

So remove ComponentPluginManagerDecorator and change services.yml.

Rename and move UiPatternsSdcPluginManager

From Drupal\ui_patterns\Sdc\UiPatternsSdcPluginManager to Drupal\ui_patterns\ComponentPluginManager

Namespace aliases

Some final namespaces are already known, so let's use them:

@class_alias('Drupal\sdc\Element\ComponentElement', 'Drupal\Core\Render\Element\ComponentElement');
@class_alias('Drupal\sdc\Exception\ComponentNotFoundException', 'Drupal\Core\Render\Component\Exception\ComponentNotFoundException');
@class_alias('Drupal\sdc\Exception\IncompatibleComponentSchema', 'Drupal\Core\Render\Component\Exception\IncompatibleComponentSchema');
@class_alias('Drupal\sdc\Exception\InvalidComponentDataException', 'Drupal\Core\Render\Component\Exception\InvalidComponentDataException');
@class_alias('Drupal\sdc\Exception\InvalidComponentException', 'Drupal\Core\Render\Component\Exception\InvalidComponentException');

Methods and interfaces

Goal: all public methods belongs to an interface.

Implements CategorizingPluginManagerInterface

Expected by the Form Builder and the Library Pages

Move processStoriesSlots() to ComponentElement

It doesn't belong here.

Missing feature

β€œtemplate” property

Try again after cleanup. Twig namespace support will be done in dedicated ticket.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024