[ZeroBrane Studio] Search redesign for ZBS

  • From: "Paul K" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "paulclinger@xxxxxxxxx" for DMARC)
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Fri, 27 Mar 2015 13:58:08 -0700

Hi All,

I've been working on the redesign of the search functionality in ZBS
and am looking for feedback on its current implementation
(search-redesign branch in the project repository on github). Some of
you have already seen the changes and provided their comments (thank
you!), but there are some changes to the find/replace-in-files
functionality that were only recently made available.

For those new to the changes, here is the rationale for the redesign
(the detailed notes are in the ticket
https://github.com/pkulchenko/ZeroBraneStudio/issues/416):

1) make the UI more similar in style to the rest of the application,
which has changed significantly while the search/replace dialog stayed
the same,
2) preserve the existing functionality and extend/improve it in several ways,
3) make the dialog simpler and more compact,
4) add incremental search,
5) show find-in-files results in an editor tab, and
6) add preview for replace-in-files.

All these items have been implemented. The main change is in how the
find-in-files results are presented and in how the replace-in-files is
done. The search results are presented in a separate tab with the list
of files, the match lines and their context (the context can be turned
off with the Context button on the toolbar). All the matches are
indicated by red boxes (the color and the indicator can be changed in
the configuration settings). You can also use Fold Some/All (F12) to
collapse the matched lines and see only files. Double-click will open
a file on that line as before. Status updates have also moved to the
search toolbar, which makes all search-related information available
in one place.

The replacement is done this way: when you trigger replace-in-files
(by using the toolbar icon or hitting Enter in the Replace field), you
get the list of results in a tab, with all the replacements already
made (and marked with red borders). You can then review the changes
and "save" (Ctrl-S) the tab, which will apply those changes to the
files. If you don't like some of the changes, you can update them
right in the preview: whatever the content of matched lines (marked
with ':') is, will be stored in the file. If you remove the matched
line, it won't be saved. The context lines are checked before saving,
which avoids the situation of putting wrong content in a file that has
been externally modified.

There are several things that are still being worked on:
1) saving settings between IDE restarts
2) making history of search/replace text available via text
suggestions or up/down arrow keys (this is to replace dropdowns that
have been removed).
3) find/replace in selection.

You can get the current branch by cloning the repository and then
doing "get checkout search-redesign". If you already have it cloned,
then do "get fetch origin; git checkout search-redesign". If you
prefer to get the code directly, you can download the current snapshot
here: https://github.com/pkulchenko/ZeroBraneStudio/archive/search-redesign.zip

I plan on merging the changes into master in 2-3 days and am
interested in feedback on using the new search functionality with your
files and use cases. What's working or not working and what can be
improved? Thank you.

Paul.

Other related posts: