-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
IDLE: Make multiple improvements to CodeContext #77791
Comments
[After move to GH issues, I edited multiple comments into task list and deleted comments made obsolete.]
Undone items added to new task list below. #77791 (comment) |
With 2. merged, I consider the next priorities to be 5. 66892 (overt bug, highest), 7, and 8, to make the feature more usable.
|
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. |
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 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. Following the implementation notes for bpo-33664, once the label is changes to text, to get the target topline, 8. can be implemented with 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. |
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. |
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? |
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. |
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. |
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. |
Menu location: If Code Context is moved under Windows, maybe Configure IDLE should be moved as well?
|
General Update: We have done 1, 3, 7, 8, 9, 11, 17, 21. Very nice. A re-organized list of the remainder (with old numbers). Docs:
Menu
Code Context Display
Internal Changes
External Changes
|
I2: replace font/hightlight loop with notification and immediate change instead of a delay is a bugfix. In testing PR 14675 for bpo-37530 I discovered a bug. 'Show' always shows a single blank line, as if the top visible line were the top line of the file. One should not have to scroll to trigger the context calculation. This exists now, prior to the new PR. If/when we add a hotkey (M4), once should be able to show, see context, and hide just by hitting hotkey twice. Add C3: Make 'Show' show the context for the current top visible line. |
Terry, on latest master (with the aforementioned PR merged), the context is updated quickly after the code-context is shown. This happens after a delay of up to 100ms due to the update loop. #59026 for new C4. |
Are there more work to be done here, or can we close this issue? |
1 1/2 years after last activity, revised #77791 (comment) shows some undone tasks. These are copied to new issue #95352. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: