classification
Title: IDLE: Replace the search dialog with a search bar
Type: enhancement Stage: patch review
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, taleinat, terry.reedy
Priority: normal Keywords: patch

Created on 2018-10-13 21:02 by taleinat, last changed 2020-10-12 20:24 by terry.reedy.

Pull Requests
URL Status Linked Edit
PR 9855 open taleinat, 2018-10-13 21:06
Messages (8)
msg327672 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-10-13 21:02
Search dialogs are clunky and arguably outdated. Most modern editors, IDEs and browsers use a search bar instead.

I created a search bar for IDLE as an extension years ago, it can be found on PyPI as "SearchBar". I hadn't updated it in recent years and it doesn't work with modern IDLE. I doubt that it has seen much use.

I suggest that having this built into IDLE would be a great benefit to its users.
msg327673 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-10-13 21:15
See PR GH-9855 for a working implementation based on my old "SearchBar" extension.
msg327718 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-10-14 18:07
+1 on adding this to IDLE

I haven't looked at the code or all the details yet, but just downloading the patch and running code in IDLE, this is a nice change.
msg327741 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-10-15 10:52
Thanks for giving it a try, Cheryl, I'm glad you like it!
msg378509 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-12 17:17
Notepad++, which I use, uses a tabbed dialog for search and replace, which I think I would like to somewhat imitate.  Or just have one search and replace dialog.  I need to experiment.  I don't like the Firefox toolbar and consider it buggy.  In any case, it and browsers in general do not do replace.  Maybe yours is better.
msg378520 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-10-12 19:39
The version in the PR is modeled after similar features in IDEs, not browsers. I mentioned browsers since they are very commonly used, and to the best of my knowledge all modern browsers use search bars. Therefore, as a UI element, search bars are now commonplace, unsurprising, and require no training to use.

As for replace, while many IDEs use a bar, many word processors do indeed still use a dialog for search/replace, and I've seen text editors use a bar for search but a dialog for replace.

I first implemented this for my personal use, since I much prefer bars to dialogs. But I can see the argument that they can be harder to use for novice users.

If we decide not to go with this path, I'll try to extract some of the improvements made to the search engine, such as highlighting all matches, into a PR improving the existing search and replace dialogs.
msg378521 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-10-12 19:44
I should mention one *major* advantage of using a search/replace bar: Live highlighting of matches *as you type*. It really is a vastly better experience; if you haven't tried it yet, please do.
msg378522 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-12 20:24
Notepad++ Find by marks all matches in the current doc as 'found', with a distinct (darker) highlight for the 'selected' found.  Double clicking selects a word, as in IDLE, *and* finds all matches.  One can then either cut/copy/replace the selection, as in IDLE, *or* look at other matches in the file.

Notepad++ also offers options to (in addition) 'Find all' in current doc or all opened docs.  This lists the hits in a separate box, as with IDLE's Find all.  Double clicking on a hit line goes to that line.  (Easier than RtClick/goto.)

I suspect I would find live highlighting annoying.  Why would having all 'a's on a page light up when I type 'a' be a plus?  But I will try your patch when we are ready to focus on search/replace/find.  

I have mentioned elsewhere that I might go for a minimal search box on the status line separate from the dialog(s).
History
Date User Action Args
2020-10-12 20:24:20terry.reedysetmessages: + msg378522
2020-10-12 19:44:40taleinatsetmessages: + msg378521
2020-10-12 19:39:31taleinatsetmessages: + msg378520
2020-10-12 17:17:17terry.reedysetmessages: + msg378509
2018-12-11 22:28:14terry.reedysetversions: - Python 3.6
2018-10-15 10:52:57taleinatsetmessages: + msg327741
2018-10-14 18:07:08cheryl.sabellasetmessages: + msg327718
2018-10-13 21:15:06taleinatsetmessages: + msg327673
2018-10-13 21:06:01taleinatsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request9224
2018-10-13 21:02:19taleinatcreate