Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Favourite Tags #4617

Open
SpedNSFW opened this issue Feb 24, 2024 · 9 comments · Fixed by #4728
Open

[Feature] Favourite Tags #4617

SpedNSFW opened this issue Feb 24, 2024 · 9 comments · Fixed by #4728

Comments

@SpedNSFW
Copy link
Contributor

A feature I'd love to see is the ability to favourite tags. On the tags page, this would behave the same as it does for performers with a boolean filter option to select only favourites or exclude them.

For items that can be tagged (scenes, performers, etc.), the tag filter should continue to be sorted alphabetically but with the favourited tags on top.

For example, if I had tags: A, B, C, D, E, and F. Normally the tag filter would order them as such, however, if I had favourited the C and E tags, the order would now be C, E, A, B, D, F. Alternatively, the favourited tags could appear in the list twice; at the top and then again in their normal position, so using the previous example: C, E, A, B, C, D, E, F.

This would allow for a step between default behaviour and saved filters, allowing for easier mix-and-matching of a user's favourite tags.

@echo6ix
Copy link
Contributor

echo6ix commented Feb 25, 2024

Related to #3313

@elkorol
Copy link
Contributor

elkorol commented Feb 28, 2024

You can do half of that right now. Just not in the tag select areas

Just create a tag called Favourites and any favourite tag add this tag as a parent tag

Then on the tags page just to see your favourites make a saved filter for Parent Tags > Include All > Favourites. To see the top level of Favourites. If they are nested subtags of the tags that have favorites as a parent. Use the option "Include sub tags)

And filter for that in any other place you can too

@elkorol
Copy link
Contributor

elkorol commented Feb 28, 2024

But agree a boolean filter would be nice

@SpedNSFW
Copy link
Contributor Author

You can do half of that right now. Just not in the tag select areas

Just create a tag called Favourites and any favourite tag add this tag as a parent tag

Then on the tags page just to see your favourites make a saved filter for Parent Tags > Include All > Favourites. To see the top level of Favourites. If they are nested subtags of the tags that have favorites as a parent. Use the option "Include sub tags)

And filter for that in any other place you can too

I don't want all favourite tags at the same time, so that's not really valid. If you do want all your favourite tags added, then that would work, but it's not what I'm suggesting.

@Dankonite
Copy link
Contributor

Coming soon, I got the db working for it and the grid card favorite button added, just need to figure out the filter.
image

@SpedNSFW
Copy link
Contributor Author

SpedNSFW commented Mar 26, 2024

Coming soon, I got the db working for it and the grid card favorite button added, just need to figure out the filter.

The filter should be pretty easy, although I haven't looked at the code in quite a while so take that with a grain of salt. Theoretically, though, it should be something like this:

tagsReordered = [...tags.filter(tag => tag.favourite), ...tags.filter(tag => !tag.favourite)]

And then just use the new variable instead of the existing tags variable. Again, I haven't looked at the code in quite a while so treat that as more pseudocode than anything.

If you mean the Favourite filter for the tags page, you can probably just do a one-for-one copy of the one used for performers.

Anyhow, I appreciate you taking this up.

EDIT: Looks like the code has been changed a lot since I've last seen it. It appears all filters like tags (performers, studios, etc) use the same code. That said, the above pseudocode should still work. model.favourite on a model that doesn't have the favourite property will return falsey. As a side-effect, this would include performers which I don't think is a bad thing.

@Dankonite
Copy link
Contributor

ordering tags favorited -> not seems like something that is too "user preference"", or something that would need to be added as a sort option. But I can see if that isnt too hard to implement. Adding a filter for is/isnt favorited is for sure something that needs to get added

@SpedNSFW
Copy link
Contributor Author

ordering tags favorited -> not seems like something that is too "user preference"", or something that would need to be added as a sort option. But I can see if that isnt too hard to implement. Adding a filter for is/isnt favorited is for sure something that needs to get added

Ordering tags so that favourites appear first was one of key points in this request. I do agree that it makes sense to have it as a setting, probably opt-in.

@Dankonite
Copy link
Contributor

Dankonite commented Mar 26, 2024

Ordering tags so that favourites appear first was one of key points in this request.

My mistake, I simply searched for Favorite tags and this came up and I skimmed it. I may be able to add that, but At the very least tag favoriting (the title lol) is coming at the very least. I will try and add it as a sort option, it probably shouldnt be default behaviour but I could see the use for it.

@DogmaDragon DogmaDragon linked a pull request Mar 26, 2024 that will close this issue
@WithoutPants WithoutPants reopened this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants