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

Backlinks: show surrounding context #104

Open
srid opened this issue Sep 11, 2020 · 6 comments
Open

Backlinks: show surrounding context #104

srid opened this issue Sep 11, 2020 · 6 comments

Comments

@srid
Copy link

srid commented Sep 11, 2020

The extension's backlinks panel currently displays only context after the link (see #29 (comment)), 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).

@svsool
Copy link
Owner

svsool commented Sep 12, 2020

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.

@nixsee
Copy link

nixsee commented Sep 12, 2020

This seems like a reasonable option. I don't know what a sensible limit would be though - perhaps something that could be user-configurable?

@srid
Copy link
Author

srid commented Sep 12, 2020

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 srid/neuron#190

@svsool
Copy link
Owner

svsool commented Sep 20, 2020

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.

@srid
Copy link
Author

srid commented Oct 31, 2020

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

@memeplex
Copy link
Contributor

I left some related remarks in this mostly-dup report of mine #478.

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

4 participants