-
Notifications
You must be signed in to change notification settings - Fork 1
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 #13: Sort Items by Purchase Urgency #30
Conversation
export function comparePurchaseUrgency dates.js: update param name and logic to handle future and past dates List.jsx: import comparePurchaseUrgency
Visit the preview URL for this PR (updated for commit 8279ed4): https://tcl-74-smart-shopping-list--pr30-dtp-nr-sorting-d0os35i8.web.app (expires Sat, 28 Sep 2024 16:15:01 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 79d73546692f99aad8468c28e36db434e2c190ac |
filter shopping list to separate out past purchase dates and pending purchase dates into two lists append the lists to eachother so overdue dates come first
…ping list items based on urgency Categories are: inactive, overdue, and future. Overdue items appear first, followed by future dates, and finally inactive items.
…locate comparePurchaseUrgency to dates.jsx
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.
I tested it, and everything is functioning as expected. The urgency indicator works well, and updates the items purchase urgency time smoothly- great job guy! 🎉
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.
@NickRoccodev11 @dterceroparker Great work! The functionality is excellent. For the UI, perhaps we could revisit the color choices that may work for both dark and light modes to improve visibility, especially in the lighter mode. We could consider creating an issue to address this in the future.
@@ -10,7 +10,7 @@ import { | |||
} from 'firebase/firestore'; | |||
import { useEffect, useState } from 'react'; | |||
import { db } from './config'; | |||
import { getFutureDate, getDaysBetweenDates } from '../utils'; | |||
import { getFutureDate, calculateDaysDifferenceFromNow } from '../utils'; |
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.
Nice update from office hours! 👍
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. Looks good! 🥳 Great work y'all, this was a tough one.
+1 to @shuveksha-tuladhar's comment about color contrast. Here's a tool you can use to check the contrast ratio between two colors: https://colorkit.co/contrast-checker/
Also some web browser dev tools have a way you can inspect an element's color to see what the contrast ratio is. Here's what it looks like in Firefox:
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.
Good work you all! This one was a tough one to end on. I just had a few comments but otherwise it looks great, and you did a great job pulling functions into utils and commenting out what your code is doing.
Thank you, @shuveksha-tuladhar and @meganesu! We used dark mode and we overlooked testing in light mode. I appreciate the resource you shared, Megan. I'll keep both modes in mind for future testing. |
Description
This feature sorts shopping list items by urgency to help users plan their purchases. Items are grouped into:
Changes
Related Issue
Closes #13
Acceptance Criteria
Type of Changes
Enhancement
Feature
Accessibility
Updates
After
Testing Steps / QA Criteria