Skip to content

IDLE - modify text frame and widget borders #89614

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

Open
primexx mannequin opened this issue Oct 13, 2021 · 8 comments
Open

IDLE - modify text frame and widget borders #89614

primexx mannequin opened this issue Oct 13, 2021 · 8 comments
Assignees
Labels
3.10 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@primexx
Copy link
Mannequin

primexx mannequin commented Oct 13, 2021

BPO 45451
Nosy @rhettinger, @terryjreedy, @taleinat, @AlexWaygood
Files
  • idle310.PNG: photoshop to illustrate the enhancement suggested
  • Capture.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 = None
    created_at = <Date 2021-10-13.01:04:56.739>
    labels = ['expert-IDLE', 'type-feature', '3.10']
    title = 'IDLE - modify text frame and widget borders'
    updated_at = <Date 2022-02-11.05:24:53.444>
    user = 'https://bugs.python.org/primexx'

    bugs.python.org fields:

    activity = <Date 2022-02-11.05:24:53.444>
    actor = 'pulsiedulsie'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2021-10-13.01:04:56.739>
    creator = 'primexx'
    dependencies = []
    files = ['50352', '50469']
    hgrepos = []
    issue_num = 45451
    keywords = []
    message_count = 8.0
    messages = ['403774', '403794', '403891', '407327', '407342', '407514', '413038', '413039']
    nosy_count = 7.0
    nosy_names = ['rhettinger', 'terry.reedy', 'taleinat', 'jerrylikerice1s', 'AlexWaygood', 'primexx', 'pulsiedulsie']
    pr_nums = []
    priority = 'high'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45451'
    versions = ['Python 3.10']

    @primexx
    Copy link
    Mannequin Author

    primexx mannequin commented Oct 13, 2021

    Python 3.10 bundled IDLE with a small change in the interactive interpreter shell.

    Previously, the line indicators ">>>" were in-line with the command line, and a long/multi line command would have the same indentation as the indicator which was not ideal.

    that has been changed in 3.10 so that the line indicators are in a separate area as the actual commands so actual commands are always indented consistently. this is good.

    however, there is now a thick window border separating the line indicator and the main window. this is jarring and creates a visual separation that disassociates the line indicator from the line itself.

    i have on several occasions sat there waiting for something to finish only to notice that it has already finished but i missed seeing the next line indicator to the left.

    the window border creates two separate spaces and is distracting.

    an improvement would be to instead of the window border, eliminate it and shade the left side with a very light colour (probably even lighter than my photoshop in the attached image).

    actually, I suggest that the best solution is to remove the window border and leave the entire thing contiguously white, with no shading, similar to what it looked like previously. except that it now has correct indentation. I think this is the most visually cohesive and easy to use.

    Attached is an image to illustrate. Again, I suggest the "not shaded" version is the best.

    @primexx primexx mannequin added the 3.10 only security fixes label Oct 13, 2021
    @primexx primexx mannequin assigned terryjreedy Oct 13, 2021
    @primexx primexx mannequin added topic-IDLE type-feature A feature request or enhancement 3.10 only security fixes labels Oct 13, 2021
    @primexx primexx mannequin assigned terryjreedy Oct 13, 2021
    @primexx primexx mannequin added topic-IDLE type-feature A feature request or enhancement labels Oct 13, 2021
    @terryjreedy
    Copy link
    Member

    Whereas to me, 'not shaded' is easily the worst. Users can customize the sidebar colors, but since the default is the same at the text, I would not want to deliver IDLE with a scheme that I think is awful.

    On Windows, I agree that the light theme border is too heavy. The dark theme light border is barely noticeable. On mac, its the opposite: light theme ok, dark theme white border is too prominent. I would be willing to look at a change.

    @primexx
    Copy link
    Mannequin Author

    primexx mannequin commented Oct 14, 2021

    of course that's fair, colour schemes are a very preferential thing. the main issue really is the border that creates a visual separation between the line indicators and the lines that they should be visually associated with. thanks!

    @rhettinger
    Copy link
    Contributor

    rhettinger commented Nov 29, 2021

    I request that this entire new feature be reverted. Having used it in classroom environment, it has been a catastrophe for teaching and is a significant regression in usability.

    Here are my notes so far:

    1. As the OP says, this strong vertical line is visually jarring and against graphic design principles that allow the eye to group input/output pairs. Contrast this with Jupyter, Ipython, and previous versions of IDLE which use strong horizontal delineations between successive input/output pairs.

    2. Pasting multiple statements into the shell window causes the first to be executed and the other statements are silently ignored. This is a recurring problem with new students and for those with Jupyter experience. For example, cut and paste these two statements into the shell and press return/enter:

        print('hello')   # This executes
        print('world')   # This is silently ignored
    1. When students have errors, it is the norm to communicate them via a chat window. Formerly, the PS1 prompt separated the
      inputs from the outputs in a shell session; however, the PS1 and PS2 prompts are not included in a cut and paste section.
      The session becomes unintelligible because essential information is lost. This affects chat, posting interactive sessions to
      StackOverflow, and the ability to post examples in docstrings. In the main Python documentation, the examples always show
      the >>> but there is no longer a way to extract this essential information from an interactive session.

    2. Related to bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions #3 is that saving the shell window loses all the prompts. For a decade, I've performed live interactive demonstrations and have saved the sessions so that students could review it. Those saved sessions are now unreadable and therefore unusable.

    Here is what a saved interactive lesson used to look like:

        Python 3.7.6 (v3.7.6:43364a7ae0, Dec 18 2019, 14:18:50)
        [Clang 6.0 (clang-600.0.57)] on darwin
        Type "help", "copyright", "credits" or "license()" for more information.
        >>> # Quoting syntax:  '  "   '''   """
        >>> 'hello'
        'hello'
        >>> "hello"
        'hello'
        >>> '''hello'''
        'hello'
        >>> """hello"""
        'hello'
        >>> print('Don\'t prefer backslashes')
        Don't prefer backslashes
        >>> print("Instead, we've used alternate quotes")
        Instead, we've used alternate quotes
        >>> print('''She said, "I'm a good string quoter."''')
        She said, "I'm a good string quoter."
        >>> 30 + 40 - 5
        65
        >>> _ * 10
        650
        >>> _ * 10
        6500
        >>> type(_)
        <class 'int'>

    Here is what the saved session looks like now:

    Python 3.11.0a2 (v3.11.0a2:e2b4e4bab9, Nov  5 2021, 15:54:35) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
    Type "help", "copyright", "credits" or "license()" for more information.
    # Quoting syntax:  '  "   '''   """
    'hello'
    'hello'
    "hello"
    'hello'
    '''hello'''
    'hello'
    """hello"""
    'hello'
    print('Don\'t prefer backslashes')
    Don't prefer backslashes
    print("Instead, we've used alternate quotes")
    Instead, we've used alternate quotes
    print('''She said, "I'm a good string quoter."''')
    She said, "I'm a good string quoter."
    30 + 40 - 5
    65
    _ * 10
    650
    _ * 10
    6500
    type(_)
    <class 'int'>
    
    1. With new students, we have a problem we didn't use to have before. When they emulate a live demo, they are typing the '...' PS2 prompt. It is confusing.

    FWIW, when I say "students", I'm referring to adults who are already experts in their field. Today I was teaching experienced engineers (most with masters degrees) at a major consumer electronics company. The new IDLE feature seriously degraded their experience and almost every learner was adversely affected in some way.

    @terryjreedy
    Copy link
    Member

    This issue applies to both Shell, with the prompt sidebar, and editor windows, with line number sidebars. I looked carefully at Windows Notepad++ editor tabs. They have a tab border, separate from the window border, that encompasses the line numbers, text, and scrollbar, but not the status bar. The are no internal lines between the three components. But the line numbers and scrollbar have a light gray background that separates them from the text.

    The IDLE text widgets instead have a border around the text but apparently not one around the larger frame. As a result, text widgets with just a scrollbar do not look exactly right. It would be easy to delete the text border and adjust the frame border. But as I suggested previously, I am pretty sure deleting it entirely would require a default light gray background.

    Any change would have to be tested on all 3 major systems.

    @terryjreedy terryjreedy changed the title IDLE Shell GUI - remove window border IDLE - modify text frame and widget borders Nov 30, 2021
    @terryjreedy terryjreedy changed the title IDLE Shell GUI - remove window border IDLE - modify text frame and widget borders Nov 30, 2021
    @primexx
    Copy link
    Mannequin Author

    primexx mannequin commented Dec 2, 2021

    for what it's worth, Notepad++ is highly configurable. Here's what mine looks like with borders set to 0 and some sidebar items disabled. Even though it is the same classic theme, it looks a lot better than default.

    There's the more substantial point to note that Notepad++ is not interactive, the need to have an extremely tight visual coupling between the margin and the main body on a line-per-line basis is significantly reduced. Likewise, the line numbers separated by a border in the IDLE editor are not really bothersome either, it looks natural enough. It only really sticks out in the interactive interpreter.

    @pulsiedulsie
    Copy link
    Mannequin

    pulsiedulsie mannequin commented Feb 11, 2022

    At a minimum, I think that there should be a toggle for whether this should be present or not, without having to dig in and change the values in IDLE (with, I'd like to note, absolutely no clue where to do that!). This is particularly an issue for beginners.

    It'd also be nice to control the color scheme/size etc, but I can understand if that's more complicated.

    @pulsiedulsie
    Copy link
    Mannequin

    pulsiedulsie mannequin commented Feb 11, 2022

    In addition, I would encourage that people in future try to get a bigger gauge of how many people actually want a feature like this, how many don't, and then make a decision about whether to put it in- considering that there have been a fair few cases where people have clearly reacted negatively to this, maybe you should have checked if people'd dislike it before rolling it out w/o any easy way of undoing it.

    @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.10 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    2 participants