icanzilb / Breadcrumbs

Bugtracker working off source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature request – filter/search by actual tags as opposed to just text search

mgrider opened this issue · comments

First of all, LOVE the idea of this project. I've already found it to be useful, even though it's not much more than a couple of full-project searches at this point.

This issue started out being about my first thought and wishlist for the project, which was that it would be nice to be able to filter the TODO items by whether or not they appear in files with tests in them. I still think this is a nice idea, and I can imagine a few ways to achieve it. But I began with naively adding the following to Crumb's init:

        if location.fileURL.absoluteString.contains("Test") {
            self.tags.append(.init(text: "Tests"))
        }

This seemed to work great for a second, because any TODO in a file that contains Test somewhere in the filename did indeed have a new tag called "Tests", but I'll bet you know what I discovered next! Sure enough, clicking on that tag in the detail view didn't actually find all the items with that tag.

Eventually, I figured out the search is just plaintext filter on the raw string property of the Crumb.

Even if I went through and just manually added #tests to all my TODOs in test files, there's no way at present to filter results that do not contain the #tests tag, which is really what I'm trying to do.

So I guess that's the issue here: it would be nice if there were a way to reverse a search, or search for things that do not have a specific tag. (But I could imagine wanting to do any kind of exclusionary search.)

So, related to this, I didn't actually use tags in my TODOs before this, but decided to try some out, and discovered you cannot name tags with hyphens or underscores in them (e.g. #my-tag-name and #my_tag_name both become just #my). This is probably no big deal, but I did go in to "fix" this issue, and found the priority system making it a more complicated issue. Probably this is just a convention you use, but would be nice to see some documentation around that, maybe in the project README.

I can imagine so many other feature additions and suggestions for this project! (Integration with Trello would be neat – but probably Github Issues would be easier.)

Wow, a lot of useful feedback, thanks :) I'm starting to wonder if that project really deserves its own organization if there'd be folks willing to turn it into a real app...