Open srid opened 3 years ago
What do you think would be a sensible limit for the surrounding context in case of long paragraphs? Showing the whole paragraph/sentence before/after a link might be irrelevant in some cases.
This seems like a reasonable option. I don't know what a sensible limit would be though - perhaps something that could be user-configurable?
Surrounding paragraph with a hardcoded limit that makes sense for UX?
You can checkout the backlinks in https://notes.andymatuschak.org/About_these_notes?stackedNotes=z3SjnvsB5aR2ddsycyXofbYR7fCxo7RmKW2be for some ideas.
This is something I need to figure out for neuron as well, when implementing https://github.com/srid/neuron/issues/190
I need to play around with this idea. For starters, something like "n" words before/after with some reasonable min/max limits in the settings probably would do the thing.
I went with the approach of including entire surrounding "block" element, which is usually paragraph or a list item. You can see it in action in any of the neuron pages, eg: https://neuron.zettel.page/cerveau.html
I left some related remarks in this mostly-dup report of mine https://github.com/svsool/vscode-memo/issues/478.
The extension's backlinks panel currently displays only context after the link (see https://github.com/svsool/vscode-memo/issues/29#issuecomment-661337531), however in practice the context both before and after the link is relevant when navigating notes by backlinks, especially if the link is used in passing in the middle of a whole sentence (eg: "Here is a sentence which is the whole [[context]] for the link in it"; vscode-memo will display
[[context]] for the link in it
in backlinks panel, which is obviously incomplete).