lwc icon indicating copy to clipboard operation
lwc copied to clipboard

`engine-server` fails to render un-templated default slot content

Open jhefferman-sfdc opened this issue 1 year ago • 2 comments

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 avatar Dec 09 '24 15:12 jhefferman-sfdc

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

git2gus[bot] avatar Dec 09 '24 15:12 git2gus[bot]

Is this an issue in engine-dom as well?

nolanlawson avatar Dec 09 '24 23:12 nolanlawson