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

Preview on task hover

Open NomarCub opened this issue 3 years ago • 13 comments

This was a really convenient feature in 0.4.22 and I'd like it back. Ideally I'd like the link icon. But if the new design is firmly something else preview on Ctrl + hover is still an intuitive option. If I recall correctly the preview used to be of the nearest heading in the hierarchy, not the whole note.

NomarCub avatar Jun 04 '22 11:06 NomarCub

Yes, the preview effect is gone. But the link icon is unnecessary to actual behavior, because if you click in the task text you jump directly to the place of the task.

mnvwvnm avatar Jun 04 '22 23:06 mnvwvnm

I will have to see if it is possible to replicate/steal the hover preview functionality; if not, I'll just add an option for an explicit link.

blacksmithgu avatar Jun 05 '22 03:06 blacksmithgu

Could there be a query or piece of dataviewjs code I can write that approximates this effect? As in, listing tasks and also another field with a link to the heading/section the task is in?

NomarCub avatar Jun 17 '22 19:06 NomarCub

hmm, you can group by sections, but the result can be confused...

mnvwvnm avatar Jun 17 '22 21:06 mnvwvnm

This was a really convenient feature in 0.4.22 and I'd like it back. Ideally I'd like the link icon. But if the new design is firmly something else preview on Ctrl + hover is still an intuitive option. If I recall correctly the preview used to be of the nearest heading in the hierarchy, not the whole note.

I find this feature very useful as well. I use it almost every day when using 0.4.22 until a few days ago.

This feature can be used during, for example, weekly review where one can hover to go to the original task location and check sub-tasks, notes, etc. After this is done, one can continue reviewing the query results and do the same for other tasks.

It would be great if this feature can be somehow added back!

wenlzhang avatar Jun 19 '22 15:06 wenlzhang

With version 0.5, one can click and go to the specific line of the original task. It would be even better if this can be combined with the hover feature. That is, one click Cmd/Ctrl and then it would open the note in a hover editor and go to the specific line of the task.

But the link icon is unnecessary to actual behavior, because if you click in the task text you jump directly to the place of the task.

As for link icons, an alternative solution would be to add a link icon if the original task has a block link at the end. Otherwise, there is no link icon.

wenlzhang avatar Jun 19 '22 16:06 wenlzhang

The hover behavior was actually Obsidian's native behavior. I suspect if you add a Link by modifying task text, it'll achieve the same thing.

AB1908 avatar Jun 19 '22 16:06 AB1908

I suspect if you add a Link by modifying task text, it'll achieve the same thing.

Do you mean one can achieve this by using the implicit field link for tasks? Can you elaborate how to add a link, e.g., block link, to the end of the task text? Maybe this way all tasks would have a link at the end and one can hover to go to the original task location.

wenlzhang avatar Jun 19 '22 16:06 wenlzhang

But modifying task text we get stuck in an older issue: the loss of interactivity with the original task, i.e., the check/uncheck is reduced to a visual effect without consequence in the original task.

mnvwvnm avatar Jun 19 '22 16:06 mnvwvnm

You can use the visual field on tasks to override the visual representation of the task while still being able to modify it.

blacksmithgu avatar Jun 19 '22 20:06 blacksmithgu

visual field? 😳 sorry for my ignorance, what's field is that?

mnvwvnm avatar Jun 19 '22 21:06 mnvwvnm

Thanks @mnvwvnm, GROUP BY section and GROUP BY link works pretty well for what I wanted! That said, I didn't know this option existed and what it meant from the docs. Is there any documentation on all the ways you can GROUP BY? Also, is this visual field a dataviewJs thing, @blacksmithgu?

NomarCub avatar Jul 19 '22 16:07 NomarCub

visual is part of DVJS since it's a task attribute. The idea behind group by is really to group things, just as in SQL.

AB1908 avatar Jul 19 '22 19:07 AB1908

The issue is kinda old, and the group bys solved my underlying issue. I can reopen if there's still demand for this.

NomarCub avatar Mar 20 '24 21:03 NomarCub