I’ve been working on search since the last Bike 2 preview release, but have been having a hard time settling on how it should work.
At one end of the spectrum you have TaskPaper style search… where your outline is filtered to only show matching rows and ancestors. Powerful, but it makes editing confusing, since sibling context is missing.
At the other end of the spectrum you have Find/Find Next style search… where no rows are hidden in your outline, instead matching rows are just highlighted. Easy to understand, but this makes it hard to see all your results together. A simple view of just your todos isn’t possible.
Another consideration is that search becomes a lot more useful once you have easy to access saved searches. Then search can be used more like navigation… go to this matched set of rows.
With those thoughts in mind here’s a mockup solution:
First in the sidebar there is a saved “Headings” search. The underlying outline path is //heading
and it shows live matches for that search in the sidebar under the search.
Here you can see direct matches in one place. Clicking on a match will reveal it in the outline editor where you can then edit it.
If you want to see the search results with more context you can also click on the “Headings” sidebar item. That will set the outline editor’s search to the saved //heading
search as shown in this second image.
The editor is folded to hide branches that don’t contain matches, but generally matching rows in the editor are shown in full context (Find/Find Next style).
A twist in this example is that Bike is scaling down non-matching rows. This is controlled by the stylesheet, an alternative would be to not use scale and instead highlight the matches in yellow.
The key point is that the full row context is always shown when editing. No rows are filtered out of the outline editor except when using standard folds.
At the moment I’m liking this design, but it only came together yesterday. Thoughts and feedback welcome.