pjeby / tag-wrangler

Rename, merge, toggle, and search tags from the Obsidian tag pane

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Respect behavior of No Dupe Leaves plugin (if present) when navigating to tag pages

pm64 opened this issue · comments

commented

The excellent https://github.com/scambier/obsidian-no-dupe-leaves plugin affects Obsidian's behavior with respect to clicked links, by making it more IDE-like instead of browser-like. If the linked note is already open in some tab, that tab is activated. Otherwise, the note is opened in a new tab.

I noticed the equally excellent tag-wrangler has a great feature where the user can Alt-click on a tag to navigate to the corresponding tag page. I was hopeful it would automatically work with No Dupe Leaves, since that plugin "overwrites the public function openLinkText(), which is called when you click on a link in a note".

But it doesn't work out that way. Alt-clicking a tag always opens the corresponding tag page in the current tab.

I open this issue in hopes of closing this gap, to enhance the experience for users that have adopted both plugins.

That's because this plugin uses openFile() on the target leaf, not openLinkText().

It seems to me that's more a limitation of No Dupe Leaves, though, since Tag Wrangler is hardly the only plugin that uses openFile(), which is the natural API of choice when you already have a file, rather than a link. So the Recent Files plugin uses it, and even Obsidian's built-in file explorer uses it, which means that neither of those would work correctly with No Dupe Leaves either.