-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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(platform-browser): reuse server generated component styles #48253
Conversation
14eea7b
to
5340146
Compare
ca1ca9b
to
c1b61a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alan-agius4 thanks for the PR 👍
The approach looks promising, I've just left a few minor comments/questions.
c1b61a5
to
a73124b
Compare
29c2b40
to
fee45a5
Compare
f4b0d52
to
b9cde15
Compare
f9f5092
to
3533a29
Compare
Prior to this change the component IDs where generated based on a counter. This is problematic as there is no guarantee that a component will get the same ID that was assigned on the server when generated on the client side. This is paramount to be able to re-use the component styles generated on the server.
Prior to this change component styles generated on the server where removed prior to the client side component being rendered and attached it's own styles. In some cases this caused flickering. To mitigate this `initialNavigation: enabledBlocking'` was introduced which allowed the remove of server styles to be defer to a latter stage when the application has finished initialization. This commit changes the need for this, by not removing the server generated component styles and reuse them for client side rendering.
This was a mirror copy of the `APP_ID` token.
5acdb8e
to
3b536f4
Compare
3b536f4
to
addb66c
Compare
addb66c
to
a80caae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alan-agius4 looks great, thanks for working on this change! 👍
(adding the "merge" label after an LGTM from @alan-agius4) |
This PR was merged into the repository by commit 86fc4d3. |
Prior to this change component styles generated on the server where removed prior to the client side component being rendered and attached it's own styles. In some cases this caused flickering. To mitigate this `initialNavigation: enabledBlocking'` was introduced which allowed the remove of server styles to be defer to a latter stage when the application has finished initialization. This commit changes the need for this, by not removing the server generated component styles and reuse them for client side rendering. PR Close #48253
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
fix(core): generate consistent component IDs
Prior to this change the component IDs where generated based on a counter. This is problematic as there is no guarantee that a component will get the same ID that was assigned on the server when generated on the client side.
This is paramount to be able to re-use the component styles generated on the server.
fix(platform-browser): reuse server generated component styles
Prior to this change component styles generated on the server where removed prior to the client side component being rendered and attached it's own styles. In some cases this caused flickering. To mitigate this
initialNavigation: enabledBlocking'
was introduced which allowed the remove of server styles to be defer to a latter stage when the application has finished initialization.This commit changes the need for this, by not removing the server generated component styles and reuse them for client side rendering.
refactor(platform-browser): remove internal
TRANSITION_ID
tokenThis was a mirror copy of the
APP_ID
token.