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

Redesign Help => About IDLE, make it non-modal #69001

Open
roseman mannequin opened this issue Aug 7, 2015 · 31 comments
Open

Redesign Help => About IDLE, make it non-modal #69001

roseman mannequin opened this issue Aug 7, 2015 · 31 comments
Assignees
Labels
3.10 only security fixes stdlib Python modules in the Lib dir topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@roseman
Copy link
Mannequin

roseman mannequin commented Aug 7, 2015

BPO 24813
Nosy @terryjreedy, @roseman, @csabella
PRs
  • bpo-24813: IDLE: Add icon to help_about #2335
  • [3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) #2359
  • bpo-24813: IDLE: Add default title to help_about #2366
  • [3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) #2369
  • bpo-24813: IDLE: Add bitness to About Idle title #2380
  • [3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) #2426
  • bpo-24813: update tagline to Integrated Development and Learning Envi… #2451
  • [3.6] bpo-24813: IDLE tagline is Integrated Development and Learning… #2461
  • Files
  • about.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 = 'https://github.com/terryjreedy'
    closed_at = None
    created_at = <Date 2015-08-07.04:19:41.973>
    labels = ['expert-IDLE', 'type-bug', '3.10']
    title = 'Redesign Help => About IDLE, make it non-modal'
    updated_at = <Date 2020-06-07.23:01:48.196>
    user = 'https://github.com/roseman'

    bugs.python.org fields:

    activity = <Date 2020-06-07.23:01:48.196>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2015-08-07.04:19:41.973>
    creator = 'markroseman'
    dependencies = []
    files = ['40409']
    hgrepos = []
    issue_num = 24813
    keywords = ['patch']
    message_count = 31.0
    messages = ['248167', '248214', '250084', '250235', '296648', '296649', '296656', '296659', '296724', '296726', '296745', '296746', '296747', '296748', '296749', '296785', '296787', '296788', '296790', '296798', '296827', '296834', '296836', '296987', '296990', '296991', '297023', '297071', '297142', '297144', '370921']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'markroseman', 'cheryl.sabella']
    pr_nums = ['2335', '2359', '2366', '2369', '2380', '2426', '2451', '2461']
    priority = 'normal'
    resolution = None
    stage = 'test needed'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24813'
    versions = ['Python 3.10']

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Aug 7, 2015

    No reason for it to be modal. Especially on OS X (where it really isn't...)

    @roseman roseman mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels Aug 7, 2015
    @terryjreedy
    Copy link
    Member

    I am broadening this to include re-evaluation of everything under Help. There are other issues for search on config.

    @terryjreedy terryjreedy changed the title About IDLE dialog shouldn't be modal Idle Help dialogs shouldn't be modal Aug 7, 2015
    @terryjreedy
    Copy link
    Member

    Or we can broaden this in the other direction, to redesign AboutDialog.

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Sep 8, 2015

    Have attached about.patch, which changes the about dialog to no longer be modal, as well as does a substantial redesign, where the various help texts are displayed within the dialog itself, rather than launching (further modal) new windows.

    Note: this new dialog works on both Tk 8.4 and 8.5+

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Jun 16, 2017
    @terryjreedy terryjreedy changed the title Idle Help dialogs shouldn't be modal Redesign Help => About IDLE, make it non-modal Jun 16, 2017
    @terryjreedy terryjreedy self-assigned this Jun 16, 2017
    @terryjreedy
    Copy link
    Member

    The proposed patch does several things that can be considered independently.

    1. Give the 'title' parameter a default value 'About IDLE'. Instead, add the python/IDLE version, as done for IDLE doc in help.py. (In both cases, one might wonder why title is a parameter rather than being calculated within __init__. Perhaps an example of YAGNI.)

    2. Make About IDLE non-modal. The addition of show(), _destroyed(), and changes in AboutDialog.close() are part of this. Modal seems standard, at least on Windows. What about other systems?

    Mozilla FireFox and Thunderbird are obnoxiously semi-modal. Steam launcher is fully modal, with an icon added to the Taskbar, so one can easily find the window to close it. Any patch must make sure this happens. Clicking About Steam menu entry a second time lifts the first window to view. The patch imitates this.

    To me, the main justification to go non-modal is that About IDLE opens documents in custom read-only windows rather than in a browser. README is one that one might want to keep open for awhile. Ditto for a future Roadmap file.

    1. Add an icon with code based on the commented out code we removed (see lines with 'logofn', self.picture, and labelPicture). Yes, but we should try using the better looking "idle_48.png" with tk 8.6.

    2. Change from white on medium gray to black on light gray. I might also try the standard black on white. Or black on python yellow. If we do A. below, the background should work with the blue link tagging.

    3. I believe all 6 of the current linked documents are pre-loaded. I think this unnecessary as they are generally ignored. Load on demand is fine.

    4. Documents are displayed in a new read-only Text that is part of the dialog itself. If we went in this direction, I would want to first try using the new TextviewFrame. But I think it better to open textviews non-modally so one can keep a document around after closing AboutIDLE. I think this will be more true if/when we switch to tabbed notebooks or the equivalent.

    A. What the patch does not do is switch from buttons to blue-underlined links, as I have discussed elsewhere, nor do other rearrangements and changes. I want to move What's New to the top, move the Python license and copyright to the bottom, and remove Python credits. The idle-dev email must be replaced with a link to the idle-dev subscription page, as spam (which continues) prompted a switch to subscription required. This will be a separate issue.

    @terryjreedy
    Copy link
    Member

    Cheryl, I suggest to start with any of 1, 3, and 4. My preference is 3. To be sure of avoiding merge conflicts, I would do one at a time. Narrowly focused PRs should be quick to review, test, and merge.

    @csabella
    Copy link
    Contributor

    I submitted a PR for #3.

    In Mark's patch, he had moved the existing text, email, docs, etc to column 1 instead of column 0 for better looking alignment. I can add that part of the redesign, but for now I just added the icon.

    @terryjreedy
    Copy link
    Member

    I experimented with how the icon looks with different backgrounds, for point 4. Because the paper holes are transparent, white is bad, proposed light gray okay, black is good. Overall white on black is better than white on current dingy gray, so I consider making the background darker rather than flipping colors a possibility. I would suggest using user's color scheme (which has be requested for dialog in general) except that icon on white looks so poor. The htest makes experimenting easy. If you get to 4, give your opinion.

    Another option would be to redo the two files. They are private copies and I believe not used otherwise.

    @terryjreedy
    Copy link
    Member

    New changeset d352d68 by terryjreedy (csabella) in branch 'master':
    bpo-24813: IDLE: Add icon to help_about (bpo-2335)
    d352d68

    @terryjreedy
    Copy link
    Member

    New changeset 1b7474d by terryjreedy in branch '3.6':
    [3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) (bpo-2359)
    1b7474d

    @csabella
    Copy link
    Contributor

    I submitted a PR for #1.

    For #4, I had a question to this related to ttk widgets. When I had moved the widgets to ttk, I had to remove the fg and bg settings because the ttk versions of Label, Frame, and Widget don't have those as part of their config. Do you want me to work on changing the colors without worrying about the ttk versions for now?

    @terryjreedy
    Copy link
    Member

    New changeset 18ede06 by terryjreedy (csabella) in branch 'master':
    bpo-24813: IDLE: Add default title to help_about (bpo-2366)
    18ede06

    @terryjreedy
    Copy link
    Member

    tk Text does not have a ttk version and does have default and tab settable colors. Maybe I should start experimenting with tagged text instead of Labels and Buttons. Let's skip 4 for now. You can work on 'default non-model' (I don't want to toss the modal code quite yet), or do something else, like configdialog. At the moment, I would prefer the latter.

    @terryjreedy
    Copy link
    Member

    New changeset bd570f4 by terryjreedy in branch '3.6':
    [3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (bpo-2369)
    bd570f4

    @terryjreedy
    Copy link
    Member

    There is something more I want to add: the bitness of the machine.

    >>> platform.architecture()
    ('64bit', 'WindowsPE')

    Display as '(64 bit)' or '(32 bit). For the moment, add this to the title since it will not necessarily fit after python version. See the doc note about Macs.

    The reason has to do with import problems people report on Stackoverflow. One possible reason is having multiple interpreters, only some of which have a 3rd party module. Another is mismatched architecture.

    At the same time, change the fg/bg to Mark's suggestion.

    @terryjreedy
    Copy link
    Member

    Please run the full test suite to see if it ends with a warning about test_idle altering something. I cannot because of bpo-30715. I usually save and restore original objects when mocking, but I don't really know when this is and is not needed.

    @csabella
    Copy link
    Contributor

    I had run the full test before pushing the changes without any messages. I didn't run it with any options though.
    --------------

    $:~/cpython/Lib$ /home/cheryl/cpython/python -m test.test_idle
    ..............................................................................................................................................................................................................................................
    ----------------------------------------------------------------------
    Ran 238 tests in 3.684s

    OK
    ------------------------

    I wasn't sure about saving mocked objects either. I thought maybe it was related to the GUI mocks. Should I ask about it on core mentorship?

    @terryjreedy
    Copy link
    Member

    I should have been clearer - the full *python* test suite, not just IDLE, an with gui available -- "python -m test -ugui". I don't think the check is applied with just one file, and definitely not with 'test.test_idle' versus 'test -ugui test_idle'. The former runs test_idle with unittest.main instead of test.regrtest, which calls unittest.main but adds extra stuff.

    Evading this issue is why I sometimes copy a method to be tested to a mock class with mock methods needed for the tested method.

    @csabella
    Copy link
    Contributor

    $:~/cpython/Lib$ /home/cheryl/cpython/python -m test -ugui
    == CPython 3.7.0a0 (heads/bpo24813:48fbe52, Jun 23 2017, 15:42:25) [GCC 5.4.0 20160609]
    == Linux-4.4.0-78-generic-x86_64-with-debian-stretch-sid little-endian
    == hash algorithm: siphash24 64bit
    == cwd: /home/cheryl/cpython/build/test_python_19230
    == CPU count: 4
    == encodings: locale=UTF-8, FS=utf-8
    Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
    Run tests sequentially

    --snip--

    389 tests OK.

    1 test failed:
    test_ttk_guionly

    16 tests skipped:
    test_curses test_devpoll test_kqueue test_msilib test_ossaudiodev
    test_smtpnet test_socketserver test_startfile test_timeout
    test_urllib2net test_urllibnet test_winconsoleio test_winreg
    test_winsound test_xmlrpc_net test_zipfile64

    Nothing from idle:
    0:07:49 load avg: 3.06 [172/406] test_httpservers
    0:07:55 load avg: 3.14 [173/406] test_idle
    0:08:00 load avg: 3.28 [174/406] test_imaplib

    @terryjreedy
    Copy link
    Member

    There are no *nix buildbots running gui tests. Please run
    python3 -m test.test_ttk_guionly -v
    and post failure part of result on core_mentorship or open a tracker issue.

    @csabella
    Copy link
    Contributor

    Sometimes that test fails and sometimes it doesn't, even if I run it several times in a row. When it does fail, it runs a lot longer than when it doesn't. So, I'm trying to figure out the difference before reporting it. Since the failure takes time, I'm thinking it might be resource contention of some sort.

    @terryjreedy
    Copy link
    Member

    You should have enough data to open an issue; make Serhiy Storchaka (and me) nosy. Does the same test fail consistently or not? % of failures. When it takes longer, is there a particular place in the stream of results where it pauses? When I run it on master, it consistently takes 3 seconds, and there is a deprecation warning that I think should be caught in the test.

    @csabella
    Copy link
    Contributor

    Created bpo-30756.

    On Sun, Jun 25, 2017 at 2:10 PM, Terry J. Reedy <report@bugs.python.org>
    wrote:

    Terry J. Reedy added the comment:

    You should have enough data to open an issue; make Serhiy Storchaka (and
    me) nosy. Does the same test fail consistently or not? % of failures. When
    it takes longer, is there a particular place in the stream of results where
    it pauses? When I run it on master, it consistently takes 3 seconds, and
    there is a deprecation warning that I think should be caught in the test.

    ----------


    Python tracker <report@bugs.python.org>
    <http://bugs.python.org/issue24813\>


    @terryjreedy
    Copy link
    Member

    New changeset 9a02ae3 by terryjreedy (csabella) in branch 'master':
    bpo-24813: IDLE: Add build bitness to About Idle title (bpo-2380)
    9a02ae3

    @terryjreedy
    Copy link
    Member

    New changeset 8047f02 by terryjreedy in branch '3.6':
    [3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (bpo-2426)
    8047f02

    @terryjreedy
    Copy link
    Member

    This completes 1,3,and 4. Pause for now as I would like to try my re-arrangement next, before worrying about modality.

    @csabella
    Copy link
    Contributor

    Is this the re-arrangement?

    A. What the patch does not do is switch from buttons to blue-underlined links, as I have discussed elsewhere, nor do other rearrangements and changes. I want to move What's New to the top, move the Python license and copyright to the bottom, and remove Python credits. The idle-dev email must be replaced with a link to the idle-dev subscription page, as spam (which continues) prompted a switch to subscription required. This will be a separate issue.

    Sounds like you want to make the change, but let me know if you'd ike me to take a shot at it.

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Jun 27, 2017

    FYI, just added a trivial pull request to change the tagline in the about dialog to 'integrated development and learning environment'. It's showing up as from python-dev as I hadn't (yet) added my github name to my bpo prefs. Got to start somewhere!

    @terryjreedy
    Copy link
    Member

    New changeset 592eda1 by terryjreedy (Mark Roseman) in branch 'master':
    bpo-24813: IDLE tagline is Integrated Development and Learning Environment (bpo-2451)
    592eda1

    @terryjreedy
    Copy link
    Member

    New changeset 413c0a9 by terryjreedy in branch '3.6':
    [3.6] bpo-24813: IDLE tagline is Integrated Development and Learning Environment (GH-2451) (bpo-2461)
    413c0a9

    @terryjreedy
    Copy link
    Member

    Still needs to make non-modal and consider other ideas.

    @terryjreedy terryjreedy added 3.10 only security fixes and removed 3.7 (EOL) end of life labels Jun 7, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel iritkatriel added the stdlib Python modules in the Lib dir label Nov 23, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes stdlib Python modules in the Lib dir topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    Status: In Progress
    Development

    No branches or pull requests

    3 participants