kale-stew / climb-log

Hiking blog and climbing log. Built with Next.js, data sourced from a Notion.so database.
https://kylies.photos
11 stars 0 forks source link

🎛 Improve peak-list range toggles #92

Closed kale-stew closed 2 years ago

kale-stew commented 2 years ago

When you click on a range, it will now unselect if selected

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/kale-stew/climb-log/2yhxdsBrjAie5o2g6jiC752TEhYH
✅ Preview: https://climb-log-git-task-improve-range-toggle-kale-stew.vercel.app

kale-stew commented 2 years ago

One corner case needs to be addressed: if a user unselects filters to the point that it goes back to 'All Ranges' (selectedFilters.length === 0), the data doesn't get reset. We can abstract the current cleanup fn to an agnostic one and then trigger it for each of these cases, but waiting to do that so we can push the improved legibility first