Closed cosmolightfoot closed 4 years ago
Great refactoring here. I tested locally and it appears to be working great. There's just a couple of small changes I recommended above after which this will be good to merge 👍
My software spidey senses are kicking in though and saying this code is still probably more complicated than it needs to be. That's being triggered by the amount of looping which I don't think should be necessary. So if you are interested in doing a rethink / refactor session at some point let me know and I'd be down, but if you're feeling done with this feature, that's totally fine too. Regardless, we should merge this after those final fixes I recommended as it does improve the code and do the thing it's supposed to!
Fixed the filtering behavior to include OR logic within a filtering category, and AND logic between filtering categories. The level of filtration complexity jumped dramatically between a flat array of tags and comparing a nested object of tags. I tried my best to avoid unnecessary iterating but I would appreciate some feedback on my approach. I get the feeling that the CardList.js file is getting a little heavy / difficult to read.