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 = None
created_at = <Date 2018-05-23.05:18:11.915>
labels = ['expert-IDLE', 'type-feature', '3.10']
title = 'IDLE: Make multiple improvements to CodeContext'
updated_at = <Date 2020-12-15.12:52:04.350>
user = 'https://github.com/terryjreedy'bugs.python.org fields:
activity = <Date 2020-12-15.12:52:04.350>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2018-05-23.05:18:11.915>
creator = 'terry.reedy'
dependencies = ['22703', '31493', '32831', '33628', '33642', '33664', '33763', '35521', '35555', '37530']
files = []
hgrepos = []
issue_num = 33610
keywords = ['patch', '3.5regression']
message_count = 39.0
messages = ['317357', '317364', '317480', '317599', '317601', '317651', '317822', '318012', '318351', '318355', '318357', '318358', '318466', '318476', '318562', '318589', '318791', '319240', '319241', '319242', '319243', '332034', '332105', '332312', '347571', '348001', '348078', '348081', '348125', '348126', '348127', '348324', '348325', '348326', '383031', '383033', '383035', '383036', '383048']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'taleinat', 'cheryl.sabella', 'miss-islington']
pr_nums = ['7597', '7598', '7599', '14821', '14822', '14846', '14847', '14913', '14914', '23773', '23774', '23775']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue33610'
versions = ['Python 3.10']Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
terryjreedy commentedon May 23, 2018
[After move to GH issues, I edited multiple comments into task list and deleted comments made obsolete.]
There are a number of possible improvements to CodeContext. They be separate issues (and PRs) that are dependencies of this master index issue. Some should be fairly easy now that we have the new tests.
the state of current windows. Current behavior is buggy.
(Must revise again if windows became panes in master window.)
Implement with
text.xview_scroll(target_topline - current_topline, 'units').and appropriate values, to be determined, to the dark theme.
Or tag just the indents, or, if add line numbers, the line numbers? [Rep
converts mouse click to line number. That can be mapped to text line number for 8. above. Text also enables
Undone items added to new task list below. #77791 (comment)
[-]IDLE: Improve CodeContext (various issues)[/-]terryjreedy commentedon May 24, 2018
With 2. merged, I consider the next priorities to be 5. 66892 (overt bug, highest), 7, and 8, to make the feature more usable.
csabella commentedon May 24, 2018
I've started looking at 5. bpo-22703, more specifically, I've been trying to recreate it. Since the config changes in 3.6/3.7 where the flag was removed from config dialog, the code context needs to be turned on explicitly for each editor. 3.5 has the old behavior.
So, I think the current change would be to add it back to config but with the behavior defined in bpo-22703.
I hope to have a PR within the next few days.
terryjreedy commentedon May 28, 2018
While trying out variable lines, bpo-33642, I encounter two related issues.
First is the context colors. Black on gray is a variant of black on white. I am using the dark theme, white on dark blue. For fixed sized context, the high contrast is okay. For variable context, having lines flip from light on dark to dark on light and back is distracting to obnoxious. So I want to change
9. Reenable user config of context colors?
to
9. Reenable user config of context colors!
Add the current black on gray to the light theme and appropriate values, to be determined, to the dark theme.
Second is getting partial lines at the top of the text box as a result of scrolling with the mousewheel or scrollbar slider. I never liked this but tolerated it. With complete text lines above, it looks awful to me. Hence, I consider the following to be a dependency of this issue.
17. bpo-33664 Scroll by lines instead of sometimes by pixels.
Following the implementation notes for bpo-33664, once the label is changes to text, to get the target topline, 8. can be implemented with
text.xview_scroll(target_topline - current_topline, 'units')
I would like to release multiple user visible improvements at once, at least 7, 9, and 17, so the new code context looks good from the start. 8, menu changes, and 14 could come later.
terryjreedy commentedon Jun 1, 2018
The release candidate has been re-scheduled for June 11. So we should be able to merge the minimal upgrade before that and get it in 3.7.0 and 3.6.6. (The latter will come out at the same time as the former.)
Variable lines is about ready. Colors looks like it should be, with a final test needed after variable lines is merged (or maybe I will reverse the order). That leaves line alignment. If you are working on it, but don't have a PR ready yet, please say so.
terryjreedy commentedon Jun 1, 2018
5, reformulated. Now that 'Code Context' on the Options menu only toggles a feature for the current window, like 'Zoom Height' on the Window menu, both should appear together on the same menu. My current inclination is to move 'Code Context' to Window because a) it is the feature be that will be changed and discussed in What's New, and b) 'Window' otherwise lists individual windows so it more clearly implies that toggles are for the current window without adding a fake menu entry. Agree?
csabella commentedon Jun 1, 2018
I was going to work on it this weekend, but haven't started yet.
I agree that moving Code Context to the Windows menu makes sense.
terryjreedy commentedon Jun 2, 2018
I merged 'variable lines' and edited 'colors' to fix the resulting conflicts. Travis passed the latter so I expect to merge it also. To avoid more conflicts, you should wait to create the 'alignment' branch until 'colors' is merged and pulled into your clone. (We should continue to keep having two pending patches for the same file rare.)
Counter-argument for menu location. Window has 1 to n top-level window items. Options will have just one item without Code Context. So moving Zoom would make things more balanced.
terryjreedy commentedon Jun 3, 2018
After writing the above, I realized that line scroll only touches editor.py, not codecontext.py. On the other hand, the next item, 8. jump to context line did have to wait. Replacing Label with Text will require explicit height setting with each context change. The click handler will be a simplified version of the scroll handler you just wrote. Jumping to a line will look much better when it jumps to a whole rather than a fractional line. Again, one of us should say something before starting.
19 remaining items
erlend-aasland commentedon Jul 27, 2022
Are there more work to be done here, or can we close this issue?
terryjreedy commentedon Jul 28, 2022
1 1/2 years after last activity, revised #77791 (comment) shows some undone tasks. These are copied to new issue #95352.