-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssr): normalize class in child attrs (#4953)
- Loading branch information
Showing
15 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
8 changes: 8 additions & 0 deletions
8
...es/@lwc/engine-server/src/__tests__/fixtures/attribute-class/unstyled/child/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,8 @@ | ||
<x-parent> | ||
<template shadowrootmode="open"> | ||
<x-child class="button__icon"> | ||
<template shadowrootmode="open"> | ||
</template> | ||
</x-child> | ||
</template> | ||
</x-parent> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/attribute-class/unstyled/child/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-parent'; | ||
export { default } from 'x/parent'; | ||
export * from 'x/parent'; |
1 change: 1 addition & 0 deletions
1
...e-server/src/__tests__/fixtures/attribute-class/unstyled/child/modules/x/child/child.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 @@ | ||
<template></template> |
5 changes: 5 additions & 0 deletions
5
...ine-server/src/__tests__/fixtures/attribute-class/unstyled/child/modules/x/child/child.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 { | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
...server/src/__tests__/fixtures/attribute-class/unstyled/child/modules/x/parent/parent.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> | ||
<x-child class={computedClassNames}></x-child> | ||
</template> |
9 changes: 9 additions & 0 deletions
9
...e-server/src/__tests__/fixtures/attribute-class/unstyled/child/modules/x/parent/parent.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,9 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class CustomButton extends LightningElement { | ||
get computedClassNames() { | ||
return { | ||
button__icon: true | ||
} | ||
} | ||
} |
Empty file.
8 changes: 8 additions & 0 deletions
8
...lwc/engine-server/src/__tests__/fixtures/attribute-class/unstyled/component/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,8 @@ | ||
<x-parent> | ||
<template shadowrootmode="open"> | ||
<x-child class="button__icon"> | ||
<template shadowrootmode="open"> | ||
</template> | ||
</x-child> | ||
</template> | ||
</x-parent> |
3 changes: 3 additions & 0 deletions
3
...ges/@lwc/engine-server/src/__tests__/fixtures/attribute-class/unstyled/component/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-parent'; | ||
export { default } from 'x/parent'; | ||
export * from 'x/parent'; |
1 change: 1 addition & 0 deletions
1
...rver/src/__tests__/fixtures/attribute-class/unstyled/component/modules/x/child/child.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 @@ | ||
<template></template> |
5 changes: 5 additions & 0 deletions
5
...server/src/__tests__/fixtures/attribute-class/unstyled/component/modules/x/child/child.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 { | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
...er/src/__tests__/fixtures/attribute-class/unstyled/component/modules/x/parent/parent.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> | ||
<lwc:component lwc:is={ctor} class={computedClassNames}></lwc:component> | ||
</template> |
11 changes: 11 additions & 0 deletions
11
...rver/src/__tests__/fixtures/attribute-class/unstyled/component/modules/x/parent/parent.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,11 @@ | ||
import { LightningElement } from 'lwc'; | ||
import xChild from 'x/child'; | ||
|
||
export default class CustomButton extends LightningElement { | ||
ctor = xChild; | ||
get computedClassNames() { | ||
return { | ||
button__icon: 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