![]() |
#1 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,889
Karma: 4526138
Join Date: Nov 2009
Device: many
|
Head's Up: Upcoming Find Replace User Interface Changes
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. Last edited by KevinH; 05-05-2022 at 09:44 AM. Reason: minor fixups |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,672
Karma: 50388804
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Fantastic
Will there be balloon help if you hover over those buttons? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,889
Karma: 4526138
Join Date: Nov 2009
Device: many
|
Yes the Qt equivalent, called Tooltips will pop-up if you hover the mouse over a button explaining what it is/does.
Last edited by KevinH; 05-05-2022 at 11:29 AM. |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,672
Karma: 50388804
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#5 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 456
Karma: 2146264
Join Date: Nov 2015
Device: none
|
While you're there, could you add the "Count All" function?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,193
Karma: 118274943
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,889
Karma: 4526138
Join Date: Nov 2009
Device: many
|
Yes Count (#) is always Count All for whatever target files you specified.
There was already an earlier test version with pieces of all of this but without the gui changes so I won't probably make another test release given the new dialogs themselves have already been extensively tested. |
![]() |
![]() |
![]() |
#8 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 353
Karma: 112280
Join Date: Dec 2017
Device: Kobo
|
I recommend that the Replace All and Count All tooltips contain an indication of the quick shortcut (Shift+click) for alternative use with the new tool (although they will still be accessible via the "Search" menu and their custom shortcut which are a totally different system)
Notepad++ user, if I reworked the "Search and Replace" area, I would have liked a totally independent pop-up window that would have allowed a greater freedom of button placement, or even kept the text version of the button, but Oh well, too late for that and then detail. In any case, this Filter Replacements will be very interesting, thanks you. Last edited by un_pogaz; 05-05-2022 at 05:43 PM. |
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,889
Karma: 4526138
Join Date: Nov 2009
Device: many
|
The Sigil menubar Search menu supports these new tools and allows users to assign keyboard shortcuts for them as well. The Tooltips do indicate both the button function and any Shift+ variants that exist.
Embedding Find and Replace into the Main Window has advantages for easier automatic focus shifts to and from CodeView so that will not be changing, especially give how external windows can get lost easily on laptops. |
![]() |
![]() |
![]() |
#10 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,510
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
>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
That's a great benefit, thank you! |
![]() |
![]() |
![]() |
#11 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
|
Am I understanding correctly that the only way to get the text back on the search buttons is to create svg icons with the text and then compile my own rcc file?
All the new changes are wonderful (especially the restrict to text within tags). But a good way to know that icons may not be the best solution is if you have to make a chart explaining what they are in addition to needing tool tips. That said, I understand the decision. Perhaps the legacy group of icons should have svg text icons for the search. |
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,889
Karma: 4526138
Join Date: Nov 2009
Device: many
|
You would need to create your own since they are language dependent if you want different text, or do what others have done.
Simply hovering over the new icons will give you a translated pop-up text. I have used the icon versions for quite some time now (over a year) and have found they are quite mnemonic and became second nature quite easily. Your choice. Last edited by KevinH; 03-16-2023 at 04:05 PM. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,547
Karma: 188377810
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Almost. You have to compile your own rcc file, but there's no need to create svg icons with the text you want. Just compile an rcc file that doesn't contain any images for those buttons. Still probably a bit of PITA, but nearly so much as needing to make a bunch of SVGs on top of it.
|
![]() |
![]() |
![]() |
#14 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 585
Karma: 1952146
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
|
Playing with your own RCC file is not necessary.
Just create a qt_styles.qss file in the Sigil configuration folder and enter there: * If you want only Text: Code:
QFrame QToolButton#findNext, QFrame QToolButton#replaceCurrent, QFrame QToolButton#replaceFind, QFrame QToolButton#restart, QFrame QToolButton#replaceAll, QFrame QToolButton#count { qproperty-toolButtonStyle: ToolButtonTextOnly;} Code:
QFrame QToolButton#findNext, QFrame QToolButton#replaceCurrent, QFrame QToolButton#replaceFind, QFrame QToolButton#restart, QFrame QToolButton#replaceAll, QFrame QToolButton#count { qproperty-toolButtonStyle: ToolButtonTextBesideIcon;} |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,547
Karma: 188377810
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Brilliant!
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changes in HTML user interface | tfgtech | Server | 1 | 10-09-2018 11:56 PM |
Rethinking the user interface | fesja | Calibre | 98 | 02-10-2012 02:02 AM |
Find/Replace Won't Find | Rand Brittain | Sigil | 7 | 09-24-2011 04:35 AM |
BUG in user interface | Giuseppe Chillem | Calibre | 9 | 05-10-2010 10:32 PM |
iLiad User interface programming | eth777 | iRex Developer's Corner | 3 | 12-23-2007 05:58 AM |