View Structure of Nested Tags on Graph

Use case or problem

Nested Tags creates a structure. Now each of element is shown as a separate tag. It’s not help to discover connections based on them.

Eg.

#TAGROOT
#TAGROOT/LEVEL1a
#TAGROOT/LEVEL1a/SUBLEVEL1a
#TAGROOT/LEVEL1a/SUBLEVEL1b
#TAGROOT/LEVEL1a/SUBLEVEL1c
#TAGROOT/LEVEL1b
#TAGROOT/LEVEL1b/SUBLEVEL1a
#TAGROOT/LEVEL1b/SUBLEVEL1b
#TAGROOT/LEVEL1a/SUBLEVEL1c

Proposed solution

I would like to have a view where a root of nested tag is connected with his childrens and each child with another one.

#TAGROOT → LEVEL1a → SUBLEVEL1a
→ SUBLEVEL1b
→ SUBLEVEL1c
→ LEVEL1b → SUBLEVEL1a
→ SUBLEVEL1b
→ SUBLEVEL1c

Additionally it would be fantastic to be able to fold/unfild each level of tags and show connection to selected level.

e.g.

I would like to see all notes connected to a root nested tag:

#TAGROOT → connected to all notes where it is used

I would like to see all notes connected to a first level of nested tag:

#TAGROOT → LEVEL1a
→ LEVEL1b

Current workaround (optional)

no

Related feature requests (optional)

no

85 Likes

This sounds helpful but I am not sure I am understanding completely, so excuse my possible misunderstanding in this following workaround suggestion.

Could you try setting embedded search queries within a note set to a side pane?

If so, but you are requesting this for ease of use and improved interface, I understand and support that. Just thought I would mention this in case it is at all of benefit. This has me back interested in nested tags.

Thanks.

4 Likes

Embedded searches are great. Whan I know to find it’s easy to use them. To discover new information or relations Graph is a better tool . I am using Embeded Search , you can see it there:

According to the case described in the mentioned scenario, it is hard to find which my coworker is the best - which get the biggest number of positive feedback.

Now I’ll get a messy graph with a mix of tags: questions :question: , negative feedback :exclamation:, tasks :gear:, observations :eye:, CR from the meetings :white_check_mark: and finally positive feedback :+1: (because each note can have any of them inside a content)

When I’ll have an option to show only:

#F2F/(*.)/:+1:/

I’ll be able to see clusters around some of them and I’ll be able to easily see and discover who is a winner.

3 Likes

I think this is similar to my need. Possible an easier to consume example.

Currently, nested tags in graph are treated as a single tag. For example, there is no apparent difference between:

#Europe/Italy/Rome and #EuropeItalyRome

It would be helpful if the graph was hierarchical and branched at each sub-tag. This would allow a core tag in the graph of #Europe (with any general files on Europe connected). From there, the #Europe/Italy tag would connect to #Europe but contain files that are tagged #Europe/Italy. From #Europe/Italy the #Europe/Italy/Rome tag would be connected with its related files.

19 Likes

Check out Link Tags to Subtags in Graph

It is different than this feature request but does take care of this:

Thanks.

2 Likes

Hi everyone,
first, thank you for this amazing Application!

Use case or problem

Subtags and Tags currently have no Connection in the Graph-View but are completly separate.

Because I don’t want a Connection between the Main-Tag and the SubTag lost, this makes me tag my Pages like this at the moment:

#books #books/fiction #books/fiction/fantasy

But this on the other hand leads to a lot of clutter in the Graph-View,

Proposed solution

It would be nice if Sub-Tags would connect to there parents, so that there is a strong connection between Sub-Tag and parent, but Notes only need to link to their specific Sub-Tag. This would de-clutter my Graph a lot and lead to a nice Tag-Tree.

16 Likes

Good idea.

Makes sense to me. I see what you mean. But, maybe a toggle would be a good compromise.

Thanks.

8 Likes

A Tag Tree Toggle! That is a wonderful idea!
Even I was a little disappointed when subtags arent “sub-tags” per say, but they function as distinct tags, but with similar names.

10 Likes

Here’s something I’ve been thinking upon.

Once nested tags are graphically interpreted, I was wondering what would become of the relationship between the tags #America/History and #Canada/History?

I would like to hear everybody’s thoughts.

4 Likes

I really like where you are going with this.

Maybe there could be a toggle switch in the Display section of graph settings to create a dotted connection between them.

Or, perhaps with either an automatic toggle or by creating a new tag called */History (or something legal), this new shared subtag node would be connected to all tags that had the History subtag.

I am having trouble finding it, but I had a similar feature or plugin idea using the same concept but for headings. In my idea, all notes that had a matching heading would be linked to a note with that heading name or a new note if one did not exist. Of course this would not be automatic and would have to be invoked.

Thanks.

5 Likes

I think it would be more usefull if they were seperate at first, because them beeing linked would lead to a lot of overlap in a Tag-Tree and would make it hard to follow the branches from Main-Tag to Lowest-Level-Tag. But it would be nice if there was a Option to filter the Graph, to show only Notes tagged with */History/* for Example.

6 Likes

+1 to that!

Linking tags to nested tags on the graph seems super important! I want to start using a tag system, but I can’t imagine not having nested tags, and I don’t want nested tabs messing up my graph view by not being linked…

7 Likes

Just chipping in, I too would find it highly useful if nested tags connected in a meaningful way.

At the very least I think that connections should be made between direct descendants so that the tag #philosophy would connect to #philosophy/socrates and to #philosophy/democrates but the two nested tags would not connect to each other. That way you would get a tree structure which feels very natural when navigating.

7 Likes

:construction: A very messy workaround, but a workaround

tl;dr: I created a note that links to the base tag and all its nested tags, pulling them together on the graph. And hacked together an automated way to pull nested tags given a base one.

:woman_shrugging: I originally, for the laughs, created a note named after the base tag, even with the #, #geo (subtags of which I use in locations for Map View, like #geo/beach). Having the note, I just went ahead and mentioned every tag nested under it in that note. Manually. And once I opened the graph, it seemed to work perfectly! I put that note into its own folder and assigned it a color so that it would blend in with the other tags.

:thinking: E-e-e-except for one small problem. When trying to extend that practice to other tags I learned that this was only working fine because the base tag was not in use. So when I created a note that only had the base tag, #geo itself, I suddenly had two dots on the graph named #geo — one for the tag and one for the note. That was confusing. And thanks to my color hack I couldn’t even tell them apart :grin: So I assigned this note a different color of course.

:warning: …and I later discovered that Obsidian on Android cannot create a file with # in the name. So I had to remove it from the note name anyway. It worked on Windows though.

:bulb: But on second thought — it actually did the job! It pulled the nested tags together! Sure, there’s one unnecessary link and the base tag got hard to spot, but the structure is mostly there. I just had to mention the base tag in the “pulling note” (as I’ve gotten to call them) too, in order to not have it dangling elsewhere.


Automation

Now, of course I had to automate this. Gathering tags by hand is tedious. I solved some of this using Dataview plugin. I mention the base tag I want to pull the subtags of, place this snippet on the page and, well, follow what it says:

Automation snippet to maintain the list (copy&paste its results from preview window into the file):

```dataviewjs
let currentPage = dv.page(this.currentFilePath)
let pageTags = currentPage.file.etags;
let query = pageTags.join(" or ");
let queryTags = (query === "")
    ? []
    : dv.pages(query).file.etags.array();
dv.paragraph(
  [...new Set(queryTags)].join(" ")
);
```
  • Sadly, this only really handles single-level tag nesting, because it gets all of the descendants of mentioned tags, not just direct children! This is JavaScript though, so it’s got to be fixable. I haven’t (yet?) gone that deep into the tags.
  • It already does not match ancestors: if you mention a nested tag, it’s not going to return the base tag of it in the result.
  • Still a bit of manual action whenever a new tag is introduced. But the snippet does make initial setup easier, and makes future tagging sprees manageable.
  • It handles multiple base tags just fine. That goes beyond the workaround, but the snippet does not care.

Better than nothing overall. I hope this helps someone out there.


Still waiting for a native solution though. Pretty please? :slightly_smiling_face:

4 Likes

I have the same idea.

2 Likes

Hello, any update on this ? I don’t know if I should change the way I use tags or if a solution will come out eventually.

6 Likes

Any updates?
A toggle that could reveal relations between nested tags and root tags would be perfect.

6 Likes

I’m voting for this one!

3 Likes

Any updates with this feature?

3 Likes