-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssr): extra bookends for light dom forwarded slots @W-17363666 (#…
…5005) * fix(ssr): extra bookends for light dom forwarded slots * fix(ssr): extra bookens for scoped slots * fix(ssr): extra bookends for if directive * chore: revert unneeded change * test(ssr): slotted-content-nested * fix(ssr): extra bookends in nested slotted content * Update packages/@lwc/engine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/slots/slots.js Co-authored-by: Nolan Lawson <[email protected]> * Update packages/@lwc/ssr-compiler/src/compile-template/transformers/component/slotted-content.ts Co-authored-by: Nolan Lawson <[email protected]> * Update packages/@lwc/ssr-compiler/src/compile-template/transformers/component/slotted-content.ts Co-authored-by: Nolan Lawson <[email protected]> * test(ssr): expect failure slot-not-at-top-level/advanced/lwcIf/shadow/index.js --------- Co-authored-by: Nolan Lawson <[email protected]>
- Loading branch information
1 parent
3d28140
commit b8362b5
Showing
14 changed files
with
76 additions
and
16 deletions.
There are no files selected for viewing
Empty file.
22 changes: 22 additions & 0 deletions
22
packages/@lwc/engine-server/src/__tests__/fixtures/slotted-content-nested/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,22 @@ | ||
<x-slots> | ||
<template shadowrootmode="open"> | ||
<x-receiver> | ||
<template shadowrootmode="open"> | ||
<slot> | ||
</slot> | ||
</template> | ||
<x-another> | ||
<template shadowrootmode="open"> | ||
<slot> | ||
</slot> | ||
</template> | ||
<div> | ||
hello | ||
</div> | ||
</x-another> | ||
<div> | ||
world | ||
</div> | ||
</x-receiver> | ||
</template> | ||
</x-slots> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/slotted-content-nested/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-slots'; | ||
export { default } from 'x/slots'; | ||
export * from 'x/slots'; |
3 changes: 3 additions & 0 deletions
3
...ngine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/another/another.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,3 @@ | ||
<template> | ||
<slot></slot> | ||
</template> |
2 changes: 2 additions & 0 deletions
2
.../engine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/another/another.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,2 @@ | ||
import { LightningElement } from 'lwc'; | ||
export default class extends LightningElement {} |
3 changes: 3 additions & 0 deletions
3
...ine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/receiver/receiver.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,3 @@ | ||
<template> | ||
<slot></slot> | ||
</template> |
2 changes: 2 additions & 0 deletions
2
...ngine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/receiver/receiver.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,2 @@ | ||
import { LightningElement } from 'lwc'; | ||
export default class extends LightningElement {} |
12 changes: 12 additions & 0 deletions
12
...wc/engine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/slots/slots.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 @@ | ||
<template> | ||
<x-receiver> | ||
<x-another> | ||
<template lwc:if={isTrue}> | ||
<div>hello</div> | ||
</template> | ||
</x-another> | ||
<template lwc:if={isTrue}> | ||
<div>world</div> | ||
</template> | ||
</x-receiver> | ||
</template> |
4 changes: 4 additions & 0 deletions
4
...@lwc/engine-server/src/__tests__/fixtures/slotted-content-nested/modules/x/slots/slots.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,4 @@ | ||
import { LightningElement } from 'lwc'; | ||
export default class extends LightningElement { | ||
isTrue = true; | ||
} |
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
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
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
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
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