nuclear
nuclear copied to clipboard
Add Filtering to the favorites lists
Hello.
I think there should be a filtering option on all of the favorites sections just like in the local library. I'd be happy to put in a pull request to do the work, but the docs said I should discuss it here first, so this is me opening the discussion.
(I already kinda did the work because I wanted to see what it would look like. Now, if you guys give the approval, I might need some help updating the snapshots as I've never used lerna before and some of this stuff is foreign to me even after reading the jest docs.)
Sure, but I'd rather first upgrade the favorites to use a track table (the one that is currently used in album view and playlist view), then add an optional filter field to that table, so we can reuse it elsewhere. We could do it as a part of one pull request.
To update snapshots, you just run jest -u and check if what's rendered matches your expectations.
Sure, but I'd rather first upgrade the favorites to use a track table (the one that is currently used in album view and playlist view), then add an optional filter field to that table, so we can reuse it elsewhere. We could do it as a part of one pull request.
To update snapshots, you just run
jest -uand check if what's rendered matches your expectations.
Are you saying you want to make the favorite albums go from looking like this:

to looking like this where each album takes up a row:

You know, I'm not sure how the tests are running, but I don't have jest installed globally, so it's not clear to me how that's working. Should I just install it globally to run these jest commands?
I was thinking about favorite tracks. Favorite albums should stay as they are now. Did you add the filter to the favorite albums view?
You don't have to install jest globally, it should be installed along with all the project dependencies in node_modules. You can use the locally installed version by running npx jest. So to update the snapshots in the app package, go to packages/app, then run npx jest -u in that folder.
I did. I wanted it there also because I added a bunch of albums and was just like I just wanna filter it down. I added it to favorite tracks, favorite artists and favorite albums.
Ok, let's see a pull request and we'll take it from there.
Man I cannot figure out these unit tests to save my life. Might have to wait on that PR.
@nukeop Was it coded?
It wasn't yet, do you want to take it?
@nukeop yeah.. assign it to me
Let me know how you're going to design the filter input when you think it over.