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: track item changes as local state in checkout facade #702

Merged
merged 1 commit into from
May 19, 2021

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented May 17, 2021

PR Type

[x] Bugfix

What Is the Current Behavior?

Issue Number: Closes #668

What Is the New Behavior?

fixed 😁👍

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

@dhhyi dhhyi requested review from Eisie96 and shauke May 17, 2021 19:54
whenTruthy(),
distinctUntilChanged(),
switchMap(() => this.basketLoading$.pipe(debounceTime(500), whenFalsy())),
shareReplay(1)
Copy link
Collaborator Author

@dhhyi dhhyi May 17, 2021

Choose a reason for hiding this comment

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

shareReplay is not a solution here, because the header is re-initialized via AppFacade.headerType$ when leaving the checkout. We need a "global" Observable that only emits when new changes happen. Using only NgRx is also not a good solution as all subscriptions emit the last value and working with skip(1) on subscribe is masking quite a lot (also not working btw). The only probable solution might really be local state in the facade...

cc @shauke @Eisie96 @fmalcher

@shauke shauke added the bug Something isn't working label May 18, 2021
@shauke shauke added this to the 0.31 milestone May 18, 2021
@shauke shauke merged commit 8600213 into develop May 19, 2021
@shauke shauke deleted the fix/mini-cart-popup-when-leaving-checkout branch May 19, 2021 11:38
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.

bug: mini cart opens if the user navigates from checkout to the home page
3 participants