fix(platform-browser): reuse server generated component styles#48253
fix(platform-browser): reuse server generated component styles#48253alan-agius4 wants to merge 8 commits intoangular:mainfrom
Conversation
14eea7b to
5340146
Compare
ca1ca9b to
c1b61a5
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
@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
c14ccad to
1a83fb9
Compare
|
After additional research, it turned out that styles might have source maps on a server, thus causing a discrepancy: Thanks @yharaskrik for the help with troubleshooting! 👍 |
d007c01 to
76c5ae3
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.
AndrewKushnir
left a comment
There was a problem hiding this comment.
@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. |
|
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_IDtokenThis was a mirror copy of the
APP_IDtoken.