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 Function #2574

Closed
4 tasks done
702573N opened this issue Jan 12, 2024 · 10 comments
Closed
4 tasks done

Backlinks Function #2574

702573N opened this issue Jan 12, 2024 · 10 comments
Labels
question Further information is requested scope: backlinks Anything to do with the backlinks displayed in task lists type: enhancement New feature or request

Comments

@702573N
Copy link

702573N commented Jan 12, 2024

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

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.
  • I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
  • I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description

I would like to have more options on showing backlinks. For now there is only the option to show or hide. There is no way to only show the filename, or show only the heading, or changing the complete label string. Some manipulations are possible by using css, but this doesn't allow complex manipulations such as custom regex manipulations of the string.

✔️ Solution

I would like to give the backlinks a function parameter to manipulate the backlink label string (not the linked url itself). For example:

backlink by function match (.\W>\W(.))|((.*))

OR

backlink hide filename

OR

backlink hide header

❓ Alternatives

No response

📝 Additional Context

No response

@702573N 702573N added the type: enhancement New feature or request label Jan 12, 2024
@claremacrae
Copy link
Collaborator

Thanks for the suggestion.

I understand what you wish to do, but I would also like to understand why.

Could you please say what the benefit of this is, to help in prioritising?

Also, could you give an example of what that regular expression does? Thank you.

@claremacrae claremacrae added scope: backlinks Anything to do with the backlinks displayed in task lists question Further information is requested labels Jan 12, 2024
@claremacrae
Copy link
Collaborator

Thanks for the suggestion.

I understand what you wish to do, but I would also like to understand why.

Could you please say what the benefit of this is, to help in prioritising?

Also, could you give an example of what that regular expression does? Thank you.

Closing as no reply...

@claremacrae claremacrae closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@Rudtrack
Copy link

I would like the same feature @claremacrae! For me at least, the reason is to reduce the amount of space the backlink takes up in the query result, but still being able to easily see which note the task is located in.

My use case is admittedly very specific as I use the name of the file to create a hierarchy. This naming convention can sometimes lead to long file names, so having the header in the backlink makes it take up too much space for my liking.

Example file name: a.dev.csharp.access-modifier.protected

@claremacrae
Copy link
Collaborator

Hi @Rudtrack, thanks for the comment. I still don’t understand what exactly the request is.

Given the file name you quoted, what would you propose to make your custom backlink say?

Also, have you tried the existing options?
https://publish.obsidian.md/tasks/How+To/How+to+style+backlinks

@Rudtrack
Copy link

In an ideal world, I would like it to display a YAML field. For example display the text in a title YAML field. But that is so extremely specific to my use case, so that is something I could try to tinker with myself at some point.

The request here is to give the ability to turn off the header being displayed in the backlink.

So 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.

@claremacrae
Copy link
Collaborator

Thanks, but what does "display a YAML field?" mean? Can you give us an example?
And what would the result look like.

The request here is to give the ability to turn off the header being displayed in the backlink.

Ah right - that is something that is nicely clear and specific, unlike this one, which is requesting a function - rather more work.

I was going to ask how that would differ from group by filename then realised that:

  • group by backlink links to the task line
  • group by filename links to the file

@Rudtrack
Copy link

With YAML, I mean the frontmatter of the file, or what Obsidian now calls Properties. So instead of displaying the file name in the backlink, it would rather display what's typed into title in this example

bilde

bilde

In the example, the backlink would look like this: Protected, instead of a.dev.csharp.access-modifier.protected. The properties name would of course have to be user-configurable, as not everyone would use title exactly.


But like I said, that is far beyond the scope of this issue, but I could create a new issue and better documentation for that feature if you'd like

@claremacrae
Copy link
Collaborator

Hi again @Rudtrack,
I just looked through all the Issues and Discussions labelled scope: backlinks and didn't find any specifically referencing just hiding the heading - so feel free to make a Feature Request to that.

  • Do give all the info you gave here, so that that one is standalone...
  • Do add a link here to the new ticket.

Thanks in advance.

@claremacrae
Copy link
Collaborator

With YAML, I mean the frontmatter of the file, or what Obsidian now calls Properties. So instead of displaying the file name in the backlink, it would rather display what's typed into title in this example

bilde

bilde

In the example, the backlink would look like this: Protected, instead of a.dev.csharp.access-modifier.protected. The properties name would of course have to be user-configurable, as not everyone would use title exactly.

But like I said, that is far beyond the scope of this issue, but I could create a new issue and better documentation for that feature if you'd like

Ah right, I see. It's clear now, and an interesting idea. Thanks for explaining it.

@Rudtrack
Copy link

New issue created for the feature I described: #2923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested scope: backlinks Anything to do with the backlinks displayed in task lists type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants