bpo-1529353: Explain Shell text squeezing in the IDLE doc. by terryjreedy · Pull Request #10169 · python/cpython · GitHub
Skip to content

bpo-1529353: Explain Shell text squeezing in the IDLE doc.#10169

Merged
terryjreedy merged 2 commits into
python:masterfrom
terryjreedy:squeeze
Oct 28, 2018
Merged

bpo-1529353: Explain Shell text squeezing in the IDLE doc.#10169
terryjreedy merged 2 commits into
python:masterfrom
terryjreedy:squeeze

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Oct 28, 2018

Copy link
Copy Markdown
Member

@taleinat taleinat left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread Doc/library/idle.rst Outdated

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

Comment thread 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.

@taleinat taleinat Oct 28, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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?

Comment thread 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>

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

Comment thread Lib/idlelib/help.html Outdated
</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
Copy Markdown
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

Comment thread 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

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

Comment thread 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>

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

Comment thread Doc/library/idle.rst Outdated
* :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
Copy Markdown
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

Comment thread 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

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

Comment thread 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.

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

taleinat commented Oct 28, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

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

@miss-islington

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

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
Copy Markdown

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