Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(ssr): add comments to the output of lwc:if blocks @W-16946260 #4622

Merged
merged 13 commits into from
Oct 11, 2024

Conversation

wjhsf
Copy link
Collaborator

@wjhsf wjhsf commented Oct 9, 2024

Details

When you use lwc:if, the rendered output contains empty HTML comments. For example,

<template lwc:if={isTrue}>
The rain in Spain falls mainly in the plain.
</template>

becomes

<!---->
The rain in Spain falls mainly in the plain.
<!---->

This PR adds that functionality to the SSR compiler.

Note: This PR is a continuation of the work to add missing directives, so it is built on #4615. Also, it turns out that we don't need to implement ElseifBlock or ElseBlock because they seem to be handled by IfBlock.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.
  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.
  • 🔬 Yes, it does include an observable change.

GUS work item

W-16946260

@wjhsf wjhsf requested a review from ekashida October 9, 2024 19:04
@wjhsf wjhsf requested a review from a team as a code owner October 9, 2024 19:04
Base automatically changed from wjh/ssr-for-of to master October 11, 2024 20:02
@wjhsf wjhsf enabled auto-merge (squash) October 11, 2024 20:03
@wjhsf wjhsf merged commit 849d5ca into master Oct 11, 2024
11 checks passed
@wjhsf wjhsf deleted the wjh/ssr-lwc-if branch October 11, 2024 20:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants