classification
Title: Redesign Help => About IDLE, make it non-modal
Type: behavior Stage: test needed
Components: IDLE Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: csabella, kbk, markroseman, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2015-08-07 04:19 by markroseman, last changed 2017-06-28 03:02 by terry.reedy.

Files
File name Uploaded Description Edit
about.patch markroseman, 2015-09-08 16:42 review
Pull Requests
URL Status Linked Edit
PR 2335 merged csabella, 2017-06-23 00:55
PR 2359 merged terry.reedy, 2017-06-23 16:03
PR 2366 merged csabella, 2017-06-23 20:33
PR 2369 merged terry.reedy, 2017-06-24 00:05
PR 2380 merged csabella, 2017-06-24 17:16
PR 2426 merged terry.reedy, 2017-06-27 02:30
PR 2451 merged python-dev, 2017-06-27 19:43
PR 2461 merged terry.reedy, 2017-06-28 02:45
Messages (30)
msg248167 - (view) Author: Mark Roseman (markroseman) * Date: 2015-08-07 04:19
No reason for it to be modal. Especially on OS X (where it really isn't...)
msg248214 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-08-07 18:59
I am broadening this to include re-evaluation of everything under Help.  There are other issues for search on config.
msg250084 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-07 06:56
Or we can broaden this in the other direction, to redesign AboutDialog.
msg250235 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-08 16:42
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+
msg296648 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-22 17:50
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.

3. 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.

4. 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.

5. 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.

6. 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.
msg296649 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-22 18:34
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.
msg296656 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-23 01:15
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.
msg296659 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-23 02:09
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.
msg296724 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-23 16:00
New changeset d352d689775699c289e011e8cec52c23c600b7fa by terryjreedy (csabella) in branch 'master':
bpo-24813: IDLE: Add icon to help_about (#2335)
https://github.com/python/cpython/commit/d352d689775699c289e011e8cec52c23c600b7fa
msg296726 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-23 17:00
New changeset 1b7474dedcbbd731a362b17abfbd7e5a60b64f63 by terryjreedy in branch '3.6':
[3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) (#2359)
https://github.com/python/cpython/commit/1b7474dedcbbd731a362b17abfbd7e5a60b64f63
msg296745 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-23 23:19
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?
msg296746 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 00:01
New changeset 18ede062581edb7e8d359d02cd3419466114cf5a by terryjreedy (csabella) in branch 'master':
bpo-24813: IDLE: Add default title to help_about (#2366)
https://github.com/python/cpython/commit/18ede062581edb7e8d359d02cd3419466114cf5a
msg296747 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 00:15
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.
msg296748 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 00:19
New changeset bd570f42110b99bade6e58e3ed2d620f27a92fc3 by terryjreedy in branch '3.6':
[3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (#2369)
https://github.com/python/cpython/commit/bd570f42110b99bade6e58e3ed2d620f27a92fc3
msg296749 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 00:27
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.
msg296785 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 19:33
Please run the full test suite to see if it ends with a warning about test_idle altering something.  I cannot because of #30715.  I usually save and restore original objects when mocking, but I don't really know when this is and is not needed.
msg296787 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-24 20:08
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?
msg296788 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 20:19
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.
msg296790 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-24 21:13
$:~/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
msg296798 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 23:54
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.
msg296827 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-25 16:01
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.
msg296834 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-25 18:10
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.
msg296836 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-25 19:03
Created issue 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>
> _______________________________________
>
msg296987 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-27 02:29
New changeset 9a02ae3d3d645f0c8178f3362694f473bab6fe3e by terryjreedy (csabella) in branch 'master':
bpo-24813: IDLE: Add build bitness to About Idle title (#2380)
https://github.com/python/cpython/commit/9a02ae3d3d645f0c8178f3362694f473bab6fe3e
msg296990 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-27 03:09
New changeset 8047f02a4b0db81cb023df1f5ce4cc1c42d17821 by terryjreedy in branch '3.6':
[3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)
https://github.com/python/cpython/commit/8047f02a4b0db81cb023df1f5ce4cc1c42d17821
msg296991 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-27 03:15
This completes 1,3,and 4.  Pause for now as I would like to try my re-arrangement next, before worrying about modality.
msg297023 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-06-27 11:35
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.
msg297071 - (view) Author: Mark Roseman (markroseman) * Date: 2017-06-27 19:47
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!
msg297142 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-28 02:42
New changeset 592eda123329bb5ce2bffcbe3701be6b909f1b2a by terryjreedy (Mark Roseman) in branch 'master':
bpo-24813: IDLE  tagline is Integrated Development and Learning Environment (#2451)
https://github.com/python/cpython/commit/592eda123329bb5ce2bffcbe3701be6b909f1b2a
msg297144 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-28 03:02
New changeset 413c0a92bcc92efe92849fe5e711163da453410b by terryjreedy in branch '3.6':
[3.6] bpo-24813: IDLE  tagline is Integrated Development and Learning Environment (GH-2451) (#2461)
https://github.com/python/cpython/commit/413c0a92bcc92efe92849fe5e711163da453410b
History
Date User Action Args
2017-06-28 03:02:40terry.reedysetmessages: + msg297144
2017-06-28 02:45:57terry.reedysetpull_requests: + pull_request2516
2017-06-28 02:42:12terry.reedysetmessages: + msg297142
2017-06-27 19:47:20markrosemansetmessages: + msg297071
2017-06-27 19:43:02python-devsetpull_requests: + pull_request2508
2017-06-27 11:35:52csabellasetmessages: + msg297023
2017-06-27 03:15:34terry.reedysetmessages: + msg296991
2017-06-27 03:09:47terry.reedysetmessages: + msg296990
2017-06-27 02:30:26terry.reedysetpull_requests: + pull_request2478
2017-06-27 02:29:00terry.reedysetmessages: + msg296987
2017-06-25 19:03:17csabellasetmessages: + msg296836
2017-06-25 18:10:19terry.reedysetmessages: + msg296834
2017-06-25 16:01:54csabellasetmessages: + msg296827
2017-06-24 23:54:29terry.reedysetmessages: + msg296798
2017-06-24 21:13:25csabellasetmessages: + msg296790
2017-06-24 20:19:46terry.reedysetmessages: + msg296788
2017-06-24 20:08:04csabellasetmessages: + msg296787
2017-06-24 19:33:03terry.reedysetmessages: + msg296785
2017-06-24 17:16:42csabellasetpull_requests: + pull_request2430
2017-06-24 00:27:13terry.reedysetmessages: + msg296749
2017-06-24 00:19:48terry.reedysetmessages: + msg296748
2017-06-24 00:15:08terry.reedysetmessages: + msg296747
2017-06-24 00:05:44terry.reedysetpull_requests: + pull_request2419
2017-06-24 00:01:00terry.reedysetmessages: + msg296746
2017-06-23 23:19:59csabellasetmessages: + msg296745
2017-06-23 20:33:21csabellasetpull_requests: + pull_request2417
2017-06-23 17:00:02terry.reedysetmessages: + msg296726
2017-06-23 16:03:29terry.reedysetpull_requests: + pull_request2408
2017-06-23 16:00:31terry.reedysetmessages: + msg296724
2017-06-23 02:09:27terry.reedysetmessages: + msg296659
2017-06-23 01:15:12csabellasetmessages: + msg296656
2017-06-23 00:55:28csabellasetpull_requests: + pull_request2379
2017-06-22 18:34:05terry.reedysetnosy: + csabella
messages: + msg296649
2017-06-22 17:50:13terry.reedysetmessages: + msg296648
2017-06-16 18:55:48terry.reedysetassignee: terry.reedy
stage: test needed
title: Idle Help dialogs shouldn't be modal -> Redesign Help => About IDLE, make it non-modal
versions: + Python 3.7, - Python 2.7, Python 3.5
2015-09-08 16:42:56markrosemansetfiles: + about.patch
keywords: + patch
messages: + msg250235
2015-09-07 06:56:09terry.reedysetmessages: + msg250084
2015-08-07 18:59:29terry.reedysetmessages: + msg248214
title: About IDLE dialog shouldn't be modal -> Idle Help dialogs shouldn't be modal
2015-08-07 04:19:41markrosemancreate