-
Notifications
You must be signed in to change notification settings - Fork 0
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 #9 : mark an item on shopping list as purchased and implement 24HR expiration for repurchasing. #25
Conversation
Visit the preview URL for this PR (updated for commit daf7bd9): https://tcl-74-smart-shopping-list--pr25-dtp-st-9-junqk0w9.web.app (expires Sat, 14 Sep 2024 15:27:09 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 79d73546692f99aad8468c28e36db434e2c190ac |
…ases properties on the database
…ay item unchecks iteself. add useEffect function for mounting and dependency change
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.
Very nice job- an impressive amount of changes made, and it all works! (cannot confirm that the box is unchecked after 24 hours, but I will let you know if it isn't)
just a few things to consider:
- After you purchase an item, you can still click on it, and you get the prompt "do you want to purchase this item?" It might not actually change the purchase time in the DB, but it might be nice to disable the ability to click on an item after purchasing.
- While the useEffect should work just fine for checking item updates, It might be more efficient to rely on the Event Listeners built into firebase, like the one we are using to update the lists every time you add an item. You spent far more time considering this, so maybe there's a reason that doesn't work- but just putting it out there. Again, great work!
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.
Great job Ladies! ... Would have to agree, that disabling the ability to click on an item marked purchased sounds like a great idea. I retested and found that the database was updated twice with the same item after it was marked as purchased. Overall, awesome work!!
Thank you so much, @stacy-tech and @NickRoccodev11! We implemented a disable toggle logic in Toggle.jsx and ListItem.jsx. Thank you for catching this :) |
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.
Tested in the deploy preview, and everything's looking good! This was a tough one, y'all did great!
Left some minor suggestions, but since it's so late in the week (apologies!), feel free to open a new issue with anything you'd rather save until later to address.
Description
This pull request introduces a new feature that allows users to mark items as purchased on their shopping list. The feature is designed to help users track purchased items with a 24-hour interval, enhancing the user experience in managing their shopping history.
Database Changes
UI Enhancements
Related Issue
Closes #9
Acceptance Criteria
Type of Changes
Enhancement
Updates
Before
After
Testing Steps / QA Criteria