- Issue created by @Kristen Pol
- First commit to issue fork.
- Status changed to Needs review
3 months ago 5:58am 28 August 2024 - š§šŖBelgium wim leers Ghent š§šŖšŖšŗ
+1 for theory
First: I'd love to see this simplified: it's very unfortunate that SDC's metadata is all JSON schema, except for this. Both the SDC subsystem and the XB module have to do a fair bit of special casing to make this work. For example, in XB:
ā¦ // TRICKY: `attributes` is a special case ā it is kind of a reserved // prop. // @see \Drupal\sdc\Twig\TwigExtension::mergeAdditionalRenderContext() // @see https://www.drupal.org/project/drupal/issues/3352063#comment-15277820 if ($prop_name === 'attributes') { assert($prop_schema['type'][0] === Attribute::class); continue; } ā¦
ā¦ but in practice: not sure?
I'm not quite convinced yet. š
If this is such a bad practice, then why does every SDC in Drupal core have this?!
See:
core/profiles/demo_umami/themes/umami/components/branding/branding.component.yml
core/profiles/demo_umami/themes/umami/components/banner/banner.component.yml
(literally the only prop there!)core/themes/olivero/components/teaser/teaser.component.yml
(literally the only prop there!)
So: can you point to a place where this removal was discussed?
- Status changed to Postponed: needs info
3 months ago 9:31am 28 August 2024