This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Fix the flickering of the Proceed to Checkout button on quantity update in the Cart Block #4293
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
senadir
added
type: bug
The issue/PR concerns a confirmed bug.
block: cart
Issues related to the cart block.
labels
May 31, 2021
senadir
requested review from
ralucaStan and
Aljullu
and removed request for
a team
May 31, 2021 14:27
Size Change: -28 B (0%) Total Size: 985 kB
ℹ️ View Unchanged
|
Aljullu
approved these changes
Jun 1, 2021
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.
Works fine for me and having split the useEffect()
in two is great. 🚢
ralucaStan
changed the title
Fix flickering in checkout button when updating quantity in Cart.
Fix flickering of the Proceed to Checkout button when updating the quantity in the Cart Block
Jun 7, 2021
ralucaStan
changed the title
Fix flickering of the Proceed to Checkout button when updating the quantity in the Cart Block
Fix the flickering of the Proceed to Checkout button when updating the quantity in the Cart Block
Jun 7, 2021
ralucaStan
changed the title
Fix the flickering of the Proceed to Checkout button when updating the quantity in the Cart Block
Fix the flickering of the Proceed to Checkout button on quantity update in the Cart Block
Jun 7, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #3314 we introduced
previousIsPendingQuantity
andpreviousIsPendingDelete
to fix an issue with checkout button flickering on quantity changes.After refactoring it over time, the issue surfaced again, deleting the code added in that PR fixed the issue.
Currently, we set isCalculating to true if we have quantity pending in our store, or if we're deleting an item. The other new part of this PR is that we also set isCalculating in the debouncing period, this is to fix a delay between clicking update and the button is greyed out.
Fixes #4289
How to test the changes in this Pull Request:
Changelog