-
Notifications
You must be signed in to change notification settings - Fork 380
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
feat(ui): sort tags in add tag panel by color/alphabetical (close #327) #329
feat(ui): sort tags in add tag panel by color/alphabetical (close #327) #329
Conversation
Sort tags in the Library Tags panel and the Add Parent Tags panel with Archived and Favorite at the top, then sort by color, and then sort alphabetically.
This default order for the tag boxes looks great! While I personally don't use color to categorize tags, this is still much more useful than simply the creation order. Just a couple thoughts on the implementation:
|
The way I see tag colors is that they can be used to assign optional visual meaning to tags, either by categorizing or by color association - but they should not be the de facto method for creating categories. That should be handled by a more powerful tag category system, something that's planned for the future and intended to replace the current "tag field" system with user-defined categories and automatic grouping based on those. With that being said though, I'd rather not step on the toes of people who use color for categorization if there's no need to. Color itself is still a useful way to recall and sort information, so I'm fine with it being an option here as long as it isn't the primary system for categorization going forward. As for the |
Thank you for your questions on my code and my intent CyanVoxel, and I appreciate hearing more about your considerations for TagStudio. To try and respond to your points, yes, absolutely. Color is not a good permanent default. Even if we have to choose a default in the future, much better options will show up, including tag categories no doubt. The main goal of this was to provide a temporary improvement to tag ordering without me having to muck around with UI. I'm fine with leaving the PR on color-alphabetical in every case, and I'm also fine with switching it to full alphabetical for searches if that's what you want. I haven't noticed any performance issues loading tags, but if you want alphabetical searches without increasing the limit right now then I don't mind that either. Right now I'm wondering, is there anything that would have you consider a tag sort related PR like this acceptable without any corresponding UI changes? |
I would say that color-alphabetical is fine for the default view, with relevancy-alphabetical-color being the ideal default order for search results. The relevancy aspect (matches between name, aliases, and parent tags) could be tricky to get working in a satisfying way if you were to try it though. If anything I wouldn't mind pulling this PR if it just included the color-alphabetical view for non-search results. The current 100 tag limit was decided by me here, where I gave a similar proposal for how it could be overcome in the future. Although if you feel comfortable with adding to the configuration .ini file (see the use of Let me know how you feel about the options here. Thank you for working on this and getting back! |
Alright, I set it up so searches are color-alphabetical by default, and alphabetical-color when searching. I realize that the tag limit is probably a minor issue right now, so I just left it as is. I have had some other ideas about searching tags since opening this PR, but I think that I will leave them for a later. Please let me know if this PR looks good to you. Thanks! |
…query in other ways
You're right, I haven't considered that issue. I implemented the second fix for that issue, so now tags whose actual names match the search text show up before the rest of the results. If you can't find any more immediate issues we haven't talked about then I'd prefer to try to get this PR finished before either of us do too much new work on the tag search, including trying to refactor or create some sort of unified backend functionality. I also want to note the results of search_tags() in the Library class is not the only place lists of tags can come from. I believe that we should consider the ordering of tags in entries before we start unifying tag sorting. |
Sounds good! I also didn't consider sources of tag lists from other than |
…StudioDev#327) (TagStudioDev#329) * Implement TagStudioDev#327 Sort tags in the Library Tags panel and the Add Parent Tags panel with Archived and Favorite at the top, then sort by color, and then sort alphabetically. * Sort tags alphabetically when a search is performed * Format with Ruff * Prioritize tags whose names match the query over tags that match the query in other ways
Sort tags in the Library Tags panel and the Add Parent Tags panel with Archived and Favorite at the top, then sort by color, and then sort alphabetically.
This is what the panels look like now when you have many tags of different colors: