Skip to content

fix(runtime): properly set parent classes in children scope #6237

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

Closed
wants to merge 4 commits into from

Conversation

christian-bromann
Copy link
Member

What is the current behavior?

When using renderToString to hydrate scoped web components, the "scoped" classes are not being applied correctly to the children of the host element.

Image

GitHub Issue Number: #6219

What is the new behavior?

When using renderToString with serializeShadowRoot: 'scoped', the children of the host element should properly have the sc-web-component-name class applied and all the defined styles that come with it.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Updated tests that were incorrectly corrected before.

Other information

n/a

@christian-bromann christian-bromann requested a review from a team as a code owner April 11, 2025 17:06
@Armand-Lluka
Copy link
Contributor

Thanks for the work on this and the performance issue. This seems to resolve the in the example I created, however I would like to test this out in a real-world application. Can you create a dev build for me if possible?

@johnjenkins
Copy link
Contributor

johnjenkins commented Apr 14, 2025

hey both - I think this PR should be closed in-favour of #6238
The old updateElementScopeIds / findScopeIds methods add regressions (i.e the tests :) ) where the scoped classes are over-zealously applied to everything.

@christian-bromann
Copy link
Member Author

Closing in favor of #6238

@christian-bromann christian-bromann deleted the cb/fix-scope-parent-classes branch April 14, 2025 15:03
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.

3 participants