Skip to content

Conversation

@TurtlBbx
Copy link
Contributor

PR for the issue: #394.

slots: {
image: '<img loading="lazy" src="https://placehold.co/600x400" width="600" height="400" alt="test" />',
body: {
element: 'node',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is bad example. a node-element is usually not wrapped in a node element. rather us a drupal-markup here.
also "unified" is a bad name, call it explicit.

if (customElements?.slots && Object.keys(customElements?.slots)?.length) {
Object.entries(customElements?.slots).forEach(([key, element]) => {
const rendered = renderCustomElements(element)
slots[key] = rendered ? () => h(rendered) : null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renderCustomElements already returns the return value of h() - so why are we wrapping it in another h() ?

@fago
Copy link
Contributor

fago commented Oct 29, 2025

thanks for the start! I've taken this and made a fully-fledged PR, please see #402

@fago fago closed this Oct 29, 2025
@fago fago deleted the feature/simplify-rendering-in-components branch October 29, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants