Skip to content

fix: v2 hydration test failures#5227

Merged
jhefferman-sfdc merged 2 commits intomasterfrom
jhefferman/fix-hydration-errors
Feb 19, 2025
Merged

fix: v2 hydration test failures#5227
jhefferman-sfdc merged 2 commits intomasterfrom
jhefferman/fix-hydration-errors

Conversation

@jhefferman-sfdc
Copy link
Contributor

Details

Does this pull request introduce a breaking change?

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

Does this pull request introduce an observable change?

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

GUS work item

W-17856163

@jhefferman-sfdc jhefferman-sfdc requested a review from a team as a code owner February 19, 2025 15:26
@@ -1,3 +1,3 @@
<template>
<x-dynamic-cmp lwc:dynamic={Ctor} label={label}></x-dynamic-cmp>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lwc:dynamic is deprecated and intentionally not allowed in V2. Figured it was sufficient to swap this out for the correct directive?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah that's probably the right call. At the very least, we definitely want to have the new style, and old style is probably not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pathing is necessary here, thanks

Copy link
Contributor

@divmain divmain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one question; otherwise looks great.

original
</x-component>
</template>
</fixture-test> No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any differences between expected.html and expected-ssr.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right, the pathing is not needed for this case.

@@ -1,3 +1,3 @@
<template>
<x-dynamic-cmp lwc:dynamic={Ctor} label={label}></x-dynamic-cmp>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah that's probably the right call. At the very least, we definitely want to have the new style, and old style is probably not needed.

// Class should be set explicitly to avoid it being overridden by connectedCallback classList mutation.
if (attrs.class) {
this.className = attrs.class;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward fix! ❤️

@jhefferman-sfdc jhefferman-sfdc merged commit 7a761c4 into master Feb 19, 2025
11 checks passed
@jhefferman-sfdc jhefferman-sfdc deleted the jhefferman/fix-hydration-errors branch February 19, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants