Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: configdialog tab rearrange #84648

Closed
E-Paine mannequin opened this issue May 1, 2020 · 21 comments
Closed

IDLE: configdialog tab rearrange #84648

E-Paine mannequin opened this issue May 1, 2020 · 21 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@E-Paine
Copy link
Mannequin

E-Paine mannequin commented May 1, 2020

BPO 40468
Nosy @terryjreedy, @taleinat, @roseman, @csabella, @miss-islington, @E-Paine
PRs
  • IDLE: make the config dialog vertically resizable #26561
  • bpo-40468: Move help extension settings to extensions page of dialog. #26593
  • [3.10] bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593) #26612
  • [3.9] bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593) #26613
  • bpo-40468: Factor out class ExtPage in idlelib.configdialog #26618
  • [3.9] bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618) #26619
  • [3.10] bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618) #26620
  • bpo-40468: Split IDLE settings General tab #26621
  • [3.10] bpo-40468: Split IDLE settings General tab (GH-26621) #26628
  • [3.9] bpo-40468: Split IDLE settings General tab (GH-26621) #26629
  • Files
  • font_page_short.png
  • general_page.png
  • general_page_pady.png
  • general_page_pady_short.png
  • general_page_short.png
  • window_page.png
  • general_page_se.png
  • shell_editor_page.png
  • shell_editor_page_pady.png
  • tabs_en.png
  • tabs_wn.png
  • tabs_wn_padx.png
  • idle-configdialog-rearrange.png
  • 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 = 'https://github.com/terryjreedy'
    closed_at = <Date 2021-06-10.05:44:40.702>
    created_at = <Date 2020-05-01.14:10:10.497>
    labels = ['expert-IDLE', 'type-feature', '3.9', '3.10', '3.11']
    title = 'IDLE: configdialog tab rearrange'
    updated_at = <Date 2021-06-10.05:44:40.701>
    user = 'https://github.com/E-Paine'

    bugs.python.org fields:

    activity = <Date 2021-06-10.05:44:40.701>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2021-06-10.05:44:40.702>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2020-05-01.14:10:10.497>
    creator = 'epaine'
    dependencies = []
    files = ['49105', '49106', '49107', '49108', '49109', '49110', '49113', '49114', '49115', '49117', '49118', '49119', '49384']
    hgrepos = []
    issue_num = 40468
    keywords = ['patch']
    message_count = 21.0
    messages = ['367846', '367870', '367941', '367946', '367973', '375224', '375283', '375384', '395304', '395310', '395357', '395358', '395364', '395372', '395373', '395374', '395375', '395459', '395465', '395466', '395504']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'taleinat', 'markroseman', 'cheryl.sabella', 'miss-islington', 'epaine']
    pr_nums = ['26561', '26593', '26612', '26613', '26618', '26619', '26620', '26621', '26628', '26629']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40468'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @E-Paine
    Copy link
    Mannequin Author

    E-Paine mannequin commented May 1, 2020

    The proposed change to move some of the content in the "General" tab to a new tab. The need for this has been emphasised
    As a proof-of-concept, I moved the "Window Preferences" LabelFrame to a new tab titled "Window" (and did the minimum required to get the window to show).
    The result can be seen in the "general_page.png" & "window_page.png" files.
    Looking at the new general page, I felt that the "Editor Preferences" & "Shell Preferences" LabelFrames should not expand to fill the newly created space, and this should instead be taken up in the "Additional Help Sources" LabelFrame. The result can be seen in the “general_page_pady.png” file.
    Finally, I felt that we could now reduce the height of the window further by decreasing the font page Listbox height to 10 (from 15). The result can be seen in “font_page_short.png”, “general_page_short.png” & “general_page_pady_short.png”.
    As I said originally, this is just a proof-of-concept and we could easily move other options into a new tab (such as a “Editor/Shell” tab – though I think this is too long for a tab title).

    @E-Paine E-Paine mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes labels May 1, 2020
    @E-Paine E-Paine mannequin assigned terryjreedy May 1, 2020
    @E-Paine E-Paine mannequin added topic-IDLE 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes labels May 1, 2020
    @E-Paine E-Paine mannequin assigned terryjreedy May 1, 2020
    @E-Paine E-Paine mannequin added the topic-IDLE label May 1, 2020
    @terryjreedy
    Copy link
    Member

    'Windows', not 'Window'.

    The indentation width should be moved to the Window page after being converted and reduced to a single line with a spinbox or maybe just an entry box.

    Indent spaces (standard 4) [ 4] # or
    Convert tab indents to [4] spaces (standard 4)

    I cannot imagine that anyone would ever want more than 8, certainly not 16. Note that there is another issue that will result in no longer using tabs instead of spaces in Shell, so that this will really be for both (all, including Output).

    There is at least one issue where this has been discussed, with the thought that something that most people should and will never change is now way too prominent. (My python development system with my list of issues is now being repaired. There has also been discussion about converting size to a spinbox. There is no particular reason for the particular presets.)

    The problem with General is that the items left other than Help are specific to either editor or shell. I think General with general window preferences and Help followed by Shell/Ed specifics might be a better division.

    @E-Paine
    Copy link
    Mannequin Author

    E-Paine mannequin commented May 2, 2020

    Would it be helpful to move the additional help sources to the extensions page (and rename it to "Add-ins")?
    Just throwing ideas out there, we could also add an "Advanced" tab where we put the settings we (really) don't want others changing without good reason (such as the indentation width). However, such a tab could quite possibly mean reorganising the entire settings dialog.
    While the original intention of this issue wasn't for a complete reorganisation of the dialog, I am more than willing to spend some time if we want to tie several other issues into this one (and it would be helpful to do so).
    Another random idea is to copy other IDEs and use a tree on the left-side to navigate to different settings, which would allow us to keep the number of settings on a page much lower.
    I will write a new prototype trying the "Shell/Ed" tab idea you suggested and will upload the relevant screenshots.

    @terryjreedy
    Copy link
    Member

    Since the help sources extend the Help menu, putting them under Extensions makes some sense. But I don't know how many people would think to look at the tab. But something to keep in mind. We can also ask for user opinions on idle-dev list.

    Notebooks can put tabs on any side. I found one side example.
    https://stackoverflow.com/questions/46909169/python-tkinter-side-notebook-tabs
    This would allow more and longer tab names, though I would prefer position='w'or 'wn' (west north) instead of 'ws'. We should try this for the existing extensions pane.

    When done with General, there are issues about redoing Highlights and Keys pages, with one person's mockups. One problem with making changes has been divergent opinions.

    @E-Paine
    Copy link
    Mannequin Author

    E-Paine mannequin commented May 3, 2020

    Initially, I simply changed the tab position on the settings window notebook to west-north (tabs_wn.png). I didn't like that the tabs were right-sticky and looked at changing this in the following two ways:

    1. Changing the tab position to the right-side (tabs_en.png), though I believe they are too easy to miss in this place.

    2. Setting the tab minimum width after measuring the titles using the tkinter default font (finding the largest of these and then adding an appropriate padding - for tabs_wn_padx.png, this was 10).
      This meant that tabs behaved as east-west sticky, and text was centred. I couldn't find how to change this to left-justified, though it is possible this can be done through a ttk layout.

    Are there any other ideas?

    If we do change the tab position, I think it would also be helpful to increase the font size to make them more obvious.

    On a separate point, would it be better for me to upload future screenshots to an image hosting site and just include the link in the descriptor message?

    @E-Paine E-Paine mannequin added type-feature A feature request or enhancement labels May 3, 2020
    @E-Paine
    Copy link
    Mannequin Author

    E-Paine mannequin commented Aug 12, 2020

    Reflecting on bpo-41522, I decided that it would be best to work on this issue before going any further with that one (partly because it would require us to redo some of the work and also because this issue should have a higher priority). I have put together a demonstration which is mostly based on your comments on that issue (like before, I did the minimum required to make the window show). The exact list of (user-visible) changes is as follows:

    Fonts/Tabs:

    • rename to "Fonts"
    • move indentation width to the new "Editor/Shell" tab and use a spinbox
      Highlights
    • rename to "Colours"
      General
    • split into two tabs titled "Editor/Shell" (containing Editor & Shell frames) and "Windows" (containing Window frame)
    • move additional help sources to "Extensions" (I believe this makes more sense than having it in any of the other tabs)

    I would also suggest, if there was a patch/PR for this issue, we split the "Extensions" page into its own class. I also think the "Keys" page would benefit from some work but I will not include that in this issue.

    @E-Paine E-Paine mannequin added 3.10 only security fixes and removed 3.7 (EOL) end of life labels Aug 12, 2020
    @E-Paine E-Paine mannequin changed the title IDLE split "general" into two tabs IDLE: configdialog tab rearrange Aug 12, 2020
    @E-Paine E-Paine mannequin added 3.10 only security fixes and removed 3.7 (EOL) end of life labels Aug 12, 2020
    @E-Paine E-Paine mannequin changed the title IDLE split "general" into two tabs IDLE: configdialog tab rearrange Aug 12, 2020
    @terryjreedy
    Copy link
    Member

    Experiments are good, even if not accepted as is.
    Python uses American spellings: so 'Colors'.
    Moving help sources frees up enough vertical space to reduce the pressure to split General. It would again fit vertically on my Mac Airbook.
    'Windows' is really 'Shell&Editor'. 'Blink' is the only thing that really applies to grep output windows. 'Windows' will not apply if we make IDLE multi-tabbed.

    The collage showing all pages at once is useful. I really want to spread the dialog horizontally a bit. The font sample could be wider. Colors and keys should have a uniform simplified theme/keyset selection box and other misc stuff on the left and a text or list box on the right. The cfg_highlight_alt.png and highlight3.png on bpo-24781 are similar except that the left selection box should only be as big as needed (default 3) and the text is now bigger. So other stuff, possibly revised, should likely be on the left.

    Most of the General entries can be shrunk to 50-60% of the current width, or else wrapped. Example:
    At startup, open ()Shell ()Editor
    <For match stuff, put []bell on new line>

    split the "Extensions" page into its own class
    This was intended: bpo-31207. I guess we ran out of gas before this. We could even consider extension and help frame classes besides the help/ext page class.

    Possible order of changes.

    bpo-31207: ExtPage class and tests
    new: move Help sources to ExtPage and tests (to own testcase)
    new: move indent (as int entry box) and test to general. Add help note that indent is used to indent tab adds, indent delete backspaces, and smart indents.
    List issue on bpo-24776 where indent discussed.
    bpo-24781: Colors (see discussion above)
    new: Keys
    this? or new: redo General

    At some point, list classes in configdialog and test_configdialog. docstring so know what names to search for to find them.

    There are several other configdialog issues to fix glitches or make small improvements here and there.

    @csabella
    Copy link
    Contributor

    See also issue bpo-33051.

    @terryjreedy
    Copy link
    Member

    There are two immediate issues.

    1. Issues are blocked because of lack of room on the General pane. The Windows Preferences frame is about as large as the Editor and Shell frame together. Splitting that way will leave room for enough more options for quite a while.

    2. The screen on my 2012 MacBook Air is 768 pixels tall. There are other people with screens about this small, though I doubt much smaller. With the dock on the bottom, the configdialog buttons are not accessible. (The are if IDLE is made full screen.)

    The Additional Help Source box takes up over 20% of the Notebook pane height. With it removed and all panes shortened, the problem on my screen and other at least as tall will be fixed.

    I am therefore adopting EP's idea of moving the Help menu extension to the Extensions tab. I think it fits there better than on the Font page or either split of the General tab.

    I am starting now to separate out a HelpSrc frame class in the code and a HelpSrcTest class in the test file.
    ---

    EP, coordinated help on this other dialog issue is welcome.

    @terryjreedy
    Copy link
    Member

    The new PR moves the helplist. The extensions page looks much better. Not all of the helplist height is recovered. I believe this is because the Font/Tabs page and in particular the overly large indentation setting now determines height. (The other frames on the general page expanded a bit.) *33962 is about using a ttk spinbox here and I will do that tomorrow.

    @terryjreedy terryjreedy added 3.11 only security fixes and removed 3.8 (EOL) end of life labels Jun 8, 2021
    @terryjreedy terryjreedy added 3.11 only security fixes and removed 3.8 (EOL) end of life labels Jun 8, 2021
    @terryjreedy
    Copy link
    Member

    New changeset ab36b9f by Terry Jan Reedy in branch 'main':
    bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
    ab36b9f

    @miss-islington
    Copy link
    Contributor

    New changeset 2cfe0e7 by Miss Islington (bot) in branch '3.10':
    bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
    2cfe0e7

    @terryjreedy
    Copy link
    Member

    New changeset c03f0ab by Miss Islington (bot) in branch '3.9':
    bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
    c03f0ab

    @terryjreedy
    Copy link
    Member

    PR-26618 wraps the extension functions in a new class, ExtPage, and then moves the new class after GenPage.

    I verified that replacing the indent slider with a spinbox results in the dialog being shorter by the full height of the helplist frame. I will do that (or use a plain entry box) when I move it Window Preferences, after splitting GenPage.

    @terryjreedy
    Copy link
    Member

    New changeset 5571cab by Terry Jan Reedy in branch 'main':
    bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
    5571cab

    @miss-islington
    Copy link
    Contributor

    New changeset c835323 by Miss Islington (bot) in branch '3.9':
    bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
    c835323

    @miss-islington
    Copy link
    Contributor

    New changeset 33a7a24 by Miss Islington (bot) in branch '3.10':
    bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
    33a7a24

    @terryjreedy
    Copy link
    Member

    New changeset 275d5f7 by Terry Jan Reedy in branch 'main':
    bpo-40468: Split IDLE settings General tab (GH-26621)
    275d5f7

    @miss-islington
    Copy link
    Contributor

    New changeset 664ae29 by Miss Islington (bot) in branch '3.10':
    bpo-40468: Split IDLE settings General tab (GH-26621)
    664ae29

    @miss-islington
    Copy link
    Contributor

    New changeset d9f38d7 by Miss Islington (bot) in branch '3.9':
    bpo-40468: Split IDLE settings General tab (GH-26621)
    d9f38d7

    @terryjreedy
    Copy link
    Member

    Along with the spinbox PR for bpo-33962, I believe everything discussed here is done. There are still issues to improve specific pages.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants