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

Prevent interactive window from snapping to bottom on new output #3269

Closed
janosh opened this issue Jul 15, 2019 · 20 comments
Closed

Prevent interactive window from snapping to bottom on new output #3269

janosh opened this issue Jul 15, 2019 · 20 comments
Assignees

Comments

@janosh
Copy link
Contributor

janosh commented Jul 15, 2019

I'd like to suggest either adding an option for or (better still in my opinion) making it the default for the Python interactive window not to jump to the bottom every time a new cell output is generated. That effectively makes it impossible to inspect previous results nearer the top of the window while a computation is still in progress and producing new output.

jumping-interactive-window

@rchiodo
Copy link
Contributor

rchiodo commented Jul 16, 2019

You could add a setting for this if you wanted to. I don't think we're going to change the default to not scroll though. Maybe we could change how it behaves though. Only scroll to the bottom when the cells in progress are all finished.

@janosh
Copy link
Contributor Author

janosh commented Jul 16, 2019

Only scroll to the bottom when the cells in progress are all finished.

That'd be much better already! FWIW, I honestly don't think many people appreciate windows scrolling themselves though.

@rchiodo
Copy link
Contributor

rchiodo commented Jul 16, 2019

Our original thought is it's much like any other output window that auto scrolls to the bottom. You want to see the last piece of output. This is like say build output, or a chat window.

We might also limit this ability to only do so if the window is already scrolled to the bottom. Some other continuous outputting windows do that.

@janosh
Copy link
Contributor Author

janosh commented Jul 16, 2019

Some other continuous outputting windows do that.

That's true. And if you're already at the bottom, it definitely makes sense to keep the window there. As for jumping to the bottom when all work is finished, I'm still not sure it's better to do do it than not to. But like you said, a setting for that would probably be best.

@greazer
Copy link
Member

greazer commented Jul 22, 2019

We should disable auto-scroll if the user isn't at the bottom of the history window. Just like the output window in VSCode and VS.

@DavidKutu DavidKutu self-assigned this Aug 1, 2019
@greazer
Copy link
Member

greazer commented Aug 9, 2019

@DavidKutu See microsoft/vscode-python#5317 as well

@janosh
Copy link
Contributor Author

janosh commented Aug 9, 2019

We should disable auto-scroll if the user isn't at the bottom of the history window. Just like the output window in VSCode and VS.

Couldn't agree more. 👍 This is my number one remaining pain point. Pretty much everything else about the Python experience in VSCode has gotten really awesome.

@DavidKutu
Copy link

We should disable auto-scroll if the user isn't at the bottom of the history window. Just like the output window in VSCode and VS.

Couldn't agree more. 👍 This is my number one remaining pain point. Pretty much everything else about the Python experience in VSCode has gotten really awesome.

You can try it out now on master.
https://github.com/microsoft/vscode-python

@DavidKutu DavidKutu reopened this Aug 12, 2019
@janosh
Copy link
Contributor Author

janosh commented Aug 12, 2019

It's fine by me to close this or is anything still missing?

@rchiodo
Copy link
Contributor

rchiodo commented Aug 12, 2019

We don't usually close things until they ship in the official release. That won't be till the end of the month.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 3, 2019

@DavidKutu did you see @janosh 's comment on your PR for this? It looks like in some cases it's not working correctly.

@janosh
Copy link
Contributor Author

janosh commented Sep 3, 2019

@DavidKutu I can't reply to your question in the PR as it's locked as resolved and limited to collaborators, hence my reply here.

Hi @janosh I'll be checking this today. Do you by any chance have the code that's generating the large output? Is it a large plot?

Yes or even just displaying regular sized dataframes. Running this code for instance will cause dataframes to extend outside the viewport without the interactive window snapping to bottom.

#%%
import IPython
import pandas as pd

#%%
df = pd.DataFrame(pd.np.random.randint(1, 10, (10, 10)))

#%%
for i in range(10):
    IPython.display.display(df)

@DavidKutu
Copy link

Thank you @janosh!

@yohei-h
Copy link

yohei-h commented Sep 6, 2019

Is it possible to select the previous version in Preferences? I want to enable auto-scroll.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 6, 2019

You could do that and turn off auto updates by installing it from here:
https://github.com/microsoft/vscode-python/releases/tag/2019.8.30787

However David is about to release a fix for the auto scrolling. Like in the next couple of hours.

@yohei-h
Copy link

yohei-h commented Sep 6, 2019

Thank you, @rchiodo!

@rchiodo
Copy link
Contributor

rchiodo commented Sep 6, 2019

A new release just went out with the fix for this.

This one here:
https://github.com/microsoft/vscode-python/releases/tag/2019.9.34911

@rchiodo rchiodo closed this as completed Sep 6, 2019
@DavidKutu
Copy link

@janosh
The release from today fixes it.

@janosh
Copy link
Contributor Author

janosh commented Sep 7, 2019

Nice! Fix confirmed. It now sticks to the bottom like a charm.

I had to install it from VSIX to get the latest changes even though I set "python.insidersChannel": "daily". Was this fix not included in the insider's build?

@rchiodo
Copy link
Contributor

rchiodo commented Sep 9, 2019

Insider's build is having trouble at the moment. This was shipped as a release fix though, so the main vsix should have it.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 16, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants