Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(ssr): implement fixes for known issues #5188

Merged
merged 9 commits into from
Feb 4, 2025
Merged

Conversation

divmain
Copy link
Collaborator

@divmain divmain commented Feb 3, 2025

Details

As we've rendered some internal components under the new SSR implementation, a handful of issues were identified. This PR introduces corresponding test cases and fixes.

Does this pull request introduce a breaking change?

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

Does this pull request introduce an observable change?

  • 🔬 Yes, it does include an observable change.

Further closes the gap between SSRv1 and SSRv2.

GUS work item

W-17740271

@divmain divmain requested a review from a team as a code owner February 3, 2025 23:59
@@ -9,5 +9,6 @@ export default class GetterClassList extends LightningElement {
classList.remove('b');

expect(this.getAttribute('class')).toBe('a c d-e');
expect(() => this.classList.length).not.toThrow();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
expect(() => this.classList.length).not.toThrow();
expect(this.classList.length).toBe(3);

We know what it should be, why not check that directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had that originally. Original SSR implementation returns undefined. When we retire @lwc/engine-server, we may want to revisit things like this.

@@ -0,0 +1,4 @@
<template>
Value: {foo.value}
<!-- Dude -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

dude, where's my car?

@@ -215,7 +215,13 @@ const visitors: Visitors = {
break;
}
},
Super(path, _state) {
Super(path, state) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this visitor also apply to super.method() calls in other methods?

@@ -215,7 +215,13 @@ const visitors: Visitors = {
break;
}
},
Super(path, _state) {
Super(path, state) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

aside: we should validate whether the other visitors need this guard #5189.

@wjhsf wjhsf merged commit 7dc34fc into master Feb 4, 2025
11 checks passed
@wjhsf wjhsf deleted the mob/fix-all-the-things branch February 4, 2025 17:50
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