tohuwabohu-io / librefit

OpenSource calorie tracker using kotlin, quarkus, postgresql, SvelteKit and OpenAPI 3
https://libre.fit/
GNU General Public License v3.0
1 stars 0 forks source link

Calorie Tracker filtering #97

Closed tohuwabohu-io closed 2 weeks ago

tohuwabohu-io commented 1 month ago

Is your feature request related to a problem? Please describe. When opening the history, all dates are displayed at once. There should be a filter or pagination in place.

Describe the solution you'd like A filter where I can search for both a date range and one specific date.

Describe alternatives you've considered I thought about a simple selection like in the Weight Tracker historic visualization with Week - Month - Year but I figure that'd be impractical to use. You wouldn't be able to access data more than one year in the past.

tohuwabohu-io commented 1 month ago

I ended up doing both a Pagination and a filter. The page size can be set to 1, 7, 14 or 31 entries without a "first" or "last" option. The filer can be set to "last 7 days", "last 31 days" or a specific date range.

The paging happens client-side and affects the date display only. The entries themselves will be loaded when their accordion opens.