-
Notifications
You must be signed in to change notification settings - Fork 377
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
[BUG] Tags with Spaces in Searchbar #112
Comments
Hmmm this is an interesting question but it will need an opinionated answer, my expectation of how the search would behave if I knew nothing about Tagstudio is that spaces were treated as commas so a search for I think making people type commas to separate tags is less clean that what we are looking for. I think a rough way to resolve this and might be only searching for the first word in a tag with spaces so searching for @CyanVoxel any thoughts on the intended behavior of tags with spaces or spaces in the search query, not necessarily how its implemented but how it should behave? I have some solutions that come to mind for down the road but there's a fair few things between now and those ideas. |
I've just had another idea... I think it's hard to imagine exactly what I mean... |
Haha this was exactly what I was thinking, but since the database swap is still being sorted implementing it right now would just mean re-implementing it with the new system as soon as that goes live. But if you want to take a swing at it with the current system have at it. |
Exactly how Booru programs work. Replacing the space with underscore so "blue sky" becomes "blue_sky". That also means that the whitespace becomes a forbidden character to use in tag names. Of course, it's up to CyanVoxel how to solve this, but it needs to be decided.
Kind of reminds me of how the Spacedrive allows you to search with tags, but I only tested it with few tags so don't know how well it will work when the number of tags grows to 100+ or 500+ |
I second this. During initial testing I tagged my file with "red dead redemption". When searching with "red dead redemption" yeilded no result, my immediate reaction was to try "red_dead_redemption", since I figured the search would behave like a booru library. Omitting spaces during search is functional, it's just not very intuitive (I had to go here to see if it's a bug or not), so it would be nice to see underscore search as an option. |
What about actually adding double quotes to signify that you want to include the space in the tag, like To me personally this would be the most intuitive way to signify a literal string |
Double quotes is what I see on most websites I come across and is the most intuitive to me (as a programmer at least). I think JSON and JavaScript do it the same way for Object keys that contain spaces. Another plus is that it does not change the tag at all. Maybe I misunderstand, but I understand the replacement with '_' as such:
It looks like you are searching for a different tag. Instead:
You search with the same name you gave the tag, just with added delimiters. Also wouldn't replacement make the use of |
If you have a tag that contains spaces and you search for files that contain this tag, it will only work if you remove the spaces in the search bar.
I would say there are 2 simple solutions
On the one hand, you could always remove all spaces from the search line automatically, but I don't know if that could have other problems.
On the other hand, you could take a closer look at the search function and make sure that it can handle such tags.
I would be willing to solve this directly once it has been clarified how we want to approach this.
The text was updated successfully, but these errors were encountered: