anki-hierarchical-tags icon indicating copy to clipboard operation
anki-hierarchical-tags copied to clipboard

Do not create unnecessary stars at filter's end

Open ankitest opened this issue 8 years ago • 1 comments

Known Issues

When clicking on a tag in the hierarchy, an asterisk is added to the search term. The effect of that is that all notes with that tag and all subtags are searched for.

But a side-effect is, that all tags with the same prefix are matched. For example if you have a tag it and a tag italian, clicking on the tag it would also show content from italian. Let me know if this affects you and I'll try to work around this.

It is total disaster for me. I have tags Lektion1, Lektion2, ... Lektion10, Lektion11, ... When I click Lektion1 then I see common list for Lektion1, Lektion10, ...

Yes, I know, I can use label Lektion01, but it is temporary workaround, it is not a solution. THE solution is here: add ::* only on middle tiers.

ankitest avatar May 04 '16 07:05 ankitest

There seem to be two small issues with this fix:

  1. If both tags language::java and language::java::streams exist, then the search bar representation of the tag does not include the desired ::*. This omission is a result of this line of code, sorting the array of tags alphabetically. When iterating through the array, the language::java tag is encountered first, java is calculated to be the tertiary tag tier, and the tree is updated with a search query without a ::*. Later, when language::java::streams is processed, the'language::java tree entry already exists, so nothing is updated. Reversing the iteration order could fix this issue, but not the following one:

  2. Regardless of whether language::java or language::java::* is used, neither query is able to capture both cards with the clicked-on tag as well as all subtags. The solution that I have found is to write a query like language::java or language::java::*. As soon as I submit a pull request I will link to it here.

neillrobson avatar Jan 05 '17 17:01 neillrobson