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

Feat: Delete lists #53

Merged
merged 5 commits into from
Oct 12, 2024
Merged

Conversation

Wyna-7
Copy link
Collaborator

@Wyna-7 Wyna-7 commented Oct 11, 2024

Description

Users can now delete lists from the home page. They are only allowed to delete lists they have created themselves, the button is disabled for lists that have been shared with the logged user.
Deleting a list removes the corresponding document in the user's collecton, and the reference to it in the sharedLists field array.

Related Issue

Closes #36

Acceptance Criteria

  • The delete button is active for user created lists, and inactive for shared ones.
  • When clicked, the delete button immediately removes the list from Your Lists.
  • After a list is deleted, it disappears from the user collection and from the sharedLists field array.

Type of Changes

feat

Updates

Before

Pretty much the same.

After

Disabled button is now grey.
image

No list selected
image

Testing Steps / QA Criteria

  • Do a git pull and then git checkout qg-feat-delete-list
  • Run npm start to open GrocerEase
  • Create a few test lists, then click their delete buttons to delete them.
  • After deletion, the lists should be gone from both your user collection and your sharedLists array.
  • If you delete the list that you had selected, navigating to the Lists page should show the no list selected text.

Copy link

github-actions bot commented Oct 11, 2024

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

https://tcl-79-smart-shopping-list--pr53-qg-feat-delete-list-n4wzcj53.web.app

(expires Sat, 19 Oct 2024 18:39:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d91d9ddbda780208241c52942f544acf8e81407a

@joriordan332 joriordan332 self-requested a review October 12, 2024 12:06
Copy link
Collaborator

@joriordan332 joriordan332 left a comment

Choose a reason for hiding this comment

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

This is a brilliant feature! Well done

Copy link
Collaborator

@Hudamabkhoot Hudamabkhoot left a comment

Choose a reason for hiding this comment

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

Well done @Wyna-7 really that was a tough one! 🙌 just one thing i think adding an alert dialog to check with the user before deleting a list would be good.

@marshjaja
Copy link
Collaborator

Well done @Wyna-7!🤾🏾‍♀️ Yeah I agree with Huda, to add a prompt if the user is really sure they want to delete that list

Copy link
Collaborator

@Hudamabkhoot Hudamabkhoot 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 👏 just one thing make sure the delete dialog color scheme match the list page one before merging.

@Wyna-7 Wyna-7 merged commit 83c0428 into feat/setup-tailwind-shadcn Oct 12, 2024
2 checks passed
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.

4 participants