Skip to content

fix(runtime): SSR class handling breaks normal class handling#6116

Merged
christian-bromann merged 43 commits intostenciljs:mainfrom
johnjenkins:fix-set-accessor
Jan 25, 2025
Merged

fix(runtime): SSR class handling breaks normal class handling#6116
christian-bromann merged 43 commits intostenciljs:mainfrom
johnjenkins:fix-set-accessor

Conversation

@johnjenkins
Copy link
Copy Markdown
Contributor

@johnjenkins johnjenkins commented Jan 23, 2025

What is the current behavior?

#6082 caused a regression.

SSR logic, handling classes during the initial render / hydration of nodes would run all the time which would sometimes fail (#6115) and other times leave classes behind (#6114)

What is the new behavior?

SSR logic relating to classes during hydration now only runs if a) SSR hydration is a feature of the build & b) the component is being rendered for the first time.

Fixes: #6115
Fixes: #6114

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

  • New unit test
  • 2 new wdio tests which cover both of the linked issues to stop regressions

Other information

johnjenkins and others added 30 commits July 19, 2021 14:37
- upgrade prettier to v2.3.2
  - lock version to prevent breaking changes in minor versions
- add prettier.dry-run package.json script
- add pipeline action to evaluate format status
- add prettierignore file for faster runs

STENCIL-8: Add Prettier to Stencil
# Conflicts:
#	.prettierignore
#	package-lock.json
#	package.json
#	scripts/license.ts
#	scripts/release-tasks.ts
#	scripts/release.ts
#	scripts/utils/release-utils.ts
#	src/client/client-load-module.ts
#	src/hydrate/platform/proxy-host-element.ts
#	src/sys/node/node-sys.ts
#	test/browser-compile/src/utils/css-template-plugin.ts
#	test/karma/stencil.config.ts
#	test/karma/test-app/util.ts
# Conflicts:
#	src/hydrate/platform/proxy-host-element.ts
@johnjenkins johnjenkins requested a review from a team as a code owner January 23, 2025 23:03
@johnjenkins johnjenkins changed the title fix(runtime): SSR handling breaks normal class handling fix(runtime): SSR class handling breaks normal class handling Jan 23, 2025
Copy link
Copy Markdown
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@christian-bromann christian-bromann merged commit 1e8a2d2 into stenciljs:main Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants