joplin-plugin-metis icon indicating copy to clipboard operation
joplin-plugin-metis copied to clipboard

Substring project filtering

Open Petemir opened this issue 3 years ago • 3 comments

Hello, first of all, thank you for the great plugin, I find it really nice.

I wanted to check the possibility of adding a feature, plus reporting a minor aesthetic bug.

Feature: I wanted to check the possibility of filtering projects by substring. I usually use a dot to separate project from subproject, e.g. +p.sp. Right now, if I try to filter filter:project:p, the task doesn't appear on my list. This could be solved if I add also +p, but I guess it would end being too cluttered.

Visual bug: On the other hand, currently using it like this anyway, I've noticed that the highlighting in the "Viewer" view goes until the end of the string (i.e. the sp), whereas in the editor view it just stops at the dot.

image

Thanks!

Petemir avatar Feb 11 '22 07:02 Petemir

The visual bug is the same as #3, and will be improved in the next update.

The substring filter, in the other hands, will unlikely be implemented as I want the filter to be exact match. If we allow fuzzy logic then there is no going back as you longer can match "+p" only anymore, a regex based matching is too complex, so it is not an option either.

That being said, there is a "Quick Search" feature in my backlog, which basically a secondary filter that will match with fuzzy logic and may work for your case. It is not very high in my priority at the moment though.

hieuthi avatar Feb 12 '22 01:02 hieuthi

Understood, thanks :).

On the other hand, is there a reason why whitespaces at the beginning of each line are trimmed in the display view? I find them useful as a way to visually represent subprojects / dependency between tasks.

Petemir avatar Feb 22 '22 07:02 Petemir

It is not a usage supported by Todo.txt specification. Moreover, the dependency will be lost when you sort or filter, so I don't want to endorse that setup.

hieuthi avatar Feb 22 '22 12:02 hieuthi