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

Fixed #901 #1230

Merged
merged 9 commits into from
Jun 6, 2019
Merged

Conversation

pradeep-cedcoss
Copy link
Contributor

Fixed #901 Cart flashes/reloads twice when last cart item is removed.

Description:
Add product to cart and click on Remove Item link > Cart flashes (Shows "There are no item in your cart" now displays Loading spinner and back to ""There are no item in your cart"" )

Steps to reproduce the behavior:

Go to Venia storefront and add a product to cart.
Now click on Remove Item option present under more options (3 vertical dots).
Expected behavior:
Shopping Cart right drawer should be displayed with "There are no items in your shopping cart" message with Continue shopping button.

Actual:
Shopping Cart right drawer displays message then shows loading icon and displays message. This behavior needs to be changed.

Checklist:

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

Fixed magento#901 Cart flashes/reloads twice when last cart item is removed.
@vercel
Copy link

vercel bot commented May 9, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://venia-git-fork-pradeep-cedcoss-pradeep-pwa-901-new.magento-research1.now.sh

Copy link
Contributor

@tjwiebell tjwiebell left a comment

Choose a reason for hiding this comment

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

Change functions perfectly, just have some minor suggestions for readability.

packages/venia-concept/src/actions/cart/asyncActions.js Outdated Show resolved Hide resolved
packages/venia-concept/src/actions/cart/asyncActions.js Outdated Show resolved Hide resolved
packages/venia-concept/src/actions/cart/asyncActions.js Outdated Show resolved Hide resolved
@tjwiebell tjwiebell dismissed their stale review June 4, 2019 16:36

Addressed my own feedback, re-assigning review

@tjwiebell tjwiebell assigned supernova-at and unassigned tjwiebell Jun 4, 2019
supernova-at
supernova-at previously approved these changes Jun 4, 2019
Copy link
Contributor

@supernova-at supernova-at left a comment

Choose a reason for hiding this comment

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

This makes sense to me and works fine.

The only thing I can think of is last time we did something like this we were worried about the cart being updated from a separate tab and we purposefully wanted to refresh so that we could get that update.

After thinking it through I don't think that applies here. Let me know if you think otherwise.

@dpatil-magento
Copy link
Contributor

dpatil-magento commented Jun 4, 2019

@tjwiebell @supernova-at I remove last item from cart > Close right panel> click back on cart icon. First empty cart is shown then reload then back to empty cart. Should it be just reload and then show empty cart?
BTW, I re-run AWS pwa-pull-request-build and it passed, ran build locally too it works, so the failure might just be an odd one.

@tjwiebell
Copy link
Contributor

@tjwiebell @supernova-at I remove last item from cart > Close right panel> click back on cart icon. First empty cart is shown then reload then back to empty cart. Should it be just reload and then show empty cart?
BTW, I re-run AWS pwa-pull-request-build and it passed, ran build locally too it works, so the failure might just be an odd one.

The initial render, then loading indicator, then re-render seems like a regression to me, I'll look into it.

@dpatil-magento
Copy link
Contributor

@supernova-at QA Pass, Please review latest commit and merge.

@supernova-at supernova-at merged commit b918530 into magento:develop Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cart flashes/reloads twice when last cart item is removed.
4 participants