SUMMARY: Dolphin can create tags/tag components with leading/trailing spaces, these are shown as distinct in the tag list STEPS TO REPRODUCE: Create a test file and attach tags "mytag", " mytag", "mytag ", " mytag " and "parenttag / mytag" (using "Assign Tags" from context menu) Check the file with "getfattr -d ..." OBSERVED RESULTS # file: testfile.jpg user.xdg.tags="mytag,mytag , mytag, mytag ,parenttag / mytag" EXPECTED RESULTS Leading and trailing spaces should be trimmed from tag components before being saved SOFTWARE/OS VERSIONS Neon Testing Dolphin : 20.12.3 Plasma : 5.21.2 Frameworks : 5.80.0 Qt : 5.15.2 ADDITIONAL INFORMATION Works better in the information panel "Tags" dialog but that still stumbles on tag components, as when creating "parenttag / mytag" (I see the discussion for filenames in bug 383376. Gut feeling is that if you really want a leading/trailing space, you should explicitly quote them. That's probably a separate discussion though)
Created attachment 138664 [details] Comparision of Assign Tags, Information Panel and Tag Folder views There's a similar behaviour with leading or trailing slashes on tags... STEPS TO REPRODUCE Make sure Baloo is running in order to see the tag folders under "Places" Create a testfile and create, with "Assign Tags", the tags "/tag" and "tag/". Confirm the tags have been written with getfattr: getfattr -d testfile.txt # file: testfile.txt user.xdg.tags="/tag,tag/" OBSERVED RESULTS Go back to the file with "Assign Tags" and see what it shows * /tag tag * tag/ Compare the info to that displayed in the Information Panel and listed under "Places" (see attachment...) EXPECTED RESULTS "Assign Tags", the Information Panel and the Tag Folders under "Places" should be consistent. Maybe "Assign Tags" should drop leading and trailing slashes as typed in, should cope with existing leading/trailing slashes when it meets them. ADDITIONAL INFORMATION The information panel doesn't get it quite right either...
Hi tagwerk19. First of all, thank you for your contributions and your help here. I reproduced the problem you described in first message. Yes, these spaces should be trimmed. There is a trouble with second message, I can't reproduce this problem. In my case of: # file: Issue.md user.xdg.tags="/tag,tag/" It only shows "/tag" and "tag/" in "Assign Tags" of Context menu.
(In reply to reports_go_brrr from comment #2) > First of all, thank you for your contributions and your help here. No problem :-) I'd say I don't manage to keep track of all the various bug reports, so thank you for checking and confirming. > There is a trouble with second message, I can't reproduce this problem. > In my case of: > # file: Issue.md > user.xdg.tags="/tag,tag/" > > It only shows "/tag" and "tag/" in "Assign Tags" of Context menu. For me, with a quick test on Fedora 40, I still get "/tag", "tag" and "tag/" appearing in Assign Tags. Let me try elsewhere.... My gut feeling is that the slash should be considered a separator, it's important in parent/tag but leding or trailing tags should be ignored when listed or input. There would be a case for treating leading and trailing tags as important in searches - you might want to search for "/tag" or "tag/" and find hierarchical tags, where "/tag" is a child and "tag/" is a parent.
To tagwerk19, The usage of "/tag" or "tag/" for finding parents of tags and it's sub-tags is indeed a good solution for slashes. But I think in that case slashes need to be stripped away during tags creation completely, to avoid problems. So I am kinda skeptical about it.