dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.53k stars 248 forks source link

Previews for backlinks #2707

Open alex-ess opened 2 years ago

alex-ess commented 2 years ago

Please select if your request is either something new or an enhancement

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Is your feature request related to a problem? Please describe

When involved in a spontaneous 1-on-1 with a customer I want to instantly view all journals notes (notes/paragraphs/todos) I took and tagged with said customer. So, I can view in chronologically the latest notes I took regarding this topic/customer/ect.

Describe the solution you'd like

In the preview if we could toggle the preview for all backlinks as well. The "backlink preview" should be anchored to the line were the "note link" is placed, upto the next heading or same level bullet. This is mainly a feature for the Journal pages, since seeing just the date in the backlink does not tell me any context, and I must jump into every day to see what I did there.

image

Describe alternatives you've considered

My current workaround is to use the Search Editor, I search [[note]] and I see all notes, the only small annoyance is that the "show lines" option in the Search Editor always shows the lines before and after. With more and more notes coming together the "before" lines clutter the interface since I just need the lines below the note/tag, preferably only show as many lines as are relevant to the paragraph.

Additional context

image

alex-ess commented 2 years ago

Hey, I just found another possible solution to for this implementation. There is a Dendron command "Insert Index". If the same would be available for Backlinks we would just need the option to set the ! as default and add an anchor option (eg #self;#* when ref in header or #^newblock when adding as bullet). Then the Backlink (footernote) would have to be updated for all new backlinks. This would also have another big advantage for future proofing, if for some reason we only have access to the black .md files you could still find all the back-refs in plain text.

image

jonathanyeung commented 2 years ago

Hey @alex-ess - thanks for the detailed suggestions. We've just been discussing internally a few similar ideas around improving the backlinks experience, so this comes at a good time!

To help me better understand your use case - are you more wanting to:

  1. Quickly understand the context of the backlinked document (i.e., why did I link from note foo to this note again?) - perhaps for the sake of trying to find some other note that has backlinked to the current one, but not remembering which of the 10 backlinked notes is the correct one.
  2. Display the backlink context in a static way in the preview (and/or editor) such that its sharable and readable in the current document.
  3. Both of the above
alex-ess commented 2 years ago

Hi @jonathanyeung, thanks for the reply. Great to hear that similar improvements are in discussion. I gladly help with fleshing out the use cases and provide some implementation solutions when possible. No 2 is reflecting my use case better. As seen in the attached example, all relevant tools/building blocks are already available in dendrons toolbox, only thing missing is a way to automate it. Maybe some formatting to shrink the whitespace to not bloat the preview too much. But other than that, I can build my requirement manually already.

I manually build a more detailed example with 2 Journal pages, see image. In this scenario, when I get a spontaneous call from [[valantic]], I could just open the main note in preview and can view the context of its backlinks.

image

jonathanyeung commented 2 years ago

Maybe some formatting to shrink the whitespace to not bloat the preview too much.

There's a setting that can alter how references get rendered, which may help with the bloat issue: https://wiki.dendron.so/notes/l4MoqPhFvcca6Vf5T84e0/#enableprettyrefs -> you can set pretty refs to false which should get rid of the outline.

alex-ess commented 2 years ago

Maybe some formatting to shrink the whitespace to not bloat the preview too much.

There's a setting that can alter how references get rendered, which may help with the bloat issue: https://wiki.dendron.so/notes/l4MoqPhFvcca6Vf5T84e0/#enableprettyrefs -> you can set pretty refs to false which should get rid of the outline.

Oh cool thx. It was just something that came to mind after I finished the example build and thought about the scaling when there are 20+ backlinks, so I haven't looked into it any further.

I have checked out the setting, it helps with the bloat only Con I see is that you also lose the "From xxx" and "Got to" linking. But this is no prio for this feature at all, it is just some tweaking options for the preview that we can keep in mind when the size of the backlink-preview gets overwhelming.