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

Comprehensive refactor of functions dealing with dates and tests reduction #40

Merged
merged 7 commits into from May 24, 2023

Conversation

yiremorlans
Copy link
Collaborator

Description

The changes address the removal of duplicate date calculating functions. After the refactoring of the tests, I opted to remove the functions altogether to make the code dry. There was a dependency on those functions to sort the items on the list and so a lot of refactoring was done to minimize the amount of different functions being used in the application. Also removed the purchase urgency label for "Not yet purchased" since it was not being utilized in our app.

Related Issue

closes #39

Acceptance Criteria

  • The legend will have only four labels: Soon, Kinda Soon, Not Soon, and Inactive.
  • Address the bug that is causing newly added "Not Soon" items to be grouped with the "Kinda Soon" category.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

Updates

Before

Screenshot 2023-05-23 at 2 46 59 PM

After

Screenshot 2023-05-23 at 2 46 02 PM

Testing Steps / QA Criteria

npm run test will run all the tests for date calculating and sorting functions. The current refactor for getDaysBetweenDates caused errors in the tests because it was not inclusive of the present date and now it is.

@github-actions
Copy link

github-actions bot commented May 23, 2023

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

https://tcl-56-smart-shopping-li-ffe7d--pr40-ym-dates-refactor-ybt74wg9.web.app

(expires Wed, 31 May 2023 15:05:50 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9c51cec5927ae3f1253a2134be95c1a07393f9a7

@yiremorlans yiremorlans merged commit fe6136e into main May 24, 2023
2 checks passed
@yiremorlans yiremorlans deleted the ym-dates-refactor branch May 24, 2023 15:08
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.

As a user, I want an accurate and more concise representation of the labels signaling the purchase urgency
2 participants