iFixit / react-commerce

A work in progress prototype for iFixit e-commerce functionalities.
https://react-commerce.vercel.app
2 stars 0 forks source link

Show Update Cart Errors In Cart Drawer #2202

Closed danielcliu-ifixit closed 9 months ago

danielcliu-ifixit commented 9 months ago

Overview

We sometimes can have things error out when trying to update the cart. We would roll back the cart but not change anything, and not tell our user that anything wrong happened. Now we give some visual feedback that there was an error updating the cart in the cart drawer.

QA

When we have an error updating the cart (adding a bad product, product is out of inventory, etc) we now display an error message in the cart drawer. The error message is closable, and also disappears after an alloted time.

Also, the checkout errors also still display as expected.

Closes: https://github.com/iFixit/ifixit/issues/51213

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-commerce ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2024 10:18am
react-commerce-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2024 10:18am
ghost commented 9 months ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/iFixit/react-commerce/2202/e447f60b/84a3de58ae4ab33b449d33059641dd5351d32eca.svg)](https://app.codesee.io/r/reviews?pr=2202&src=https%3A%2F%2Fgithub.com%2FiFixit%2Freact-commerce) #### Legend CodeSee Map legend
github-actions[bot] commented 9 months ago

📦 Next.js Bundle Analysis for @ifixit/commerce-frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

danielcliu-ifixit commented 9 months ago

@dhmacs that is a cleaner implementation, thanks for the advice!

Closing in favor of using hte cart drawer context instead.