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

Issue #12: Delete Items from Shopping List #31

Merged
merged 3 commits into from
Sep 21, 2024
Merged

Issue #12: Delete Items from Shopping List #31

merged 3 commits into from
Sep 21, 2024

Conversation

stacy-tech
Copy link
Contributor

Description

This PR allows users to delete items from their shopping list.

Related Issue

Acceptance Criteria

  • The ListItem component renders a button that allows the user to delete an item from their list when clicked.
  • Clicking the delete button prompts the user to confirm that they really want to delete the item.
  • The deleteItem function in api/firebase.js has been filled out, and deletes the item from the Firestore database.

Type of Changes

Updates

Before

image_720

After

image_720

image_720-1

image_720-2

Testing Steps / QA Criteria

  • Sign In to app using email account.
  • Click on a list and navigate to List page.
  • Click on the Delete button for the item you would like to delete.
  • A confirmation dialog box appears to confirm item to be deleted.
  • Click on OK to confirm.
  • A successful deletion message appears.

Copy link

github-actions bot commented Sep 18, 2024

Visit the preview URL for this PR (updated for commit c67fe33):

https://tcl-74-smart-shopping-list--pr31-st-sd-12-jeqqigim.web.app

(expires Thu, 26 Sep 2024 23:25:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 79d73546692f99aad8468c28e36db434e2c190ac

Copy link
Collaborator

@NickRoccodev11 NickRoccodev11 left a comment

Choose a reason for hiding this comment

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

Very Nice, Works great, and I like the dynamic aria label as well!

Copy link
Member

@dterceroparker dterceroparker left a comment

Choose a reason for hiding this comment

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

Great work! I tested it and it works well on my end 🌻

Copy link
Collaborator

@jtkabenni jtkabenni left a comment

Choose a reason for hiding this comment

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

Hey team, looks good but it would be a good idea while testing to also test some of the other flows that happen on this page. So I marked an item as purchased, and also searched for items in the search bar and the success message remained, which was a little strange.

  1. I deleted an item, then marked another as purchased, but the deleted message remained. If you are creating a success message for one action, I would consider making sure the behavior is the same for the other.
Screenshot 2024-09-18 at 11 51 25 PM 2. If I search for something, the delete message remains. Screenshot 2024-09-18 at 11 51 41 PM

Something you can consider is having the message time out after a few seconds, but just making sure the message reflects the most recent action is a good place to start.

@shuveksha-tuladhar
Copy link
Collaborator

Thank you @jtkabenni, for the suggestions. The code has been refactored to remove the message after 5 seconds and the message also gets removed when anything is typed on search items. Thank you.

@stacy-tech stacy-tech merged commit a0a270f into main Sep 21, 2024
2 checks passed
@stacy-tech stacy-tech deleted the st-sd-12 branch September 21, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility enhancement New feature or request
Projects
None yet
5 participants