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

Isse #13: Sort item list by when to buy urgency #35

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bbland1
Copy link
Collaborator

@bbland1 bbland1 commented Sep 19, 2024

For an example of how to fill this template out, see this Pull Request.

Description

Adds a text indicator of the buying urgency status of an item to the right of the item and sorts the list based on the status. If an item is inactive it will be at the bottom of the list, overdue items will be at the top, and if any items have the same days until next purchase they will be additionally sorted alphabetically.

Related Issue

Closes #13

Acceptance Criteria

  • Items in the list are shown with an indicator that tells the user they should buy the item “soon”, “kind of soon”, or “not soon”; or that the item is “inactive”
    • This urgency indicator does not rely on only color
  • api/firestore.js exports a new comparePurchaseUrgency function with the following behaviors
    • sorts inactive items last, then
    • sorts items in ascending order of days until purchase, and
    • sorts items with the same days until purchase alphabetically
  • Extend the functionality of comparePurchaseUrgency to sort “overdue” items to the top of the list
  • Indicate in your UI when an item is overdue

Type of Changes

Type
💯 Enhancement
✨ New Feature

Updates

Before

Screenshot 2024-09-19 at 12 21 14 AM

After

Screenshot 2024-09-19 at 12 21 39 AM

Testing Steps / QA Criteria

  • Click the preview link for this PR
  • Sign in with your account
  • Click a list with item and navigate using the nav bar
  • Items already on list should be sorted based on urgency status
  • To see other status messages go to the firebase
  • Open the list and item you want to change
  • Change to various dates to see status change

@bbland1 bbland1 added enhancement New feature or request new feature labels Sep 19, 2024
Copy link

github-actions bot commented Sep 19, 2024

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

https://tcl-77-smart-shopping-list--pr35-bb-fz-sort-by-purcha-99ypueis.web.app

(expires Thu, 26 Sep 2024 04:47:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b77df24030dca7d8b6561cb24957d2273c5e9d72

@bbland1 bbland1 changed the title Bb fz/sort by purchase urgency Isse #13: Sort item list by when to buy urgency Sep 19, 2024
@bbland1 bbland1 marked this pull request as ready for review September 19, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
None yet
2 participants