Skip to content
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

Speeding up Metadatacache and creating non-existing links #36

Closed
tklosek0 opened this issue May 26, 2021 · 10 comments
Closed

Speeding up Metadatacache and creating non-existing links #36

tklosek0 opened this issue May 26, 2021 · 10 comments

Comments

@tklosek0
Copy link

tklosek0 commented May 26, 2021

Hello,

I found some possible enhancement to the new metadata-feature.

  • It seems somehow laggy when creating Links and looking if they are created in the graph view (and sometimes dont even are created)
  • non-existing links wont be created
valentine195 added a commit that referenced this issue May 26, 2021
- #36 - Fixed issue where unresolved links would not be added to the metadata cache
@valentine195
Copy link
Member

It seems somehow laggy when creating Links and looking if they are created in the graph view (and sometimes dont even are created)

I realize that the graph view updates "live" in edit mode, but I do not believe it will be possible for me to do that.

As far as not being created - this functionality is not something that is supported by Obsidian, and anything that causes Obsidian to re-resolve the file could remove the links from the graph view. I'll work on making it more stable, but there's a real possibility that this is the best we'll be able to do for this feature.

non-existing links wont be created

Fixed in 4.3.1

@tklosek0
Copy link
Author

tklosek0 commented May 26, 2021

Ok I understand. Obsidian should fully support backlinks inside codeblocks, maybe they take a look at it after the mobile release is done.

I see that after restarting obsidian the outgoing links of that note aren't created. Is there a way to create a shortcut for writing the metadata-cache manually? So that after opening obsidian or editing the file, running the update metadatacache command would update the graph view? This would also solve the problem of updating the graph, since there would be one command to update the cache. But this should be done with all files where backlinks are created inside the admonition

@valentine195
Copy link
Member

Let me think on if re-adding the links into the metadata cache on open would be possible. Right now, the plugin just finds internal links inside admonition blocks of an open file when the cache is updated and adds them (because every time the cache updates the links inside admonitions are removed).

I would need to store links that are inside admonitions as plugin data to re-load them on open, which could cause artifacts - for example, if you deleted a note that contained links, the plugin may not catch that and keep the links internally.

@tklosek0
Copy link
Author

Ah i understand, but wouldnt it be possible to avoid artifacts if there would be a way to manually (via hotkeys for e.g) write the plugin-data?

@valentine195
Copy link
Member

The plugin would still need to store that data to write it, which means it would need to update it when files are changed/removed/added.

@valentine195
Copy link
Member

@TobiasKlosek, I'm going to leave this open because it is referring to the "Sync Links" functionality, but I just released version 6.0.0 that allows you to create non-code block Admonitions. See here for more information.

@tklosek0
Copy link
Author

@valentine195 thanks! That is nice! I just found one more thing to correct. I will create a FR.

@MatteCrystal
Copy link

This "Sync Links" functionality would be exceptionally useful to me. If you can get it working with the basic code blocks that would be ideal. But if the non-code block Admonitions gets to the point where they're 100% as functional as the code block method then that would be great too.

ATM lack of styling options and nesting makes the current iteration of non-code-block Admonitions not useable for my current use case.

Also, non-code-block Admonitions don't seem to support HTML for the title like the code block version does.
image
That gold line is due to me using <div class="pageTitle small">Navigation</div> as the title text. doing this with the non-code-block version causes errors.

@MatteCrystal
Copy link

Also if by chance you figure out a way to Sync Links for the code block style Admonitions. The ability to have that synced links be togglable could be useful. For example, if you look at the image in my last post. I would want links in parents to be synced but the list of links under children I would want to keep unsynced, regardless of if I've visited the page or not.

@valentine195
Copy link
Member

Grouped into master issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants