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

Auto-scrolling of long output should be configurable in the UI #2172

Closed
fperez opened this issue Jul 20, 2012 · 20 comments · Fixed by #7522
Closed

Auto-scrolling of long output should be configurable in the UI #2172

fperez opened this issue Jul 20, 2012 · 20 comments · Fixed by #7522
Labels
Milestone

Comments

@fperez
Copy link
Member

fperez commented Jul 20, 2012

We've had on-list, in person and here (#2154) various requests for different thresholds or behaviors regarding auto-scrolling. Ultimately there's no one good default that fits all cases, so this should have a UI control for users to enable/disable the feature as well as changing the threshold.

@tkf
Copy link
Contributor

tkf commented Jul 20, 2012

Continuing the discussion from #2154.
I didn't have "multi-thousand line cells" in mind and what you said makes sense. I think the problem is two-fold: one is that every has different threshold as you said; the other is that the threshold for editing and viewing is different. Please consider having two different configurable variable to set the threshold.

@nehalecky
Copy link

Hey all, sorry to bother, but what is the status on this?

It would be great if this functionality (ability to turn on or off auto-scrolling of cell output) could also be attached to a toggle parameter unique for each cell. Sometimes there are things that I want to be printed out in their entirety (such as a list of plots generated in a loop), while other times, auto-scrolling for a long printed output is preferable.

Is this much work to implement?

@Carreau
Copy link
Member

Carreau commented Mar 10, 2013

Hi,

I see that this is marked as wishlist, this mostly mean that there are no date planned for this feature.
But would someone implement it correctly, it would have chances to be merged.

configure it globally shouldn't be hard :

OutputArea.prototype._should_scroll = function(){return false}

Plus write the UI. On a per/cell basis slightly more difficult as this lives in OutputArea, and Cell does have the metadata.

So difficulty, I would say medium, because it is long to do, and involve a lot of cases where you desactivate while it is collapsed... and so on on so forth.

I think we should be able to have enough hooks to allow the configurability on a per cell basis through extensions.

@nehalecky
Copy link

Thanks @Carreau for the reply! I will use the tip suggested and if I get time, I will dig in more and see how I can contribute!

@minrk
Copy link
Member

minrk commented Mar 10, 2013

I think the right answer is to add 'scroll' state to the output area, with three states: true / false / auto. Should be easy enough.

@ellisonbg
Copy link
Member

I am a hesitant to add more complexity to how output is handled without
having some very careful design discussions about this stuff. I think what
we have now is pretty good, but there are still ways I find it awkward -
but I am not at all convinced that adding the proposed configurability
wills solve anything. If there really is a usability problem, let's fix it

  • not just punt and make it configurable.

On Sun, Mar 10, 2013 at 10:47 AM, Matthias Bussonnier <
notifications@github.com> wrote:

Hi,

I see that this is marked as wishlist, this mostly mean that there are no
date planned for this feature.
But would someone implement it correctly, it would have chances to be
merged.

configure it globally shouldn't be hard :

OutputArea.prototype._should_scroll = function(){return false}

Plus write the UI. On a per/cell basis slightly more difficult as this
lives in OutputArea, and Cell does have the metadata.

So difficulty, I would say medium, because it is long to do, and involve a
lot of cases where you desactivate while it is collapsed... and so on on so
forth.

I think we should be able to have enough hooks to allow the
configurability on a per cell basis through extensions.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2172#issuecomment-14685420
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@minrk
Copy link
Member

minrk commented Mar 10, 2013

@ellisonbg I'm not talking about making it configurable, I'm just talking about recording state - right now there is no information about whether the user has told a cell to stay uncollapsed, so if more output comes it is automatically collapsed again, which is super annoying. Recording the autoscroll state, just like we already do with the collapsed state, solves that issue. No configuration is added.

@ellisonbg
Copy link
Member

Ahh, sorry I was reading the title of this issue. I fully agree the state
should be saved in the cell metadata.

On Sun, Mar 10, 2013 at 4:43 PM, Min RK notifications@github.com wrote:

@ellisonbg https://github.com/ellisonbg I'm not talking about making it
configurable, I'm just talking about recording state - right now there is
no information about whether the user has told a cell to stay uncollapsed,
so if more output comes it is automatically collapsed again, which is *
super* annoying. Recording the autoscroll state, just like we already do
with the collapsed state, solves that issue. No configuration is added.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2172#issuecomment-14692235
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@nehalecky
Copy link

@minrk, if this could be implemented, that would be awesome. I am just starting to dig into IPython development (a wonderful tool btw, thank you for all the work), so I will have to dedicate some time looking into this, when I am able. Not much time now, but will try hopefully soon. :)

@ngoldbaum
Copy link
Contributor

@minrk did this ever get implemented? I'm still seeing auto-scrolling getting reset after re-evaluating cells in IPython 2.2.

@minrk
Copy link
Member

minrk commented Aug 23, 2014

Nope, not yet. The metadata for the state is added in nbformat 4, but the code hasn't been written.

@flxb
Copy link

flxb commented Aug 28, 2014

To fix the annoyances temporarily, create a code block with:

%%javascript
IPython.OutputArea.auto_scroll_threshold = 9999;

and execute.

@axsk
Copy link

axsk commented Oct 13, 2014

this died :(
i would appreciate the feature 👍

@uriva
Copy link

uriva commented Jan 23, 2015

+1

@dwt
Copy link

dwt commented Apr 3, 2015

I'd like to add another use case here, I would often like to use graphs that are slightly larger than the default scroll region size, which makes them very awkward to use (bokeh user here). So please allow setting the threshold some way.

@jankatins
Copy link
Contributor

Just because I found this earlier than the right solution (and the above didn't work anymore to disable the scolling):

https://github.com/minrk/ipython_extensions/blob/master/extensions/disable_autoscroll.py

-> just execute the JS in a %%javascript does the trick...

@birdmw
Copy link

birdmw commented Sep 15, 2015

wish it was a thing

@matthewmacleod
Copy link

I just found this issue since I was googling to figure out how to turn off auto scrolling. It would be useful and appreciated if someone had time to fix this. I mean the ability to turn auto-scrolling on and off. Thanks.

@matthewmacleod
Copy link

I had trouble getting the above javascript to work on my computer, but I was able to get the ipython notebook extensions here to work:

https://github.com/ipython-contrib/IPython-notebook-extensions

@mdengler
Copy link

The original request was for:

a UI control for users to enable/disable the feature as well as changing the threshold.

Plumbing code is in place to enable such a UI (for #1 enable/disable and #2 changing the threshold). Are you still open to contributions for such a UI? The commit that closed this issue was about persisting the per-cell scroll state metadata, which is different from the original request (the commit is/was needed to implement a solution to this issue, which is great).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.