Skip to content

Commit

Permalink
chore: test usage of default slot with scoped data (#5024)
Browse files Browse the repository at this point in the history
* chore: test usage of default slot with scoped data

* chore: add comment to explain why content not rendered
  • Loading branch information
jhefferman-sfdc authored Dec 10, 2024
1 parent 27c6867 commit 3d28140
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<x-parent>
<template shadowrootmode="open">
<x-child>
<div>
<!---->
<!---->
<span>
Slotted content within template 99
</span>
<!---->
<!---->
</div>
</x-child>
</template>
</x-parent>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-parent';
export { default } from 'x/parent';
export * from 'x/parent';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template lwc:render-mode="light">
<div>
<slot lwc:slot-bind={item}>Fallback slot content</slot>
</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { LightningElement } from 'lwc';

export default class Child extends LightningElement {
static renderMode = 'light';
item = { id: 99, name: 'ssr' };
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<x-child>
<!-- TODO [#5020]: Fix rendering of scoped slot content, so that content outside of the template renders correctly with engine-server -->
<span>Slotted content outside of template</span>
<template lwc:slot-data="data">
<span>Slotted content within template {data.id}</span>
</template>
</x-child>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class Parent extends LightningElement {
foo = 'bar';
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const expectedFailures = new Set([
'known-boolean-attributes/default-def-html-attributes/static-on-component/index.js',
'render-dynamic-value/index.js',
'scoped-slots/advanced/index.js',
'scoped-slots/default-slot/index.js',
'scoped-slots/expression/index.js',
'scoped-slots/mixed-with-light-dom-slots-inside/index.js',
'scoped-slots/mixed-with-light-dom-slots-outside/index.js',
Expand Down

0 comments on commit 3d28140

Please sign in to comment.