Hello;
Unfortunately, when using this module with Layout Builder, the blocks inside a pattern cannot be dragged and dropped. This UI is one of the major advantages of layout builder, so I think the lack of it is a major drawback.
As far as i've found, this is a problem that involves many layers and can be difficult to solve:
template_preprocess_layout(&$variables)
is the hook in charge of populating {{region_attributes}}. Right now it doesn't do it because the pattern layout definition is not ready when getThemeImplementations
is called on layout_discovery_theme()
(see this issue https://github.com/nuvoleweb/ui_patterns/pull/289), so they aren't affected by the hook. Applying the given patch solves this.processLayoutBuilderRegions()
also needs to be modified because as it is now it will delete the #attributes
of the element, which holds the region classes and is needed for this to work. A simple approach to quickly fix this is to iterate also on Element::properties
and not only Childrentemplate_preprocess_layout(&$variables)
, the structure is not OK compared to a "regular" layout so it won't produce valid {{ region_attributes }}. Fixed
User interface
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.