We can remove the semi coupled theme engine entirely and achieve the same functionality in fewer steps by using custom html tags in twig. These particular tags map to React components.
Some of the benefits that come to mind
<canvas-box> and <canvas-text> components, but this would make that approach work for all components )<drupal-form-element-label
required="{{ required }}"
title-display="{{ title_display }}"
attributes="{{ attributes|jsx_attributes }}"
title="{{ title|cast_string }}"
>
</drupal-form-element-label>
vs this
{
"props": {
"attributes": "object",
"title": {
"#markup": "string"
},
"required": "boolean",
"titleDisplay": "string"
}
}
The end result functionality-wise is essentially the sames. It wouldn't be doing anything new - but it is accomplishing the same result in fewer stages, and in a manner that is more easily understood. Semi coupled already required us to create templates with JSON content to instruct the engine how to process a given array. This approach also requires creating templates, but it's the twig we're accustomed to + some additional capabilities via custom elements.
Needs review
1.0
Semi-Coupled theme engine
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.