Michael Lotz wrote: > Hi There > > Since I've implemented filtering in Tracker.NewFS back then I've become > severely dependent on this feature. I'm always a bit lost when I want to > navigate my music, mails and other such collections under Haiku, because > I usually keep them all in one folder and then use filtering to get to > where I want. > > The implementation in Tracker.NewFS was pretty simple and only took the > filename into account, but it was enough (depends on your file naming > schema). Since working on the typeahead feature recently I wanted to > extend that into typeahead filtering that would be full fledged filtering > based on all visible attributes. > > Therefore I have prepared the attached patch that takes more or less the > same approach I took for Tracker.NewFS, reusing the VSPoseList that > stores the visible poses in icon mode, but is completely unused in list > mode. The patch changes list mode to also use the VSPoseList which then > contains the filter result. > > I'm not checking this in directly, because it is a rather extensive patch > and also brings a few usability concerns I'm not really sure how to best > move forward with. I would be glad if some of you could apply and test > this patch and give some feedback. > > Usage: Filtering can either be turned "always on" through the preference > "Always Filter in Typeahead Search" under "Window" (defaults to off), or > filtering mode can be entered through a key. When filtering is always on, > starting a typeahead search automatically filters instead of selecting > the best match. If automatic filtering is not activated one has to press > (the arbitrarily choosen) "*" (asterisk) key to enter filtering mode and > then just type ahead to start filtering. I've modified the count view to > also show the count when filtering, to give feedback as to how many > entries still match. > > Filtering mode is not left automatically in the way normal typeahead is > but stays on until you either press escape or remove all characters from > the typeahead buffer by backspace. This is to allow apps that communicate > with Tracker to make use of the filtering feature. You could for example > filter for a certain set of mails and then use the next/previous buttons > in mail to navigate only this filtered set. > > I've found that a pretty intuitive way of working, but I'd really like to > hear from others as well. So please feel invited to test and comment. If > we can agree that we want this feature and the implementation is > reasonable for now, I would like to go ahead and commit this patch. I just tried it and I think the feature is pretty neat. The flow of it is nice, how you can press * within the timeout of using the normal type ahead. That the info view keeps displaying the typing is nice too, but as the only visual indication, it may be a bit too easy to miss. On the other hand it's pretty hard to enter filtering by accident. I like the "Action" section in Ubuntu/Nautilus. If we had something like that we could use it here ("Exit Filtering" button). That all being said, I can understand Alexandre's concerns about not messing too much with Tracker before the refactoring. If it were for me, I would not have anything against the feature, I think it's nicely done, although you have to know it's there in the first place. Maybe I need to use it a few more days to become emotional about it... :-) BTW, I just noticed a bug with normal type-ahead: If you hit a pose which is already selected, then it isn't scrolled into view if it's outside. Best regards, -Stephan