Community
    • Login

    Find & Replace & Mark re-organization proposal

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 3 Posters 69 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      shodanx2
      last edited by

      Hello here is my proposal for an improved Find & replace dialog

      9121954e-2e99-4457-a61a-c2865b92f3df-image.jpeg

      Most of this is self-explanatory
      If you think about it you can probably figure out what everything means but here is my explanation

      This icon section means as follows
      353f9268-57ee-4dad-b175-d9b399cbddaa-image.jpeg

      Top row is search mode, this is “radio style” button only one can be enabled at once.
      The modes are like current, but with one addition.

      Literal search (normal mode)
      Escaped Literal search (extended mode)
      Regex Search (regex search)
      Semantic search (no current equivalent, what would be a 250MB offline/local llm direct search module)

      the rest are all toggle switches

      e3a76bb1-ce7d-46f0-97dd-bff56ca97ab0-image.jpeg

      Case sensitive search
      Diacritic sensitive search (that is accents and special characters, example whether e matches é è ê ë and so on)
      dot includes newline (this toggle only means something in regex mode)
      fuzzy logic search ( this allows for instance “boat~” to find stuff like bat, boar, bost, oat, coat, goat, bots, boats, boating and combined with semantic search, it allows synonym search such as canoe, ship, ferry, yacht, vessel and off course, scooner )

      47813e19-0ea1-431f-ab23-3a6053f6d122-image.jpeg

      wrap around
      word search (match whole word only)
      boolean search
      and settings

      Next we have the search and replace operators

      These are fully spelled out, and because we have separate buttons for “in document” and “in selection” we never have to care about checking “In Selection” ever again, that setting is simply made redundant !! Yay, my biggest pet peeve and worry and the impetus for making this proposal !

      9e6c8640-3b65-42b2-8a10-815364551840-image.jpeg

      And this last line of controls, represents the Mark operation, which I never remember exist when i need them and I won’t go to another tab to use (instead I just double click the word and that’s all I use the mark function, but this would be useful if it were more ergonomic to use)

      So here is what the symbols mean

      eea76dc8-faaf-40be-afae-192416aafeb4-image.jpeg

      Highlight previous
      Highlight ALL
      Highlight next

      7f40a3ee-d7df-41a8-abb8-fb2c54dd1456-image.jpeg

      bookmark previous
      bookmark ALL
      bookmark next

      a84efc31-d623-4b97-aeb8-4701e23b979c-image.jpeg

      Copy highlights
      Copy bookmarks
      Delete bookmarks
      Delete highlights
      Delete ALL

      (I have reached limit of images here, I will continue message as a reply once this post is out of the moderation queue)

      David Brigden52D S 2 Replies Last reply Reply Quote 0
      • David Brigden52D Offline
        David Brigden52 @shodanx2
        last edited by

        @shodanx2

        I have two questions:

        What would this look light in light mode?

        What are the limitations in the existing Find … dialog that this improves or fixes?

        PeterJonesP S 2 Replies Last reply Reply Quote 0
        • PeterJonesP Online
          PeterJones @David Brigden52
          last edited by

          @David-Brigden52 ,

          it’s a followon to issue #16229 by the same user, who suggested some changes last year, it was rejected, there was more conversation, then that user disappeared from that conversation for over a year before answering the last question posed of them in that discussion. This icon-based dialog was posted in that reply, then a few hours later, duplicated as a follow on issue #6010, an even older rejected proposal by a different username (which had eventually gone on to propose a huge monstrosity of a dialog, which would be unusable by any human, except maybe the one who proposed it).

          This icon-based proposal has the benefit over the monstrosity in that it’s not as much a “wall of text” proposal. But looking at this icon-based proposal, I don’t see what the benefit is over the current find/replace dialog. Given that all the other dialogs in the app are text based, I think that an icon-based dialog for search/replace would tend to confuse rather than help users (but that’s just my opinion)

          David Brigden52D 1 Reply Last reply Reply Quote 0
          • S Offline
            shodanx2 @David Brigden52
            last edited by

            @David-Brigden52

            Hi,

            To answer

            “What are the limitations in the existing Find … dialog that this improves or fixes?”

            The benefits are

            1. elimination of the “in selection” toggle which is extremely irritating and the impetus for creating this. Having to keep track of this at all times when using the replace function has always been a sore point, and it took me a really long time to realize that it was toggling itself based on selection length! With this, it is just GONE !

            af2dd7de-bbe3-4375-bd76-c92998d7324b-image.jpeg

            1. no longer having separate Find/Replace/Mark. Now each of those functions are immediately available (in particular the much more obscure mark function, but mostly it just eliminates the constant tab-switching between find and replace)

            54f1cbc3-f4b6-4a54-a757-c7ad75f69217-image.jpeg

            If I did not believe that this is entirely a waste of time, I would have probably integrated the other, also very similar functions into it.

            1. Makes the input copy/swap function a single click operation
              af6a784b-6f94-4aa6-9b89-4bf80b327ba3-image.jpeg

            2. Provides just more of the dialog window width in use for the textbox
              1f90eff1-51e4-4aaa-b4e1-0fd4ed17bd23-image.jpeg

            3. Eliminates transparency settings from main interface (it was just clutter)
              ce69318b-468a-4bb0-b7dc-67cef08096be-image.jpeg

            4. Eliminates “split find next” checkbox toggle, which only exist to quiet opposition to change which has long ceased to exist (it is a vestigial feature, ~everyone~ uses a split find prev/next except the people who haven’t realized what the checkbox is for and therefore simply can’t find previous)
              9542ac76-7c8b-4ba1-b654-0dead62908ca-image.jpeg

            5. I think my system is ultimately a smaller learning curve than the original
              e858160d-7aeb-4dea-b1e0-14d01a5e8447-image.jpeg

            6. Provide live counts for search, that update as you type, eliminating the need for the Count button entirely as well as providing prev/all/next counts
              73c2de60-6b4e-4064-bdb3-a1097c6483fa-image.jpeg

            7. Suggests future features, semantic search, fuzzy logic search and boolean search which are common components of serious knowledge management systems.

            8. Protects (and clearly advertises that it cannot be accidentally activated) against accidental triggering of “replace all in all documents”, which is of course devastating if triggered by accident

            9. Proposes a more granular version of the mark system, I forgot to add “highlight colour” and “show highligth list” but that was already a lot
              284c50fc-7b5b-40d2-99d4-ad3949e8bfa4-image.jpeg

            10. Makes search setting immediately accessible from the Find/Replace/mark dialog
              7aa772cd-7e7d-43c4-a47e-d64f78e6ee75-image.jpeg

            11. Suggests diacritic sensitivity, in addition of the current case sensitivity and “whole word” search parameters
              4d8a0ad1-9410-4417-a40b-b3cc760eb205-image.jpeg

            I think that is all.

            And to answer
            “What would this look light in light mode?”

            d06cecf2-1d48-4168-93b8-409be8cd5da4-image.jpeg

            It burns my retina with its intolerable brightness !

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • S Offline
              shodanx2 @shodanx2
              last edited by

              Note, the message above is incomplete

              I could not complete it due to hitting the image posting limit.

              And now the edit window as passed

              15662d9f-858f-4f26-a8f4-bee7e6c2e7ef-image.jpeg

              So I have to finish the original message as a reply


              and last is a toggle switch

              This means “copy whole line” I should add the “copy” symbol as well.
              What this does when active, is when you click Copy Highlights, instead of copying only the exact highlight, which is just your find string with various case, it will copy the whole lines which contain highlights, which I think is more useful.
              That one might not even be a toggle. I thought it would be a toggle because it could affect bookmark as well, but actually, “copy bookmarks” already copies the entire bookmarked lines. So probably this should just be a separate action

              “copy entire lines that include highlights”
              ec9bc866-6c71-4340-9973-1f0666a6da63-image.jpeg

              Ah and the setting button, would serve to hide the important settings that we don’t need to interact on a day-to-day basis, but easier to get there than going to preference->whatever->etc…

              7186ced0-8f76-42a0-9820-733d1a175335-image.jpeg

              And of course, once we have a single layout like this, it’s easy to put a layout toggle in the settings menu

              Example hiding the Mark/Bookmark section

              705cfea2-02c0-4748-a6e9-82ae4c08cfe1-image.jpeg

              Also, didn’t have the time to include it and I have no more credits to make images but I would add a button to change the colours of “highlight/marks” so you can have multiple sets of highlighted terms with different colours. (Also I would make these sets independantly copiable/deletable from a list somewhere else)

              hiding replace all in all documents

              10e83d22-40be-4d4f-b3d1-90c1523d31ea-image.jpeg

              Hide replace functions

              ee3b9d2b-64fa-408a-bff9-55978d3f72e4-image.jpeg

              Here are lightmode versions of the reduced versions

              Reduced (minus replace all in all document, minus Mark function )

              fa22781c-e719-4bfc-8edb-415c4b5a6eec-image.jpeg

              Find only variant

              b5931184-02ab-4da8-98f3-b0c9720d72b2-image.jpeg

              And here are the suggested layout switches, in the setting/gear icon popup dialog

              46371d7d-e16c-4ffa-baa2-3a97f083b9b3-image.jpeg

              2260dc2e-a2ea-4467-808f-6835203a039b-image.jpeg

              And of course, you tell the user what each button does via the use of button tooltip text

              I would also put clickable yellow (?) buttons that you can click to open information page about the use of this dialog

              1 Reply Last reply Reply Quote 0
              • PeterJonesP Online
                PeterJones @shodanx2
                last edited by

                @shodanx2 said:

                1. Provide live counts for search, that update as you type, eliminating the need for the Count button entirely as well as providing prev/all/next counts

                Yikes! You apparently don’t use large files and/or exceedingly complex regular expressions. Even I have very-rarely needed to run searches that take minutes to run (and some unfortunate users must do that much more frequently than I do). The search engine can only run one search at a time, so every time I updated the regex, it would have to wait minutes to update the “live” count(s) before I could run the replacement I wanted. No thank you.

                S 1 Reply Last reply Reply Quote 0
                • David Brigden52D Offline
                  David Brigden52 @PeterJones
                  last edited by

                  @PeterJones

                  Thanks for info and I think we can all agree that the monstrosity should only be seen on the first of April, if THEN.

                  I’ve read issue 16229 and it was quite informative. I may have at one time been aware of the search settings in preferences, and the arrow to switch between compact and extended view. But I had forgotten all that.

                  I was NOT aware of the selection checkbox, which started the whole thing, even though it’s in front of me every time I do a search or replace. It’s a sign of my not using the feature. but now that I see it, I have opinions

                  Inside selection is kind of meaningless if I’m searching all opened documents or within files. Rather than a separate dimension, I think it should be part of the hierarchy of search scope: Find, Find All in Selection, Find All in Document, Find All in All Opened Documents etc.

                  @shodanx2
                  Thanks, the dark mode was difficult to make out on a smaller screen. and thanks for a list of things

                  1. In Selection Toggle: as noted above, I don’t like the way it is currently implemented. and an auto toggle seems confusing.

                  2. Find / Replace / Mark Tabs: Honestly, this doesn’t bother me here. In general, I think I lean towards liking a tabbed interface

                  3. Input Copy/Swap Function: I so rarely swap and never copy, that having a drop down doesn’t bother me. I’m neutral on this sort of change

                  4. Wider Search and Replace fields: I am not hampered by the size right now. If we could rearrange and make larger, great! If not, great!

                  5. Transparency Settings: If I had single monitor and my search window was over the editor I’d make use of this. I don’t see a need to keep it. If we could use that space for something else, fine.

                  6. Split Find Next Toggle: meh. It it were up to me, I’d make the the bidirectional buttons the only option, or at least move the choice to Preferences.

                  7. Live Counts: I Like putting the counts in the text of the buttons. I’m not sure how hard it would be to implement, but pretty

                  8. Locking Replace All. No. If we have the option set in Preferences, we’re already confirming the change. that’s just extra room.

                  9. Diacritics: Sure if there’s space, why not?

                  Light Mode: I use a dark theme with my light Mode, so dialogs are a nice gentle gray, not blazing white.

                  1. Smaller Learning Curve:
                    I really don’t think so. There’s a lot on that screen that I don’t want or need to know. which brings me to

                  It’s too cluttered. A row of buttons on the right became a larger grid of buttons, but mostly, the icons

                  You’ve got two sets of icons in two different layouts and sizes. The search dialog is dominated by the icon grid on the left.

                  There are circumstances where icons are the best GUI element (toolbars) or are best in combination with text (the tabs in Notepad++ for example) But in a number of the cases you described, I think the best element would be a checkbox with explanatory text.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    shodanx2 @PeterJones
                    last edited by

                    @PeterJones said:
                    The search engine can only run one search at a time, so every time I updated the regex, it would have to wait minutes to update the “live” count(s) before I could run the replacement I wanted. No thank you.

                    I do occasionally open big files, I have one open right now.

                    e6374120-aaf1-4fc9-9753-e573e0eee415-image.jpeg

                    That doesn’t seem like much of a problem to me ?

                    Here is how to do it

                    1. Put a filesize guard on the auto-count algorithm, so it just doesn’t fire for files beyond threshold.
                    2. Put a throttle delay so it can’t fire again until a delay has passed, I think 100 millisecond / 10 hertz would still feel responsive while leaving ample room from 99% of files to search through.
                    3. run the auto-count algorithm in another thread so it doesn’t freeze the UI on especially big files (or, just reduce max file threshold)
                    4. don’t trigger auto-count algo until it returned
                    5. Give auto-count algo a timeout value
                    6. Give user disable auto-count toggle
                    7. Manual count trigger by left click window background

                    I just checked how long the count algo actually takes.
                    e61fa639-95dc-4429-b75a-ce1a690e2cc6-image.jpeg
                    On my 156 megabytes file that is 39 milliseconds.

                    Let the user fiddle with the values you like, I suggest these default values. Use this layout.

                    3027479e-8982-4cb9-867c-80b02469459b-image.jpeg

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • S Offline
                      shodanx2 @David Brigden52
                      last edited by

                      @David-Brigden52 said:

                      1. In Selection Toggle: as noted above, I don’t like the way it is currently implemented. and an auto toggle seems confusing.

                      For me it was brutal, I thought I was going crazy, somehow that toggle was always the opposite of what I needed ! And … it took me a loooooong time to discover that it changes on its own !!

                      7eb12f29-044e-4c68-8775-d5c05c4ffe74-image.jpeg

                      1024 bytes it a selection threshold I am very often on either side of !
                      I understand the idea, “in selection if it’s big enough” but then you have to keep in mind where that threshold it, but counting 1024 character really is not obvious. I’m not sure if it only enabled but I think it would also disarm when you’re under threshold.

                      I have PTSD from that damn toggle ! My thousand+ steps windows configuration checklist has a line about disabling this feature. Separate buttons for replace in selection and replace in document solves that problem. Now where you click always does what you want.

                      1. Find / Replace / Mark Tabs: Honestly, this doesn’t bother me here. In general, I think I lean towards liking a tabbed interface

                      As I studied this dialog box, I realize that many many times I would have benefited from the highlight feature, but not if it’s an other tab. I need it but not often enough to remember it exists. Also having multiple highlights with different colour, having those highlights in a list, and preserving those highlight over np++ restarts as permanent highlighting of the text would be really nice.

                      1. Input Copy/Swap Function: I so rarely swap and never copy, that having a drop down doesn’t bother me. I’m neutral on this sort of change

                      I didn’t notice it was there, it was interface noise, I think I might use swap, if I remember it exists. Not a fan at all of a two click operation.

                      1. Wider Search and Replace fields: I am not hampered by the size right now. If we could rearrange and make larger, great! If not, great!

                      I often paste long, really really long searches in there. I’d like to see more of it, I also would like side-scroll to work on this textbox (currently side-scroll does horizontal scroll on it, that’s a bug)

                      1. Transparency Settings: If I had single monitor and my search window was over the editor I’d make use of this. I don’t see a need to keep it. If we could use that space for something else, fine.

                      I have 4x40" monitors
                      077f249e-f782-462d-862c-ca2a7fceb50c-image.jpeg
                      I always leave it translucent and it’s always absolutely all over the place. But I never needed to adjust it after the first time, it belongs in settings, but there should be a gear icon for settings on the search dialog.

                      1. Split Find Next Toggle: meh. It it were up to me, I’d make the the bidirectional buttons the only option, or at least move the choice to Preferences.

                      I don’t see why not always have prev/next, I use both extensively, only reason the toggle is there, in my opinion, is in case someone complains about it, to pre-emptively quiet them. But I don’t think those people really exist. That’s why I call this a vestigial feature.

                      1. Live Counts: I Like putting the counts in the text of the buttons. I’m not sure how hard it would be to implement, but pretty

                      I really would like that, even if it does it 1 per second. Being able to just type and see how many results you got sounds soooo useful. You get an immediate look at what is going on. And with prev count and next count, you kind of can orient with it, like I type a function name, and at a glance I can tell if I’m before of after it.

                      1. Locking Replace All. No. If we have the option set in Preferences, we’re already confirming the change. that’s just extra room.

                      This signals that button is not dangerous. You know how sometimes UI have buttons that if you click them something bad will happen. This happenned to me too often, I have PTSD about it. Even if there’s a guard, it makes me nervous. I have never used it, but I see how it might be useful but I always have a bazillion files open in my session so that button is never safe, even though, I know there’s a guard. But have you even misclicked something and then also bumped space by accident ? That would do it ! Aaaaaahahhhhh !

                      Light Mode: I use a dark theme with my light Mode, so dialogs are a nice gentle gray, not blazing white.

                      On my HDR oled monitor, it is so bright it lights up the room.

                      1. Smaller Learning Curve:
                        I really don’t think so. There’s a lot on that screen that I don’t want or need to know. which brings me to

                      It’s too cluttered. A row of buttons on the right became a larger grid of buttons, but mostly, the icons

                      Decluttering the layout is easy, just add more layout buttons in settings.

                      I would like either a “advanced mode” toggle. Or “layout change on resize” where the bigger you make the dialog, the more buttons it adds. What just a find bar, shrink it until that is all there is.

                      You’ve got two sets of icons in two different layouts and sizes. The search dialog is dominated by the icon grid on the left.

                      Yes there is many other ways to do this. Once you know what the icons mean, like the regex symbol and case sensitive, you can make them much smaller and be able to pick them up very quickly. This layout feels right to me. I would really like a (?) hover help screen for the dialog.

                      In particular, having common regex expression like matching empty lines, matchin end of line, matching beginning of line. The perfect version would have a regex builder and the complete set of escape sequences ready to drag and drop into the textbox

                      I think symbols are more legible once you can recognize them.

                      1 Reply Last reply Reply Quote 0
                      • PeterJonesP Online
                        PeterJones @shodanx2
                        last edited by

                        @shodanx2 said:

                        1. run the auto-count algorithm in another thread

                        Multi-threaded search has been rejected on the grounds that it breaks other features:

                        https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8329
                        https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3562#issuecomment-2242694908

                        (That might be in just the context of a separate thread for each file searched during multi-file searches… but I believe that other ‘background threading’ of searching has also been rejected, though I cannot immediately find an example.)

                        If your live-count solution relies on one or more new threads, don’t count on it being accepted.
                        I think (but am not sure) that all your suggestions for “timeouts” and the like would also require threads, which would probably make them a no-go as well.

                        On my 156 megabytes file that is 39 milliseconds.

                        normal-search=href is not a complicated regular expression, and thus you have a 39ms strawman there. As I said, I have seem minutes pass while searching. If you haven’t experienced that, be thankful. But understand that freezing other people’s search dialogs for minutes before they can search, just because you want automatic “live” count, is not going to be accepted. (If that auto-count were limited to mode=normal searches, maybe, just maybe, it would be safe enough. But I’m still doubtful.)

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors