obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.24k stars 223 forks source link

Optionally hide the heading (or filename or both) from Backlinks in queries, to show only the filename #2923

Open Rudtrack opened 2 weeks ago

Rudtrack commented 2 weeks ago

⚠️ Please check that this feature request hasn't been suggested before.

πŸ”– Feature description

The ability to turn off the header being displayed in the backlink.

βœ”οΈ Solution

Instead of the backlink being displayed as it currently is: a.dev.csharp.access-modifier.protected > Recurring Tasks, I would love only display the file name a.dev.csharp.access-modifier.protected and not the header the task is located under.

❓ Alternatives

I've hidden backlinks and tried short mode. Both of these partly solve the problem, but I would like to have the file name visible and clickable for each task

πŸ“ Additional Context

If you have long file names, it can become a bit unweildly to also have the header being displayed in the query. Being able to turn of the header in the backlink could reduce the amount of space the backlink takes up, but still provide context to where the task is located

claremacrae commented 2 weeks ago

Thanks!

claremacrae commented 1 week ago

We already have the instruction:

hide backlink
show backlink

These also work, as the parsing

hide backlinks
show backlinks

Proposal

So one way of implementing this would be to provide these - so users could hide either component of the backlink, whilst still having something that jumps to the exact task line

hide backlink heading
hide backlink filename
show backlink heading
show backlink filename

Complications

It will need to also work with this:

hide backlinks heading
hide backlinks filename
show backlinks heading
show backlinks filename

I suggest that if the user hides both, then it displays the link icon, just as if short mode were enabled:

image

claremacrae commented 1 week ago

The following documentation pages would need to be updated:

They should also mention that these options will have no effect in short mode.