snezhig/obsidian-front-matter-title

Duplicated entries in Quick Switcher.

amariusz opened this issue · 6 comments

When I search for a file with title attribute in Quick Switcher I'd expect one entry for file and one for alias. Instead there are two entries with the same contents.

Looking for part of title:

230811_132849_fmt_search_by_name

Looking for part of file name:
230811_133817_search_by_id
In the screenshot above you can observe that part of the title string is highlighted although I'm searching for different text - part of ID.

BTW. Thank you very much for this plugin. What a brilliant idea!

Edit:
Current behaviour is a little bit confusing and not consistent with how Obsidian search for aliases work but has a benefit of showing title at all times. So maybe it's a feature? :)

Plugins Quick Switcher Feature is the most strange and difficult feature with some side-effects.
I think about how to make it more understandable.

About your problem. When you type anything in QuickSwitcher the plugin try to replace filenames with aliases, but the application keeps bold part than makes them to seem strange and confusing, The only idea a have is try to remove highlighting.

It seems to me there are three options:

  1. Don't replace filename with title for the second entry - that would be similar to how Obsidian presents regular aliases.
  2. Remove highlighting only for incorrect entries. In general highlighting is very useful.
  3. Leave it as it is for now - this is rather minor issue.

Thanks!

@amariusz Can you give me your plugin feature settings with templates? And a document example. I think there is an another problem with duplicates
I guess you have the "Adjust" strategy for the "Alias" feature and is the cause of duplication.

Sure. I think you should be able to recreate scenario from screenshots with following files:

data.zip
230811_132444-file-name-testing.md

@amariusz I got the problem, okay. It will be fixed.

Thanks! There's only one entry now if alias setting is kept with default value.