Find Command Behavior

It looks like the Find command will only find strings in items that are expanded. It won’t find text in an item collapsed beneath a parent item. Is this by design?


It’s by “implementation” … meaning it was much simpler to implement this way (I just reuse the standard text view implementation)) and it does make some design sense. If the implementation was the same difficulty I’m not sure how I would design it. And in fact (in the next text editor component that I’m designing) the implementation is pretty much the same difficultly either way.

So nows a good time to lobby to change it! :slight_smile:

I think there is some value to the current design. It enables you to do find/replaces that wouldn’t be possible otherwise (i.e. find and replace only @done items, or some other filter search). While also not disallowing any find/replaces…since you could always just expand everything.

With that said I can also see the benefits of making find work on hidden items too.

As I’ve said before I’m also in the process of building in an optional library file browser. That brings up more search questions eventually. Might not get to it in first iteration, but eventually it would make sense to have options for:

  1. String search current document
  2. Item path filter current document
  3. String search all documents
  4. Item path filter search all documents

And any variations in-between. I’m quite a ways from building it all, but any thoughts/suggestions are welcome.

The fact that it doesn’t work on the entire document has saved my butt on more than one occasion — although as far as I recall, it’s mostly been in cases where I’ve focused in on a particular project, rather than had things collapsed where I didn’t want the child items find/replaced.

I can definitely see the value in doing find/replace on the children of collapsed items, but I wouldn’t want to lose the ability to focus in on a project and only do find/replace within that project. (For example, if I want to replace all due dates within a specific project without changing due dates in the rest of the document.)

As long as I understand the behavior, I guess I don’t really have an opinion as to whether find should include hidden items. It’s easy enough to expand the entire document.