Graph-Link-Types icon indicating copy to clipboard operation
Graph-Link-Types copied to clipboard

Could this be applied to local graphs too?

Open oldjove opened this issue 1 year ago • 15 comments

Very nice plugin. Lots of potential. Personally I would find this very helpful to use on local graphs as well. Would that be possible to implement?

oldjove avatar Feb 27 '24 11:02 oldjove

It should work for local graphs... perhaps there's something else causing it to not work for you? How are your links formatted, what are your filenames, and are they in subfolders? Perhaps this is causing it to not work for local graph.

natefrisch01 avatar Feb 27 '24 11:02 natefrisch01

image

natefrisch01 avatar Feb 27 '24 11:02 natefrisch01

Hmm, thanks. Let me investigate further ...

oldjove avatar Feb 27 '24 13:02 oldjove

It doesn't work for me either. I have Dataview installed and linked files are in the same folder.

jsmm avatar Feb 28 '24 18:02 jsmm

Would you be willing to share a screenshot that shows your file structure and a local graph? Also, what OS are you using. It seems some people are having a hard time with local graph, but I havent been able to recreate the error.

natefrisch01 avatar Feb 28 '24 18:02 natefrisch01

I do have some folders, but I have tested this plugin for local graph with a note that doesn't have any direct link to notes in other folders. I am using macOS 14.3.1.

jsmm avatar Feb 28 '24 19:02 jsmm

Could you please give me example files that would recreate your error?

natefrisch01 avatar Feb 28 '24 19:02 natefrisch01

Sure. Here they are. The link is in the first file.

Lu_ Angola.md C_g- África.md

jsmm avatar Feb 28 '24 21:02 jsmm

So, I took a look at these, and I'm thinking it has to do with #7. The special characters are probably what's causing the issue. I don't understand why it would work in global view and not local, however.

natefrisch01 avatar Feb 29 '24 00:02 natefrisch01

I also noticed this issue. But I noticed this only happens when I am not actively focused on the current note for which the local view is used.

Edit: Nvm even when note is focused it still doesn't work sometime. It works good when I have the link mentioned at the top of the note. But if it's in the middle or around the end of note the label doesn't show up

FancyBEAST avatar Mar 30 '24 07:03 FancyBEAST

@FancyBEAST

Do you have other metadata before the metadata with the link as in #25 ?

natefrisch01 avatar Apr 01 '24 22:04 natefrisch01

I tried a few things for this issue and it seems that the current method works like this

  • Iterate key/values in the front matter and then following inline key/values in the document

The issues is that the method expects all key/values to be a key followed by a markdown link. If it sees anything else the methods breaks and stops parsing.

What causes confusion is that some frontmatter types seem to be ok and not cause the parsing to stop. This is because some frontmatter types are multi value fields and are therefore stored differently in the source.

For example this does not break the process

---
aliases:
  - graphlinktype
tags:
  - one
  - two
related:: [[graph]]
---

But this does break the process

---
created: 2024-04-19
aliases:
  - graphlinktype
tags:
  - one
  - two
related:: [[graph]]
---

This also breaks the process with regarding inline key/values

---
aliases:
  - graphlinktype
tags:
  - one
  - two
related:: [[graph]]
---

type::Guide

parent:: [[Obsidian Plugins]]

elvarb avatar Apr 19 '24 14:04 elvarb

I am having the same issue. I have a lot of notes with date property and these notes can't seem to load the link in graph.

Is this getting fixed?

Thanks for the plugin btw!

jesvtb avatar Dec 28 '24 05:12 jesvtb

Same. Works perfectly in global graph view, but not in local graph...

the-a-man-006 avatar Jan 14 '25 09:01 the-a-man-006