-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
bpo-1529353: Explain Shell text squeezing in the IDLE doc. #10169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great additions! I really should have added these myself when adding Squeezer.
I have only a couple of comments.
Doc/library/idle.rst
Outdated
@@ -477,6 +484,9 @@ or immediately run an existing file before editing. | |||
Python Shell window | |||
^^^^^^^^^^^^^^^^^^^ | |||
|
|||
IDLE's Shell window is a specialized editor window that also responds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDLE's Shell window is a specialized editor window
While technically correct, I find this confusing and think most users will too. If the goal is to explain that the shell window responds to most (all?) of the editor windows' keyboard shortcuts, I recommend writing that more explicitly.
Doc/library/idle.rst
Outdated
|
||
Squeeze | ||
If the cursor is over an output line, squeeze all the output between | ||
the code above and the prompt below down to a 'Squeezed text' button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a 'Squeezed text' button
While it's implemented as a button, it doesn't quite behave like one, so this may be confusing to users. Perhaps "a 'Squeezed text' label"?
the code above and the prompt below down to a 'Squeezed text' button. | |
the code above and the prompt below down to a 'Squeezed text' label. |
(later in the doc as well)
Thank you for the suggestions. Github has a new feature for making and accepting suggestions. When you click on the blue button with white +, the left most icon is a page with + over -. The tool tip is 'make a suggestion'. It is supposed to turn a suggestion into a mini-diff, which I should be able to accept. It will then apply the diff as a mini commit. Can you try it so I can see how it works from the PR author side? |
Lib/idlelib/help.html
Outdated
<dl class="docutils"> | ||
<dt>Squeeze</dt> | ||
<dd>If the cursor is over an output line, squeeze all the output between | ||
the code above and the prompt below down to a ‘Squeezed text’ button.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code above and the prompt below down to a ‘Squeezed text’ button.</dd> | |
the code above and the prompt below down to a ‘Squeezed text’ label.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it would work great, except I just realized that IDLE doc changes have to be made in parallel in both the .rst and .html files. That is easiest to do by changing the .rst on my machine and then generating the revised .html with Sphinx.
Lib/idlelib/help.html
Outdated
@@ -493,6 +502,13 @@ <h3>Python Shell window<a class="headerlink" href="#python-shell-window" title=" | |||
</ul> | |||
</li> | |||
</ul> | |||
<p>Shell also has a special facility for squeezing output lines down to a | |||
‘Squeezed text’ button. This is done automatically for output over N lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
‘Squeezed text’ button. This is done automatically for output over N lines | |
‘Squeezed text’ label. This is done automatically for output over N lines |
Lib/idlelib/help.html
Outdated
(N = 50 by default). N can be changed in the PyShell section of the General | ||
page of the Settings dialog. Fewer lines can be squeezed by right clicking | ||
on the output. This can be useful for extra long lines. Squeezed output can | ||
be expanded in place by double-clicking the button. It can instead be sent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be expanded in place by double-clicking the button. It can instead be sent | |
be expanded in place by double-clicking the label. It can instead be sent |
Lib/idlelib/help.html
Outdated
page of the Settings dialog. Fewer lines can be squeezed by right clicking | ||
on the output. This can be useful for extra long lines. Squeezed output can | ||
be expanded in place by double-clicking the button. It can instead be sent | ||
to the clipboard or a separate view window by right-clicking the button.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the clipboard or a separate view window by right-clicking the button.</p> | |
to the clipboard or a separate view window by right-clicking the label.</p> |
Doc/library/idle.rst
Outdated
@@ -492,6 +502,13 @@ Python Shell window | |||
|
|||
* :kbd:`Return` while on any previous command retrieves that command | |||
|
|||
Shell also has a special facility for squeezing output lines down to a | |||
'Squeezed text' button. This is done automatically for output over N lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Squeezed text' button. This is done automatically for output over N lines | |
'Squeezed text' label. This is done automatically for output over N lines |
Doc/library/idle.rst
Outdated
(N = 50 by default). N can be changed in the PyShell section of the General | ||
page of the Settings dialog. Fewer lines can be squeezed by right clicking | ||
on the output. This can be useful for extra long lines. Squeezed output can | ||
be expanded in place by double-clicking the button. It can instead be sent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be expanded in place by double-clicking the button. It can instead be sent | |
be expanded in place by double-clicking the label. It can instead be sent |
Doc/library/idle.rst
Outdated
page of the Settings dialog. Fewer lines can be squeezed by right clicking | ||
on the output. This can be useful for extra long lines. Squeezed output can | ||
be expanded in place by double-clicking the button. It can instead be sent | ||
to the clipboard or a separate view window by right-clicking the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the clipboard or a separate view window by right-clicking the button. | |
to the clipboard or a separate view window by right-clicking the label. |
I gave the "Suggestion" feature a shot but I'm not thrilled with the experience. Suggestions are each limited to a single line. In this case, at least, I'd have preferred somehow supplying a diff, e.g. a PR for merging into this branch. In it's current form it seems great for suggesting fixes for typos, minor grammatical errors, minor style issues etc., but ISTM that's about it. |
Editing someone else's PR by pulling and pushing is described in the devguide. But only core devs can do so. Socially, this works better when the author is not, unless one asks first. Until she becomes a core dev, Cheryl could make line suggestions (such as when changing markup). I need to learn to pull such edits into my branch, especially for edits to idle.rst (so I can generate the matching help.html). In any case, I replaced 'shell is editor' and changed 'button' to 'label'. Buttons should respond to a single click, and these don't. I am going to merge and work on another IDLE doc issue. |
@terryjreedy: Please replace |
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
GH-10179 is a backport of this pull request to the 3.7 branch. |
GH-10180 is a backport of this pull request to the 3.6 branch. |
(cherry picked from commit 68d6dc0) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 68d6dc0) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
https://bugs.python.org/issue1529353