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

PR: Show a warning telling people how to get out of the pager (IPython console) #14418

Merged
merged 6 commits into from
Dec 17, 2020

Conversation

ccordoba12
Copy link
Member

Description of Changes

The IPython console has a pager to show long texts in a separate widget to not overflow it with them. It was deactivated by default, but I removed that option with PR #14056 because I thought the pager was broken.

However, our users quickly found out that was not the case and @OverLordGoldDragon suggested we should add a warning to tell people how to get out of the pager. And that's what I've done in this PR.

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

pager

Issue(s) Resolved

Fixes #14192.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: ccordoba12

@ccordoba12 ccordoba12 added this to the v4.2.1 milestone Dec 14, 2020
@ccordoba12
Copy link
Member Author

ccordoba12 commented Dec 14, 2020

@isabela-pf, @juanis2112, I'd like to know your opinion about this feature. Is the idea of a pager grasped by you only by seeing the gif I posted above? That's basically the same experience our users will have.

Unfortunately, I couldn't find a reference in the web we could link to to better describe this.

@OverLordGoldDragon
Copy link
Contributor

Unsure the bar occupying the entire width is the best we can do. Few alternatives:

  1. (A) Q return to Console -- (B) Press Q to exit pager; shorter text that helps the below, and ought to suffice as it should be pretty clear to user that "I'm not in console" (and thus the "pager" thing in B is where I'm at).
  2. Make the bar <div> half in width, and pin it to the right, away from text, maybe to top-right as user scrolls for new text from bottom.
  3. Move info to console row:

image

  1. Mark the Console with a star (like an edited file), and when hovered over, display the tooltip
  2. Maybe best of all: autohide the bar after 1-2 secs, then bring it up again only if the user presses any key (as 99% of people will trying to restore the console).

@juanis2112
Copy link
Contributor

Thanks @OverLordGoldDragon, we like your first suggestion. We will make the text be "Press Q to exit pager" but autohiding it can be confusing if people miss the warning. Also the space on top is used when there are several tabs open so using that place for the warning might not be the best idea.

- It can't be imported regularly because it loads some QtAwesome icons
and that requires a QApplication running (which is created by the
main_window fixture).
- This allows us to run the Main Window tests independently again.
@ccordoba12
Copy link
Member Author

@steff456 suggested that we should only add a blue border around the pager message. This is how things look with that change:

Selección_070

And this how they look with the old style and new text suggested by @OverLordGoldDragon:

Selección_071

I think I prefer the second option because it seems easy to miss the warning with the first (as it looks part of the paged text).

@ccordoba12
Copy link
Member Author

ccordoba12 commented Dec 17, 2020

Here it's another suggestion: a red border around the label

Selección_072

@steff456
Copy link
Member

By seeing all the options I also prefer the blue background

@ccordoba12 ccordoba12 merged commit 65078d2 into spyder-ide:4.x Dec 17, 2020
@ccordoba12 ccordoba12 deleted the issue-14192 branch December 17, 2020 15:06
ccordoba12 added a commit that referenced this pull request Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants