Skip to content

Modernize the IDLE Find/Replace/Find in Files dialogs #67407

Open

Description

@AlSweigart
BPO 23218
Nosy @rhettinger, @terryjreedy, @roseman
Files
  • idle_grep_compare.png: Before/after screenshots of the dialog redesign.
  • idle_find_ui_redesign.diff: Patch for the changes
  • idle_grep_compare2.png: Updated comparison image
  • idle_find_ui_redesign2.diff: Patch for the changes v2
  • idle_find_ttk.png
  • find-dialogs.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2015-01-10.10:00:51.782>
    labels = ['expert-IDLE', 'type-feature', '3.9']
    title = 'Modernize the IDLE Find/Replace/Find in Files dialogs'
    updated_at = <Date 2019-09-20.21:05:39.865>
    user = 'https://bugs.python.org/AlSweigart'

    bugs.python.org fields:

    activity = <Date 2019-09-20.21:05:39.865>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2015-01-10.10:00:51.782>
    creator = 'Al.Sweigart'
    dependencies = []
    files = ['37664', '37666', '37759', '37760', '40107', '40583']
    hgrepos = []
    issue_num = 23218
    keywords = ['patch']
    message_count = 7.0
    messages = ['233812', '234230', '247893', '247906', '251623', '280129', '280227']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'terry.reedy', 'markroseman', 'Al.Sweigart']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue23218'
    versions = ['Python 3.9']

    Linked PRs

    Activity

    1. AlSweigart commented on Jan 10, 2015

      AlSweigartmannequin
      MannequinAuthor

      Various changes to modernize the user interface of the Find, Replace, and Find in Files dialogs:

      • Got rid of the "close" button, since it is redundant.
      • Moved the buttons below the text fields, to make better use of screen real estate.
      • Shorten the titles by getting rid of the "Dialog" part.
      • Renamed "Search" title to "Find" to match the menu item.
      • Renamed "Regular expression" label to the shorter "Regex"
      • Added slightly more padding.
      • Removed the "Replace+Find" and made "Replace" have this functionality. (all modern editors use Replace to mean "Replace and Find")

      The attached png shows the before/after differences in the design of these dialogs.

    2. AlSweigart commented on Jan 18, 2015

      AlSweigartmannequin
      MannequinAuthor

      I've made some minor updates: Adding colons to the labels and right-justifying them. These updates can be seen in the second comparison screenshot.

    3. roseman commented on Aug 2, 2015

      rosemanmannequin
      Mannequin

      For illustration, attached idle_find_ttk.png, which is a minor layout tweak of the existing one (works on all the various find dialogs, though not shown in screen shot). I agree with Al's other suggestions here.

    4. rhettinger commented on Aug 2, 2015

      @rhettinger
      Contributor

      These changes all seem reasonable and have a nice look.
      I have misgivings about shortening "regular expression" to "regex".
      Otherwise, +1 for everything else.

    5. roseman commented on Sep 25, 2015

      rosemanmannequin
      Mannequin

      Have attached find-dialogs.patch, which does some cosmetic tweaks to the existing dialogs, as per the previous screenshot. It uses ttk widgets if available, and standard Tk widgets if not.

      Relies on the ui.py module (not attached, as it is changing often).

    6. AlSweigart commented on Nov 6, 2016

      AlSweigartmannequin
      MannequinAuthor

      *Bump* Just wanted to bring attention to this issue. We could keep "Regular expression" instead of "Regex" for the label (Sublime Text and other editors have "Regular expression")

      I think Mark's patch would be better over mine.

    7. terryjreedy commented on Nov 7, 2016

      @terryjreedy
      Member

      Al, thanks for the honest comparison.

      For 3.6, we can just import and use ttk with no fuss.

      When I get to this, I will review tests and responses to <Return> and <Escape> (see bpo-27621).

    8. transferred this issue fromon Apr 10, 2022
    9. terryjreedy commented on Dec 27, 2023

      @terryjreedy
      Member

      #57795 (comment)
      Put [ Close ] (cap 'C'0 at bottom. [Notepad++ has this.]
      Change [ Find ] to [ Find next ]. [ditto]

    10. terryjreedy commented on Oct 21, 2026

      @terryjreedy
      Member

      Further changes inspired by Notepad++, for a new issue with more than 1 PR.

      1. The entry boxes are narrower than the adjacent button and not aligned. Make them the same size and aligned.
        Change grid from 2 columns to three.

      2a. Move [_] Regular expression down to its own line as, properly aligned,
      Search mode: [_] Regular expression.
      2b. Replace direction radiobutton with checkbutton at the end ol the line above:
      [_] Search up.

      1. Make these dialogs non-modal -- I believe there is already an issue for this.
      2. Put the frames for the 3 dialogs onto 3 Notebook tabs in 1 window. Change title to match the selected tab.
      3. Add more action buttons (Notepad++ has more). Discuss details on new issue.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions