Repository navigation
Closed
Labels
Description
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 2017-08-26.20:14:28.308>
created_at = <Date 2017-06-26.22:47:15.903>
labels = ['expert-IDLE', 'type-feature', '3.7']
title = 'IDLE: configdialog -- switch to ttk widgets.'
updated_at = <Date 2017-11-29.03:46:38.273>
user = 'https://github.com/terryjreedy'bugs.python.org fields:
activity = <Date 2017-11-29.03:46:38.273>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2017-08-26.20:14:28.308>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2017-06-26.22:47:15.903>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 30781
keywords = []
message_count = 19.0
messages = ['296964', '299440', '299441', '299451', '299453', '299454', '299455', '299464', '299481', '299491', '300812', '300890', '300903', '300905', '301848', '301852', '301853', '307201', '307207']
nosy_count = 2.0
nosy_names = ['terry.reedy', 'cheryl.sabella']
pr_nums = ['2654', '2938', '2944', '3214', '3215', '3238', '3489', '4627', '4630']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue30781'
versions = ['Python 3.6', 'Python 3.7']
Activity
terryjreedy commentedon Jun 26, 2017
Change imports and see what else needs fixing.
bpo-27755 is one specific ttk switch that could be done before, as part of, or after this.
This issue depends on bpo-30780 test GUI
terryjreedy commentedon Jul 28, 2017
New PR replaces the custom TabbedPageSet with ttk.Notebook. On Windows, with default settings, the look is nearly identical, but the selected tab is more obvious. A method call (note.enable_traversal) will enable navigation between tabs with cntl-tab and cntl-shift-tab. This will work a bit better with extracted page classes.
On the otherhand, attaching the frame to a notebook instead of the one disables one of the simulated mouse clicks. I added the remaining part of tkinter.test.support.simulate_click(sp??) to no avail (not surprising since designed for Xwindows. I also moved the location of the simulated click. Using ttk.Frame requires the padx, pady to padding change in PR2654.
Please test on linuxes (and mac if possible). Does the tabset look at least as good? Does the test run if the #s are removed?
csabella commentedon Jul 29, 2017
Looks good under Ubuntu. The height of the window is longer, so everything is a bit stretched out. That helps on the Keys tab, but not so much on Highlights or Extensions. It's not awful, but there's unneeded (for now?) empty space.
One thing that's different is that there is an initial focus selected on each tab when switching tabs, but then focus is lost when moving back to another tab.
Example: When the config dialog is opened, focus is on the fonts, like it was after Louie's change. However, when I first click 'Keys', there is a box around 'Use a Built-in Key Set', even if it isn't selected. So, that's new (there was no focus before). When I then click back to 'Fonts', the fontlist doesn't have focus anymore. Before this change, fontlist still had focus after switching to another tab and then going back to fonts. Might be why the test isn't working.
All the tests pass, but I get the error if I uncomment the helplist tests:
======================================================================
FAIL: test_source_selected (idlelib.idle_test.test_configdialog.GeneralTest)
----------------------------------------------------------------------
terryjreedy commentedon Jul 29, 2017
I did not try to match the height in that commit. I wanted to see what would happen if we enlarge the dialog to accommodate more widgets. It is now about 10% larger. The highlight sample looks better with a bit more room. The font sample works better in that the box does not expand until it has to. The total size does not change.
Focus traversal has been neglected on C.D., which is a bit of a bug. On the original, the focus disappears and comes back. On the notebook it visibly cycles around one tab, including the tab. I changed takefocus to True for fontlist and helplist.
When focus is on a tab, Left and Right change tabs. With the enable call, Cntl_Tab and Cntl-Shift-Tab always work to change tabs.
I decided to push this in spite of the test problem. It is easy to check that helplist clicking work on htest. Maybe fixing up and down on helplist, as done with fontlist, will somehow help. This is a usability bug, not a test bug. I should make the boxes identical before giving up.
terryjreedy commentedon Jul 29, 2017
New changeset b331f80 by Terry Jan Reedy in branch 'master':
bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (bpo-2938)
b331f80
terryjreedy commentedon Jul 29, 2017
The 'this' in 'this is a usability bug' refers to the fact that up and down move the blue selection highlight but not the selection, so that delete does not necessarily delete what appears to be selected.
terryjreedy commentedon Jul 29, 2017
New changeset 8364fef by Terry Jan Reedy in branch '3.6':
[3.6] bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (GH-2938) (bpo-2944)
8364fef
csabella commentedon Jul 29, 2017
I wonder if the usability bug is related to bpo-25684, even though it's a different widget. The reason I'm suggesting that is that I had converted the DynOptionMenu to be a ttk.OptionMenu in configdialog, but when I did that, that selection of a target tag on the highlight screen and the clicking of a target within highlight_sample didn't stay in sync, and that sounds very much like what it happening in helplist.
My patch for 25684 fixed the reported issue, but also fixed what I was seeing in configdialog.
terryjreedy commentedon Jul 29, 2017
I will check for anything even vaguely related. In any case, your comment reminded me to give your PR a boost. Too bad it will miss 3.5.
terryjreedy commentedon Jul 30, 2017
I fixed the test problem by selecting the General page in the class setup with d.note.select(3). Then the focus_force to a widget on the page must have worked.
csabella commentedon Aug 24, 2017
I rebased my PR and updated the tests so that they would pass. I knew 'bg' on the frame would be changed, but I was surprised by the 'state' changes. 'normal' only exists for compatibility and isn't one of the states to check in the tests; instead, 'disabled' and '!disabled' set the state and either 'disabled' appears in the tuple or it doesn't appear. I suppose I could have changed the tests to be assertNotIn.
https://docs.python.org/3/library/tkinter.ttk.html#widget-states
terryjreedy commentedon Aug 26, 2017
New changeset 7028e59 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-30781: IDLE - use ttk widgets in configdialog (bpo-2654)
7028e59
terryjreedy commentedon Aug 26, 2017
New changeset 7b55602 by Terry Jan Reedy in branch '3.6':
[3.6] bpo-30781: IDLE - use ttk widgets in configdialog (GH-2654) (bpo-3214)
7b55602
terryjreedy commentedon Aug 26, 2017
Main effects on Windows:
Font sample left-justified instead of centered. No necessarily bad.
Overall, a slight improvement even on Windows. We can tweak details when revising individual pages.
The dynamic option menus look out of place, and should be replaced.
terryjreedy commentedon Sep 11, 2017
New changeset 3866d9b by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-30781: IDLE: Fix help button on configdialog (bpo-3238)
3866d9b
terryjreedy commentedon Sep 11, 2017
New changeset 4a8b53a by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-30781: IDLE: Fix help button on configdialog (GH-3238) (bpo-3489)
4a8b53a
terryjreedy commentedon Sep 11, 2017
I moved PR3215 to bpo-27755. So this issue is really closed.
terryjreedy commentedon Nov 29, 2017
New changeset e8f7c78 by Terry Jan Reedy in branch 'master':
bpo-30781: Remove unused imports in idlelib.configdialog. (bpo-4627)
e8f7c78
terryjreedy commentedon Nov 29, 2017
New changeset a8de696 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
bpo-30781: Remove unused imports in idlelib.configdialog. (GH-4627) (bpo-4630)
a8de696