Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine-server fails to render un-templated default slot content #5020

Open
jhefferman-sfdc opened this issue Dec 9, 2024 · 2 comments
Open

Comments

@jhefferman-sfdc
Copy link
Contributor

jhefferman-sfdc commented Dec 9, 2024

Description

Steps to Reproduce

A reproduction of this is fixtures -> scoped-slots -> advanced.

A minimal reproduction:

Create a child (x-child) component with a default slot and the lwc:slot-bind directive:

<template lwc:render-mode="light">
    <div>
        <slot lwc:slot-bind={item}>Fallback slot content</slot>
    </div>
</template>

Create a parent (x-parent) component with content both inside and outside template tags:

<template>
    <x-child>
        content outside of the template tag
        <template lwc:slot-data="data">
            <span>content inside the template tag</span>
        </template>
   </x-child>
</template>

Expected Results

engine-server should render all defined content:

<x-parent>
  <template shadowrootmode="open">
    <x-child>
      <div>
        <!---->
        <!---->
        content outside the template tag
        <span>
          content inside the template tag
        </span>
        <!---->
        <!---->
      </div>
    </x-child>
  </template>
</x-parent>

Actual Results

engine-server does not render any content outside of the template tag

<x-parent>
  <template shadowrootmode="open">
    <x-child>
      <div>
        <!---->
        <!---->
        <span>
          content inside the template tag
        </span>
        <!---->
        <!---->
      </div>
    </x-child>
  </template>
</x-parent>
@jhefferman-sfdc jhefferman-sfdc added hydration Having to do with hydration after SSR USER STORY and removed hydration Having to do with hydration after SSR labels Dec 9, 2024
Copy link

git2gus bot commented Dec 9, 2024

This issue has been linked to a new work item: W-17396130

@nolanlawson
Copy link
Collaborator

Is this an issue in engine-dom as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants