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: display of duplicated headers for special logins with activated hydration #1585

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented Feb 5, 2024

PR Type

[x] Bugfix

What Is the Current Behavior?

When loggin in with /cobrowse or /punchout two headers are rendered for a short time. The simple header of the loading page and the standard header once the user was logged in. After a second the simple header will disappear and everything looks as expected.
This is only visible with Server Side Rendering and the newly introduced hydration of Angular 16 (https://angular.io/guide/hydration).

What Is the New Behavior?

Switching from the usage of ngSwitch to ngIf for selecting the different headers solved the rendering problem for the login header combinations, even though the HTML source code does not look better this way. :(

An alternative could have been to disable the hydration for the header.

<ish-header ngSkipHydration />

But this would also mean to loose these improvements for the header.

Does this PR Introduce a Breaking Change?

[x] No

Other Information

AB#93543

…hydration

* when loggin in with cobrowse or punchout two headers where rendered for a short time
* (the simple header of the loading page and the standard header once the user was logged in)
* the hydration introduced with Angular 16 introduced this issue
* switching from the usage of ngSwitch to ngIf solved the rendering problem
@shauke shauke requested a review from SGrueber February 5, 2024 10:38
@shauke shauke self-assigned this Feb 5, 2024
@shauke shauke added this to the 5.1 milestone Feb 5, 2024
@shauke shauke added the bug Something isn't working label Feb 5, 2024
@shauke shauke requested a review from SGrueber February 6, 2024 16:37
SGrueber
SGrueber previously approved these changes Feb 7, 2024
…eader types

BREAKING CHANGES: Changed header rendering and introduced header type (see [Migrations / From 5.0 to 5.1](https://github.com/intershop/intershop-pwa/blob/develop/docs/guides/migrations.md#from-50-to-51) for more details).
@shauke shauke force-pushed the bugfix/duplicated_headers_hydration branch from 18a42b2 to 9a4faed Compare February 9, 2024 12:55
@shauke shauke merged commit 75bf2d2 into develop Feb 9, 2024
7 checks passed
@shauke shauke deleted the bugfix/duplicated_headers_hydration branch February 9, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants