linkding
linkding copied to clipboard
add hierarchical tag search
My shot at implementing a tag hierarchy at the search level for #659
Tags with / characters can be searched by any of its parents tags (i.e. a tag a/b/c is searchable via a, a/b or a/b/c.
Added an option to enable/disable this functionality in the user profile (default is off - aka old behaviour).
Now this would be a great feature. I didn't have a look at the code, but one would have to search for #b, not b, right?
yes, normally you would search for tags via "#" prefix as normal.
it actually depends on your "tag search" setting as before. if it is set to "lax" it means you can search for tags without "#" as well. so no changes at the point.
Thanks for the contribution. There definitely should be a better way to categorize bookmarks, but I'm not sure if this is it. The good thing about this implementation is that it's opt-in and a rather isolated change. Personally, I'd want something different for tag bundles though, in that I can define a bundle like programming which:
- Is selectable through the UI, separately from the cluttered tag cloud
- Allows me to define a number of tags like
css,java, ... that are automatically included in the search results when searching forprogramming
I'll keep this open as an option, but I still have to make up my mind if categorization should be solved with folders, tag bundles, tag hierarchies, or by supporting multiple options. Or possibly a combination of those, for example folders could be combined somewhat with the tag bundle approach I mentioned above.
I'll keep this open as an option, but I still have to make up my mind if categorization should be solved with folders, tag bundles, tag hierarchies, or by supporting multiple options. Or possibly a combination of those, for example folders could be combined somewhat with the tag bundle approach I mentioned above.
(Folders are the root of all evil - my personal opinion)
Could a bookmark then reside in multiple folders?
at least the main pull request here is nothing more then a partial tag search. this means you can organize your tags in a folder like hierarchy and then search for the path or the full tag name. this means you can have multiple hierarchical (or notmal) tags per link.
(Folders are the root of all evil - my personal opinion)
I would agree with that. I hated it when every time I created a bookmark I had to decide in which folder to put it. Or digging through the folder hierarchy to find something. I much prefer just adding some tags and then relying on search. But people are used to them and it's one of the most requested features at this point. Apart from that the current tag cloud quickly becomes useless / too noisy if you want to navigate bookmarks through the UI rather than through search. So some form of a configurable curated list of categories (folders, tag bundles, whatever) as a quick filter makes sense.
Could a bookmark then reside in multiple folders?
With tag bundles very likely, as tags don't have a hierarchy and you can assign multiple of them to a bookmark. If there would be a feature for manually assigning bookmarks to folders then I'd probably not go that far in a first version.
(Folders are the root of all evil - my personal opinion)
Could a bookmark then reside in multiple folders?
Kind of true, maybe put tags in folder, a tag belongs to some other tags (category), act like tags, but a bookmark still could be found via it's parent tag. Also when tag glows, the UI would become less messy
Thanks for the contribution. There definitely should be a better way to categorize bookmarks, but I'm not sure if this is it. The good thing about this implementation is that it's opt-in and a rather isolated change. Personally, I'd want something different for tag bundles though, in that I can define a bundle like
programmingwhich:
- Is selectable through the UI, separately from the cluttered tag cloud
- Allows me to define a number of tags like
css,java, ... that are automatically included in the search results when searching forprogrammingI'll keep this open as an option, but I still have to make up my mind if categorization should be solved with folders, tag bundles, tag hierarchies, or by supporting multiple options. Or possibly a combination of those, for example folders could be combined somewhat with the tag bundle approach I mentioned above.
Yep, tag-bundle + tag synonyms would be just great !
I think having a bottom-up approach should make things easy to setup: right-click on a tag, like #css, then edit:
synonyms: [ ]
parent tags:
if you are on css, you can set programming_languages, that in its turn has language and programming as parents.
This way if you search for #css, you only have css related results. but if you type dev, which is defined as a synonym for programming, you also get all css tags results
Hi there,
I wrote some JavaScript (UserScripts) that add basic tag hierarchy support to LinkDing. These conventions help me organize my bookmarks more effectively:
Tag Conventions
1. Slash-delimited subtags
Use a slash (/) to create parent/child tag relationships. The part before the slash is the parent category; the part after is the subcategory.
Clicking a parent tag shows all bookmarks that use any of its subtags.
Examples:
browser-extension/githubbrowser-extension/linkdingminecraft:mod/performanceselfhosted/dashboardselfhosted/wiki
Tag browser-extension also show bookmarks tagged with browser-extension/github and browser-extension/linkding.
2. Colon-delimited groups
Use a colon (:) to visually group related tags that don’t share a parent-child relationship. These tags remain separate in filtering.
Examples:
browser-extension:storeminecraft:server
Hope this gives you some inspiration for organizing your own tags.