feat: add file search functionality in file-tree widget#577
Conversation
|
I'm not sure I understand what you're trying to do here. Your changes make searching in the file tree identical to searching in the file finder (except that it flickers a lot for some reason). Why go to all that trouble to just duplicate the existing UI instead of just using the file finder palette? |
|
I have been using flow for some time now and always find myself trying to look for files from the file tree directly, since I find it gives a better overview of project (specially useful when navigating others' projects that you are not 100% familiar with). That the file tree palette can only find nodes that are currently visible certainly does not make much sense to me. I agree with the functionality duplication and flickering. Maybe a better way is to adapt the search so that both palettes use the same or similar back-end? What do you think? |
|
I agree that the current filter logic (filtering only already open dirs) is not too useful. I think the best option would probably be to filter just on file name (not path) and auto open dirs with matches. Filtering just on file name will likely force us to use a seperate project manager request, but that is fine. |
|
Perhaps just adding a flag on the existing query might be enough to share it. |
Btw, the flicker is likely because you clear the palette too soon. If you clear the palette when sending a query (or even when receiving the first result), you can end up visualizing the query response time if it takes more than one frame (around 6ms on my monitor, 16 on most). If you wait until the new query results are fully available before re-filling the palette with the new results, then the flicker should go away. |
Hi there!
I just added file search capabilities to the file tree widget. Before, it was only possible to look for files that were shown in the tree, now it searches the whole project and auto opens/collapses folders in the tree. Just a small QoL improvement.
Cheers!
Miguel