Skip to content
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

Merged
merged 2 commits into from
Oct 28, 2018

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Oct 28, 2018

Copy link
Contributor

@taleinat taleinat left a 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.

@@ -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
Copy link
Contributor

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.


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.
Copy link
Contributor

@taleinat taleinat Oct 28, 2018

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"?

Suggested change
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)

@terryjreedy
Copy link
Member Author

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?

<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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>

Copy link
Member Author

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.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
‘Squeezed text’ button. This is done automatically for output over N lines
‘Squeezed text’ label. This is done automatically for output over N lines

(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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Squeezed text' button. This is done automatically for output over N lines
'Squeezed text' label. This is done automatically for output over N lines

(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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@taleinat
Copy link
Contributor

taleinat commented Oct 28, 2018

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.

@terryjreedy
Copy link
Member Author

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 terryjreedy merged commit 68d6dc0 into python:master Oct 28, 2018
@bedevere-bot
Copy link

@terryjreedy: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@terryjreedy terryjreedy deleted the squeeze branch October 28, 2018 16:44
@bedevere-bot
Copy link

GH-10179 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2018
…10169)

(cherry picked from commit 68d6dc0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-bot
Copy link

GH-10180 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2018
…10169)

(cherry picked from commit 68d6dc0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this pull request Oct 28, 2018
(cherry picked from commit 68d6dc0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this pull request Oct 28, 2018
(cherry picked from commit 68d6dc0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants