Giter Club home page Giter Club logo

obsidian-reference-count's People

Contributors

gitmurf avatar shabegom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

obsidian-reference-count's Issues

Hide same reference from Search Results Table

When I open the table for a block with a reference, it always shows the same reference in the same file that I used to open the table in the first place. This can be a little annoying, as even though I can identify that it's just referencing itself by reading it/checking the filename, that isn't very helpful and takes time. It would be nice if we could optionally exclude that one (or at least clearly mark that it's the same reference).

Search component height issues. ${count} variable isn't defined in the location you moved it to.

let searchHeight = (count + 1) * 80
if (searchHeight < 250) { searchHeight = 250 }
if (searchHeight > 600) { searchHeight = 600 }
searchElement.setAttribute("style", "height: " + searchHeight + "px;")
searchElement.setAttribute("style", "height: 450px;")

  1. @shabegom the ${count} variable isn't defined in the location you moved it to when merging my branch earlier. I had it in the createButtonElement() function where ${count} was defined.
  2. You override this value with a fixed 450px after the code.

image

Heading reference won't work if heading contains a special character

0.1.4

Obsidian supports special characters in headings and links to headings, but your plugin won't work with headings that do contain some special characters, in my particular case '. I do understand this is a minor issue in english but some languages make extensive use of '.

I hope this is clear enough, and thank you for your awesome plug in!

EDIT: Also the + character breaks it

Parsing / scrubbing (character replacements in links) issues with Header references

Some parsing / logic issues I have found:

  • For header reference parsing (scrubbing invalid header characters to match the way Obsidian creates the links) the following seems to be missing from logic and needs to be added:
    - "/" slashes need to convert. Primary use case is #parent/child tags in headers. Need to replace with a " " space. "This is a #parent/child tag" needs to be "This is a parent child tag"
    - The hashtag # removal for non nested #tags already seems to work fine... so it is just the replacing "/" slashes with a space " " that needs to be updated I believe.
  • It seems that if you start with a header reference that is NOT an ! embed... [[page#header]] it will not pick up the reference.
    - If you switch the link to an embed adding ! like ![[page#header]] it then finds it and adds the counter.
    - Then if you switch it back removing the ! embed back to [[page#header]] it stays there fine.
    - So something isn't triggering the initial index of the reference when it is just a [[link]] and not an ![[embed]].
    - Also if you close Obsidian and re-open then a [[page#header]] link (non embed) will work from the start.
    - Even going to a different page and then coming back doesn't "trigger" it. Have to close and open obsidian (or make it an ! embed and then switch it back to link).

Headers show all backlinks with the same header name even from different notes

Hello!

Even if the count of backlinks is right (counting only the backlinks corresponding to the node + header), headers show all backlinks with the same header name even from different notes,
By example: [[a#ideas]] header ref counter will also show the backlinks that reference [[b#ideas]], [[c#ideas]]...

Also important details: it still works well on my mobile, probably because of the version difference: mobile version: 0.2.0 vs desktop version 0.3.1

Thanks!

Prevent search component from being added to the sidebar. Or at least hide it from view.

Ok looks like I figured out why/how they got in the sidebar. It looks like it adds them each time you click a block ref counter button? We should definitely implement the onunload() fix above but also should try and figure out how not to add to the sidebar? Or at least hide from the sidebar?

Also maybe we run the same cleanup on obsidian start. So each time we start we start fresh without any old search views. If you click a block ref counter button and don't close the search view and then close Obsidian, when you open it next time you will have a search view in the sidebar that you can't remove.

Obs.-.blick-ref-ctr.-.Search.views.added.to.sidebar.mp4

Originally posted by @GitMurf in #26 (comment)

Zootelkeeper coordination and lists

  1. I use Zootelkeeper for indexing and it places links on the folder note to each note within that folder. Block counts don't show up unless I manually insert a blank line between each link.
    Like this:
    %% Zootelkeeper....
    blank line
    link
    blank line
    link
    %% Zootelkeeper...

  2. If I make a list of those links (prefer to create nested list), the block counts stop working all together.

Live Preview version

Currently the counter does not show up in Live Preview. Is it on your roadmap to make an LP version?

New update bugs

Hi,

I really like using Block Reference Counts plugin, but recently update had some bugs

  1. I found that it lost the option to close the list of table once it's opened

  2. I prefer when the Block Reference table belongs to a heading, it should be hidden as well when I fold the heading.

  3. I just tried to link to a block, it did appear number of links to that block but did not list out the table.

Thank you,
Missionary

Search-ref search views snuck into my sidebar and cannot remove

Now sure how or when they snuck in, but something to keep an eye out. It may have been one of the earlier versions we were testing. But you cannot right click them to remove. So either have to revert back to a different workspace to remove them or programmatically remove them from the console.

image

image

Performance Issues on Pages with Many Backlinks and Folded Lists

Hi! I love the Block Reference Counter plugin, however I have noticed a couple of things that make it unusable for my use case. First, I noticed very slow performance today on a page where I am using folded lists with many references. The performance has seemed to decrease as the size of my list/references increases. If I disable the plugin, performance gets better. I did not notice any performance issues with the plugin enabled on other pages where the pages did not have lists that were as long of as nested. So, it seems to possibly be an issue with folded/nested lists? Second, when I look at link results for, say the following block: [[John-03#v16]] the bock reference will list results for v16, even when not associated with the parent header. For example, might see [[Acts-01#v16]], etc. Maybe I am using it wrong, is there a way to only show references to [[John-03#v16]]? I hope I am making some sense.

Lag experienced when typing

Hi @shabegom!
Love this plugin, it adds such a key functionality. Unfortunately though I experience similar issues as in #35. Both on mobile and desktop, Obsidian lags and stutters every few seconds with the plugin enabled.

Inline block reference does not have counter

Version 0.1.4

An in line block reference is like this:

some text ![[filename#^block id]] some more text.

There is no counter next to this in Preview. Is that intentional? Is it not possible? Is it a bug?

Move from 0.1.7 to 0.3.0: count for block references no longer working

I recently made the upgrade from 0.1.7 to 0.3.0.

In 0.1.7, the target block and the link to the block could both have numbers next to them. I found that the most important part was that the target block (I believe that the plugin refers to this as the "child") had a number next to it. This worked great!

SInce the upgrade, the following things have happened:

  1. The target blocks (children) do not have a number next to them, unless it's a heading.
  2. On the link side ("parent", I assume), the count (when one presses it) can be making use of some other link, not just the block reference.

For number 2, I'll be honest and say that I don't know what the expected behaviour should be when pressing the count for a parent when there are multiple block reference links in one paragraph. However, I'm assuming that links that are not block reference links should not be chosen as the search, either way.

I don't know if I'm alone with this behaviour, but right now the child side count is not working for block references, and there are now numbers on every line that has any link, which I'm guessing isn't the intent of the plugin.

I've tried looking around in the settings, but there does not seem to be a way to configure the plugin to behave like it did in 0.1.7.

Highlighting returns if context is expanded

Problem: The highlighting in the reference view fade out nicely after it loads in the first time, but if you expand the context either with the show more context button or the arrows the highlight comes back.

Look into listening for rerenders of the search results and removing the highlight class.

Counter button, table

In Live Preview I only see the count button if I click on an embed:

image

However, if my cursor is off the embed, the count button is not visible:

image

When I click on the count button it creates a little table showing which other notes the embed occurs in:

image

How can I close the table, make it disappear? There used to be a close cross.

Table is not displayed

Hello, Thanks for developing this plugin. I have it installed, but when I click on the count button it opens a view, under the block, that looks like the backlink panel and not formatted table. Originally saw in minimal theme, but still there in other themes so that seems to not be the issue. I don't mind the view, it is actually nice in that I have sorting and other options, but thought I might let you know. Thanks again.

Jeff

Bug - Incorrectly renaming links (duplicating folder names) with absolute paths when renaming files

  1. I have "absolute path in vault" option selected, using wikilinks
  2. With this plugin enabled, when changing a filename, all the links to this filename are changed in incorrect way - folder name is duplicated (once per almost every file rename).
  • e.g.
  1. I create new file "Test 1" in folder "ABC"
  2. I link to that file from other file (which is in vault root). The link appears as [[ABC/Test 1]]
  3. After renaming "Test 1" to "Test 2", the original link now appears as [[ABC/ABC/Test 2]]
  4. When I rename it back to "Test 1", now it appears as [[ABC/ABC/ABC/Test 1]]

It seems that folder name is incorrectly added once more with each renaming. I tested which plugin could be responsible and it seems to be this plugin. (Bug apperas to be the same with all plugin options on/off, no effect turning off "Display on links" etc)

I am using Obidian 0.14.6. / Block Reference Counter 0.4.3.

Thanks.

Support headers nesting

Hello, I was personally thinking of a way to keep some kind of atomicity while keeping the number of file reasonably low for some types of data, so i thought that i could use centralized files acting a bit like a block reference database (for example with objects represented with h1 and their properties in h2), that i can refer from other notes in that way

    - blabla
        - bla
            - [[centralizedFile#object a#property1]] blue
            - [[centralizedFile#object a#property2]] graph feature 
        - bla
            - [[centralizedFile#object b#property1]] red
            - [[centralizedFile#object b#property2]] automation feature
  • With this way and your plugin i would then be able to collect data on the same property of different objects of a same category in a unique file while being able to reference them atomically from anywhere and get backlinks for each of them from centralized file
  • The problem is that the plugin doesn't seem to handle the nesting of headers. [[centralizedFile#object a]] will work, [[centralizedFile#property1]] will also work but appear in the counter of every property1 of every object, but [[centralizedFile#object a#property1]] doesn't seem to work and i don't have a counter on the specific property1 of the object a.
  • Do you think it would feasible to add that nesting? Maybe there is something in the obsidian API as you can already get some kind of autocomplete narrowing down to the sub h2 in a h1 when you specificy the h1 before (The nesting of headings of obsidian is great to act a bit like code autocomplete when for instance i don't know all the properties on this object i can just type [[centralizedFile#object a# and get all the possible properties)

Thanks!

Need to handle code block references

If you block reference a code block it actually puts the ^block-id below the code block with a line break in between. The plugin is not picking this up because it is not looking for a line that starts with ^block-id.

image

Cleaning up CSS from a mistake from several commits ago

Ref commit: a043b8f

In this commit I fixed an issue where the color and border were on the same line which made neither of them actually apply. When I fixed them with the commit above, both started to work and it added the inset border which doesn't look as good as it was before. I am going to remove the border property.

Header ref counts only itself

Note 1 references a header, say ### Header text, in note 2. Let's say there are no other notes referencing the header.

Note 2 shows the count of 1 next to the header, which is correct, but when I click on the number 1 it only lists note 2, i.e. itself, instead of note 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.