so that I can easily view entries that match specific criteria, aiding in analysis or tracking specific emotional patterns.
Description
Acceptance criteria
There is a overview page displaying recent emotions entries listed by date from new to old entries.
On that page is a search bar which gives the option to filter through all recorded entries based on specific criteria (e.g. date, emotion, tension level etc.)
After applying the filter(s), only the entries that match the selected criteria are displayed in the list.
The list updates in real time upon applying or changing the filters, reflecting the entries that match the selected criteria.
Tasks
[ ] Create and switch to the feature branch feature/filter-emotion-records
[ ] Create a new Component searchBar which renders a form. It updates onChange a useState variable (respectively the searchTerm) to have a controlled input. Render searchForm on pages/emotion-records.js
[ ] Add a logic that filters through all existing emotion entries and takes the searchTerm as argument. The function accepts words as well as numbers. Consider using a library such as Fuse.js
[ ] Add logic so that the EmotionRecordsList.js component renders entries depending on searchTerm. On default (empty search value) all entries are shown
[ ] In the input field of searchBar there is self explanatory placeholder such as "Search.... (date, emotion, tension level)" as well as a suitable label
Filter Emotions
Value Proposition
As a user
I want to filter recorded emotions,
so that I can easily view entries that match specific criteria, aiding in analysis or tracking specific emotional patterns.
Description
Acceptance criteria
Tasks
feature/filter-emotion-records
searchBar
which renders aform
. It updatesonChange
auseState
variable (respectively the searchTerm) to have a controlled input. RendersearchForm
onpages/emotion-records.js
Fuse.js
EmotionRecordsList.js
component renders entries depending on searchTerm. On default (empty search value) all entries are showninput
field ofsearchBar
there is self explanatoryplaceholder
such as "Search.... (date, emotion, tension level)" as well as a suitablelabel