-
Notifications
You must be signed in to change notification settings - Fork 1
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
[EP-2447] Preserve cart order after edit #1081
Conversation
09b325c
to
12a157c
Compare
Code looks good, but I'd like to postpone until after peak giving. |
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.
Your code looks great! 💯 🔥
One place I can see we can improve is by adding skeletons to the Images in the cart, when the cart items refresh. Currently, after an item is edited or removed the images get reloaded, causing the item's titles to have layout shift to the left.
If we added a skeleton it would show the user the items are refreshing and it would stop the layout shift.
This might be a separate PR, but it could be grouped with this one.
@dr-bizz I explicitly set the image dimensions to avoid layout shift. For the record, I only see the layout shift with DevTools open and "Disable cache" checked. Thanks to caching of the images, I don't think that users are experiencing that layout shift. |
Closing the dev tools seems to ensure it no longer has layout shifts. Thanks |
37df5e2
to
bc07bb4
Compare
Preserve the order of items in the cart after changing one. I'm not sure why the previous code was removing the edited item from the UI, so I removed it. The changed item with the old amount will remain in the list briefly, but the loading indicators will be active until the list refreshes, so I believe that is OK.
Tested in staging ✅
https://jira.cru.org/browse/EP-2447