WIP: Improve Find in files functionality

The goal of this PR is to improve the Find in files functionality as described in #941 (closed). Currently it's still a work-in-progress branch, but the basic idea is there.

  • It can only be triggered by right-clicking items in the sidebar
  • Searches keep piling up in the bottom panel, e.g.

I've addressed these points by adding the "results" panel in the editor utilities by default. Any subsequent searches replace the current one in the panel.

  • The destructive red color for replace feels a bit odd

I personally feel this is okay, definitely now that I've also added the blue find button above it.

  • There's no project-wide version of this (which is probably the main use case for this anyway)

As mentioned in the issue as well, this can be done by opening the popover on the "Files" part in the sidebar. I think this is fine for now. Though I could imagine adding some kind of "scope" input on the panel as well.

  • The UI for starting the search is a bit awkward in the popover on the side
  • There's no way to change the search query after searching. This makes multiple successive project-wide search/replace operations quite awkward

I personally don't mind keeping the popover as it provides a way of narrowing down your search results based on directory, which currently doesn't exist in the panel itself. The panel provides a way to change the query after searching.

I'm aware there was some discussion in #1419 (closed) about some kind of global search, and while I think that would be great to have I don't think the discussion settled on anything concrete yet. So in the mean time we can at least improve the find in files functionality until we find a good way to also integrate that in a global search.

cc @bertob, @blackjackshellac

Merge request reports