nuclear icon indicating copy to clipboard operation
nuclear copied to clipboard

Add Filtering to the favorites lists

Open JoshTRN opened this issue 3 years ago • 10 comments

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.)

JoshTRN avatar Feb 08 '22 23:02 JoshTRN

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.

nukeop avatar Feb 08 '22 23:02 nukeop

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.

Are you saying you want to make the favorite albums go from looking like this: image

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

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?

JoshTRN avatar Feb 08 '22 23:02 JoshTRN

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.

nukeop avatar Feb 08 '22 23:02 nukeop

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.

JoshTRN avatar Feb 08 '22 23:02 JoshTRN

Ok, let's see a pull request and we'll take it from there.

nukeop avatar Feb 08 '22 23:02 nukeop

Man I cannot figure out these unit tests to save my life. Might have to wait on that PR.

JoshTRN avatar Feb 09 '22 01:02 JoshTRN

@nukeop Was it coded?

tauantcamargo avatar Oct 07 '22 17:10 tauantcamargo

It wasn't yet, do you want to take it?

nukeop avatar Oct 07 '22 18:10 nukeop

@nukeop yeah.. assign it to me

tauantcamargo avatar Oct 07 '22 18:10 tauantcamargo

Let me know how you're going to design the filter input when you think it over.

nukeop avatar Oct 07 '22 19:10 nukeop