lemeryfertitta / Climbdex

Search engine for training board climbs
https://climbdex.com
MIT License
37 stars 9 forks source link

Support filtering ticked climbs #20

Closed lemeryfertitta closed 5 months ago

lemeryfertitta commented 5 months ago

Branched from discussion in #16.

As is possible in the apps, it would be useful to be able to filter out climbs which you have already done. This is possible using both the sync and the logbook APIs, though the sync API would require some storage, which would greatly increase complexity.

One idea to do this without introducing storage of user data is to use the logbook API. The user could optionally provide a username and password on the board selection screen. Then a token can be fetched and stored in the query params when filtering. With a new filter to remove ticked climbs selected, the results API would fetch the users logbook, then remove those climbs from the fetched list.

gardaholm commented 5 months ago

Exactly, the 2nd version is what I was thinking about, to keep climbdex (still) as simple as possible. Haven't played too much with the API, but I thought (or hoped) it's possible to fetch the logged climbs just by querying the logbook with a valid username … to avoid a "login"

lemeryfertitta commented 5 months ago

The only way I have gotten the logbook API to work is with a token, see here.

But yeah, an optional username/password on the board selection screen to then allow for tick filtering seems like a pretty light and nice addition.

lemeryfertitta commented 5 months ago

FYI @gardaholm you can now log in and have your ticked climbs show up. I didn't include it in the filter options at the moment, wasn't entirely sure it was necessary since it should be pretty easy to see in the list. Let me know what you think, I'll play around with it as well next time I'm climbing on the board.

gardaholm commented 5 months ago

already stumbled upon the feature this morning when I checked the page. Works really nice and I find it pretty helpful. Don't think you need a separate filter for this. Will also give it a few sessions …