-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: duplicate behavior for slotted content when no template is prese…
…nt (#5174) * fix: add dangling slot definition * fix: scoped slot case, nested cases * fix: review comments * fix: additional test * fix: default slotted content * fix: render shadow slotted content for no template case * fix: update types * fix: instance naming
- Loading branch information
1 parent
d4872a2
commit 4334dc2
Showing
13 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
...engine-server/src/__tests__/fixtures/slots-basic/implicit-no-template/light/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<x-outer> | ||
<x-inner> | ||
</x-inner> | ||
</x-outer> |
3 changes: 3 additions & 0 deletions
3
...@lwc/engine-server/src/__tests__/fixtures/slots-basic/implicit-no-template/light/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-outer'; | ||
export { default } from 'x/outer'; | ||
export * from 'x/outer'; |
5 changes: 5 additions & 0 deletions
5
...er/src/__tests__/fixtures/slots-basic/implicit-no-template/light/modules/x/inner/inner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/__tests__/fixtures/slots-basic/implicit-no-template/light/modules/x/outer/outer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template lwc:render-mode="light"> | ||
<x-inner> | ||
I am default slot | ||
<div slot="foo">I am the foo slot</div> | ||
</x-inner> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...er/src/__tests__/fixtures/slots-basic/implicit-no-template/light/modules/x/outer/outer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
Empty file.
12 changes: 12 additions & 0 deletions
12
...ngine-server/src/__tests__/fixtures/slots-basic/implicit-no-template/shadow/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<x-outer> | ||
<template shadowrootmode="open"> | ||
<x-inner> | ||
<template shadowrootmode="open"> | ||
</template> | ||
I am default slot | ||
<div slot="foo"> | ||
I am the foo slot | ||
</div> | ||
</x-inner> | ||
</template> | ||
</x-outer> |
3 changes: 3 additions & 0 deletions
3
...lwc/engine-server/src/__tests__/fixtures/slots-basic/implicit-no-template/shadow/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-outer'; | ||
export { default } from 'x/outer'; | ||
export * from 'x/outer'; |
3 changes: 3 additions & 0 deletions
3
...r/src/__tests__/fixtures/slots-basic/implicit-no-template/shadow/modules/x/inner/inner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |
6 changes: 6 additions & 0 deletions
6
...src/__tests__/fixtures/slots-basic/implicit-no-template/shadow/modules/x/outer/outer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template> | ||
<x-inner> | ||
I am default slot | ||
<div slot="foo">I am the foo slot</div> | ||
</x-inner> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
...r/src/__tests__/fixtures/slots-basic/implicit-no-template/shadow/modules/x/outer/outer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters