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

Do not create unnecessary stars at filter's end #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Do not create unnecessary stars at filter's end #5

wants to merge 2 commits into from

Conversation

ankitest
Copy link

@ankitest ankitest commented May 4, 2016

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.

> ## 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*, *Lektion11*, ...

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.
Do not create unnecessary stars at filter's end
@neillrobson
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants