Upcoming Sigil Find Replace User Interface Changes
To conserve screen real-estate for those users still using lower resolution monitors and laptops, we redesigned the Find Replace dialog to minimize its width as that in turn determines the minimum width of CodeView and the resulting width of the main window. This involved moving the advanced Regex options into their own menu, replacing the text based buttons with universal icons, and re-ordering rows. In many languages the old text based buttons and advanced options names took up considerable and precious space.
This change to use icons on buttons in turn freed up enough space to allow a new "Text" checkbox be added that when checked will limit the search to text outside of xhtml tags (one of our heavily requested features).
See Attached: FindReplace-Dialog.png
The screenshot above shows the new layout with the new Text checkbox. The next image shows how to access the Advanced Regex checkable menu options:
See Attached: FindReplace-Adv-Options.png
The meaning of each new icon is explained below. In addition, the way to launch two new additional FindReplace tools: "Dry-Run Replace All" and the "Filter Replacements" are also shown. Tooltips have been fully updated in case the user ever has any doubts.
Filter Replacements (Delete Unwanted Matches)
This tool helps users use Find and Replace All more effectively. It lists all of the matches found in context and shows their replacement in that same context. The amount of context both before and after a match (in characters) can be controlled by the user.
See Attached: Filter Replacements.png
If the user sees a match that is unwanted - i.e. they do not want that replacement to be made, they can select that match's row in the table and use the delete key or select delete on the pop-up menu to remove it. When all unwanted matches have been found and deleted, the user can then use the "Apply Changes" button to have just the changes remaining in the table made. This tool can by launched by Shift clicking on the Replace-All button.
Dry-Run Replace All
Often when crafting regular expression for Find and Replace, it is difficult to know if your find string will properly detect the cases you want while excluding the cases you do not want. This table shows the results of a trial dry-run of your current find and replace terms in context. No actual replacements/changes are ever made. Similar to the earlier dialog, the amount of context both before and after a match (in characters) can be controlled by the user. This tool can by launched by Shift clicking on the Count-All button.
See Attached: Dry-Run-Replace-Dialog.png
This allows the user to safely experiment with their search terms to see which if any would be most effective. Any row in the table can be double-clicked and the exact context for that particular match will be brought up in CodeView for the user to examine in more detail or to edit. This way a user can verify that a find replace all sequence will do exactly what they expect it to do. If the user makes changes to the underlying text that will impact the table, the user can click on the "Refresh" button at any time to force the table to be rebuilt.
Notes
Before anyone gets in an uproar over these changes, please note that these buttons are svg files that can be completely replaced and controlled by the user by using their own Sigil custom theme. This includes the ability to put back the buttons using text inside the svg for their chosen language. See Sigil IconThemes repo on GitHub for details on how to custom theme the icons used by Sigil. Versions of these icons suitable for those who prefer the fluent or material themes have already been made and included.
Special Thanks
A very special **Thank You** goes to our own BeckyEbook for designing and creating all of these new icons in versions suitable for main, fluent, and material themes and donating them to Sigil. Her many and varied contributions to Sigil has helped Sigil immensely and is greatly appreciated.
Also a big "Thank You" goes to our own Doitsu for all of his testing and feedback of these interface changes.