obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Preview when hovering over backlinks no longer works as of ver 3.4.0 or later

Open gypsyav opened this issue 1 year ago • 15 comments

Please check that this issue hasn't been reported before.

  • [X] I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

When hovering over a link in a task query it should show a preview window when the core plugin Page Preview is enabled.

Current behaviour

Previews do not show up.

Steps to reproduce

  1. Create a new, empty vault
  2. Add and enable Tasks, from the Community Plugins store
    • The bug appears from Tasks 3.4.0 onwards, but just download the current version, as normal (so long as this issue is still open)
  3. Create a new file called File 1
  4. Add the following content to File 1
# File 1

- [ ] Task in File 1

  1. Create a new file called File 2
  2. Add the following content to File 2
# File 2

[[File 1]] - hovering over this link should preview the contents of `File 1`.

```tasks
```

  1. In File 2, hover over the link to File 1, and confirm that you can see a preview of File 1's contents.
  2. In File 2, hover over the backlink in the Task query block results, and confirm that there is no preview of File 1 shown.

Which Operating Systems are you using?

  • [ ] Android
  • [ ] iPhone/iPad
  • [X] Linux
  • [ ] macOS
  • [ ] Windows

Obsidian Version

1.3.5

Tasks Plugin Version

10.2.0

Checks

  • [X] I have tried it with all other plugins disabled and the error still occurs

Possible solution

This bug was introduced in ver 3.4.0

Backlink previews work correctly in ver 3.3.0 and before

gypsyav avatar Jul 14 '23 19:07 gypsyav

Hi, thanks for logging it - please could there be a complete numbered list of steps in the reproduction, starting from 'empty vault, with just Tasks installed'....

claremacrae avatar Jul 14 '23 19:07 claremacrae

I updated the steps above, though I'm not sure if that's what you wanted.

gypsyav avatar Jul 15 '23 18:07 gypsyav

I updated the steps above, though I'm not sure if that's what you wanted.

Thanks - is the core plugin enabled by default, and with its settings not needing to be updated for hovering to just work?

claremacrae avatar Jul 15 '23 18:07 claremacrae

In my test vault the Page Preview core plugin was enabled by default and the settings for it require pressing the ctrl/cmd key while hovering for everything except reading mode. Reading mode shows the preview just by hovering over the link.

gypsyav avatar Jul 15 '23 18:07 gypsyav

Brilliant - thanks!

claremacrae avatar Jul 15 '23 18:07 claremacrae

I’ve tested the repro, confirmed it does of course show the bug, and tweaked it a bit for ease of use.

claremacrae avatar Jul 16 '23 20:07 claremacrae

Thank you @gypsyav for bringing this up. I'm also dearly missing the preview in my Tasks workflow. I hope it will get resolved soon. Anyway, thank you so much for this wonderful plugin @claremacrae!

datoner avatar Aug 18 '23 07:08 datoner

@datoner best to upvote it with a 👍 then.

claremacrae avatar Aug 18 '23 08:08 claremacrae

It's not exactly a fix, but in case it helps... Tasks 4.8.0, just released, now adds hyperlinks on group by backlinks headings... and hovering over those does show hover previews.

claremacrae avatar Sep 26 '23 20:09 claremacrae

I still prefer the previous backlinks, which can be presented directly at the end of the task.I hope it can be resolved. Thank you

Fendi168 avatar Nov 08 '23 02:11 Fendi168

I created a workaround by adding my own backlink to the task description or using a backlink as a task description. I then use 'hide backlink' to hide the non functional one to keep it short and neat.

Op wo 8 nov. 2023 03:29 schreef Fendi168 @.***>:

I still prefer the previous backlinks, which can be presented directly at the end of the task.I hope it can be resolved. Thank you

— Reply to this email directly, view it on GitHub https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2127#issuecomment-1800910272, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB7YEHNQ3RL2M6SRLJ5NFJTYDLVBVAVCNFSM6AAAAAA2KV6HTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHEYTAMRXGI . You are receiving this because you were mentioned.Message ID: @.***>

datoner avatar Nov 08 '23 06:11 datoner

@datoner,

I created a workaround by adding my own backlink to the task description or using a backlink as a task description. I then use 'hide backlink' to hide the non functional one to keep it short and neat.

How did you do that?

claremacrae avatar Nov 15 '23 15:11 claremacrae

I guess the changes to QueryRenderer.ts in b97e103ed611fb578d2cd0e45dfa3e2a87acc55c are responsible?

wjagers avatar Nov 22 '23 15:11 wjagers

I guess the changes to QueryRenderer.ts in b97e103 are responsible?

Yes that's right. That's the code from #1810, which fixed the following:

  • https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1618.

claremacrae avatar Nov 22 '23 16:11 claremacrae

@wjagers If it's something you might be interesting in having a look at, I'd be happy to chat with you and show you the relevant bits of the code...

claremacrae avatar Nov 22 '23 22:11 claremacrae