the-collab-lab / tcl-74-smart-shopping-list

1 stars 0 forks source link

Issue 7: search and filter items in shopping list #23

Closed NickRoccodev11 closed 1 month ago

NickRoccodev11 commented 1 month ago

Description

This PR adds two functionalities to locate items:

Related Issue

closes #7

Acceptance Criteria

Type of Changes

Type
:sparkles: Enhancement
:link: Accessibility

Updates

Before

https://github.com/user-attachments/assets/2e303632-8dc4-429f-a714-65e521876c9e

After

https://github.com/user-attachments/assets/aa67e1c4-92bd-4824-9789-572d11e8310b

Testing Steps / QA Criteria

github-actions[bot] commented 1 month ago

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

https://tcl-74-smart-shopping-list--pr23-dtp-nr-listfiltersea-wkjzss3b.web.app

(expires Fri, 06 Sep 2024 15:14:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 79d73546692f99aad8468c28e36db434e2c190ac

NickRoccodev11 commented 1 month ago

Looks great! Your filtering logic here is perfectly fine but one thing that can be considered is to bring out the filtering into a separate function, and then in the jsx just mapping over the filtered list. A few reasons this may be considered - 1. currently filtering will run every time the component is rendered and 2. bringing out the function may make things more testable and reusable! Your logic here is simple so this may be unnecessary, but just something to think about.