[ZeroBrane Studio] Re: Search redesign for ZBS

  • From: Derek Bailey <dbaileychess@xxxxxxxxx>
  • To: zerobrane <zerobrane@xxxxxxxxxxxxx>
  • Date: Fri, 27 Mar 2015 14:43:08 -0700

Hi Paul,

  Here are some my initial reactions to the find-in-files. I really like it
so far, I think the context display is a wonderful idea. I also like that
it is dialog-less, I think the integration is spot on.

   1. Is there any way to preserve syntax coloring in the Search Results
   editor? I don't know if this is possible if you are searching multiple
   different types of files though. Just a thought. But if most people use it
   as a Lua editor, it might make sense to leave it with the Lua syntax as
   default.
   2. Can there be an option to have the Search result Editor show up below
   near the 'Output' and 'Local Console' tabs? I feel like you can lose your
   context when you are searching and a new Editor pops up and replaces the
   editor you were working on.
   3. Live editing capabilities? If I edit a line in the Search Results
   editor could it be actively reflected in the actual source file?
   4. History capabilities. Like Notepad++ Find-in-files, it keeps track of
   all the searches you have done (http://i.imgur.com/DiFDwO9.png) and you
   are able to clear it with a context menu command. (oops, I just read that
   this is a work on progress, but I'll leave this here anyways)
   5. Is the number of lines displayed above and below the matched line a
   user-definable value?
   6. If you have a selected/highlighted on word in an editor, and hit
   'Ctrl-Shift-F', it should copy the highlighted word and put in the find
   textbox for you. This makes it much smoother to find stuff in my opinion.
   This can probably can be used in the find-replace context as well.
   7. Will the location of the find dialog be user-definable? Or will it
   always be at the bottom of the editor pane?
   8. Can the 'Show context' button refresh the results in real-time if it
   is toggled? This could be handy if you have a lot of results and quickly
   want to remove the context without researching.

 Bug:

   1.  If you click on the expand/collapse box in the Search Results too
   quickly (like within 1 second of a previous click) it will take you to the
   file. If you do it slower, it does what you expect: expand and collapse the
   block. I feel like it is too sensitiveness at the moment.

Great work!

Take Care,

    Derek



On Fri, Mar 27, 2015 at 1:58 PM, Paul K <dmarc-noreply@xxxxxxxxxxxxx> wrote:

> 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: