navarog / wingsearch

Search throughout the Wingspan card collection
https://navarog.github.io/wingsearch/
GNU General Public License v3.0
49 stars 21 forks source link

Add filter to exclude food types #55

Closed vHeemstra closed 9 months ago

vHeemstra commented 10 months ago

First off: great tool! Thank you!

My suggestion is for an extra row of food icons that can be selected to exclude birds having those foods.

So, for example you would select fruit as food (current filter) and invertebrate in this new filter to keep all birds that have fruit as food, but not any invertebrate additional or alternate food.

navarog commented 10 months ago

I am glad you like the tool! I think the feature is interesting, but the second row of food icons would be too confusing. Instead, I would use the existing food icons in the following way:

  1. if you click on a food icon for the first time, it filters the cards that include the specific food,
  2. if you click on the same food icon for the second time, it filters the cards that exclude the specific food,
  3. if you click on the same food icon for the third time, it resets back to normal, deactivates the filter

Right now, I do not have the capacity to make the change, I can get to it hopefully by the end of February, but if you'd like to implement it yourself even better! There is a CONTRIBUTING.md guide that should help you set the project up.

vHeemstra commented 10 months ago

I have created a PR with the additional feature. Since I'm not familiar with Angular, feel free to check if I missed anything.

NB: I have not added a test. But I also could not find the other tests. (I probably overlooked them somewhere..)

navarog commented 9 months ago

Amazing! Sorry for the delay in merging it; you work way too fast. Also, great job with the way it is handled visually. (And there are no tests but that is purely my laziness)