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

fix: fix synthetic lifecycle for mixed API versions and non-portals #4243

Merged
merged 3 commits into from
May 30, 2024

Conversation

nolanlawson
Copy link
Collaborator

Details

Fixes #4242.

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.

In dev mode, synthetic lifecycle will actually work for lazy components inside of non-portals now.

GUS work item

W-15812405

@nolanlawson nolanlawson requested a review from a team as a code owner May 30, 2024 19:53
// See issue #4242 for details.
monkeyPatchDomAPIs();
}

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'm not totally happy with this solution, but I couldn't come up with something better for now. Perhaps in the future we can figure out a better way to have the engine-dom monkey-patches handoff to the engine-core monkey-patches.

On the bright side, this only affects dev mode.

},
};

const plugins = [customLwcRollupPlugin];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We probably should have had something like this from the get-go; we need a way to test components with mixed API versions.

await Promise.resolve();

// It should render even though it's inserted manually
expect(extractDataIds(apiVersion60Elm).h1.textContent).toEqual('API version 60!');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fails without the fix, and it only fails in dev mode.

@nolanlawson nolanlawson merged commit 3b22a74 into master May 30, 2024
10 checks passed
@nolanlawson nolanlawson deleted the nolan/fix-api-60-issue branch May 30, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants