- Issue created by @lauriii
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
AFAICT this is because some of Olivero's styles (aka the
default
theme akasystem.theme:default
in the screenshot) are not injected into the component'scss
and/orheader_js
, for itsdefault_markup
.IOW:
\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\BlockComponent::getClientSideInfo()
would need to changereturn ['build' => $this->renderComponent([], $component->uuid())];
to something like
$build = $this->renderComponent([], $component->uuid()); // Attach the default theme's … $build['#attached']['library'][] = … return ['build' => $build];
Although arguably, this is a bug in
\Drupal\system\Plugin\Block\SystemBrandingBlock::build()
… but as far as that implementation is concerned, XB's rendering-in-isolation of this block is an unexpected use case.But I think I see a possible heuristic for this:
$build = $this->renderComponent([], $component->uuid()); if (!empty(array_intersect($build['#cache']['tags'], ['config:system.site', 'config:system.theme'])) { // Attach the default theme's … $build['#attached']['library'][] = … } return ['build' => $build];
Something like that?