-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Output cells should not auto-collapse more than once per execution #7003
Comments
Thanks @burnpanck for reporting 👍
Thanks! The implementation in Notebook 7 is a bit clunky at the moment and was added here only to mimic the behavior of the classic notebook. For reference the code is available here: notebook/packages/notebook-extension/src/index.ts Lines 290 to 375 in b5133c6
Ideally a more robust (and configurable) implementation will be implemented in JupyterLab first (as part of jupyterlab/jupyterlab#11760) so it can be reused in Notebook 7 directly. |
I'm not sure how this worked in the notebook versions < 7, but I actually had trouble reproducing the auto-collapsing behaviour for the video above after I had tested it before screen-recoding. Maybe it has nothing to do with "once per execution", but rather that with notebook < 7, expanding the collapsed output would set the scroll-mode explicitly, which would then prevent any auto-scroll: notebook/packages/notebook-extension/src/index.ts Lines 315 to 319 in b5133c6
So then, the difference in the user-experience really would come from the fact that the new notebook doesn't set that scrolled metadata when the user undoes the auto-scroll, or at least not in a way for the above code to notice.
|
I fear this is going to take some time. Given that the current auto-collapse behaviour is extremely disruptive to some workflows, is there a workaround available, e.g. just completely disabling that behaviour? |
The classic notebook also had some arbitrary thresholds: notebook/notebook/static/notebook/js/outputarea.js Lines 96 to 120 in a9a31c0
Sure. You can disable the corresponding plugin:
|
For those who end up here because they want to completely deactivate the auto-scroll behavior. Go to "Setting" > "Settings Editor" > "Jupyter Notebook Notebook" and uncheck "Auto Scroll Outputs". Note, the menu item "Settings Editor" is not available in the notebook view, only in the file browser. |
Description
I just upgraded to jupyter notebook 7.0, thus migrating from the "classic" experience to the "jupyterlab" based version. With that migration, my user-experience has degraded significantly. I have a notebook that hosts a number of weakly related interactive tasks that I run sporadically while exploring a problem. The output from some of these cells can sometimes be 100s of lines long. In general, that output being collapsed is great, but while a specific task is running, I want to be able to use the full screen real-estate to monitor the (long-running) task as it goes. Previously, I would un-collapse the output after it started, and then be able to just follow the output, as it is generated. Now, if I attempt to do that, after a several seconds and potentially hundreds of lines of output later, it auto-collapses again. All of a sudden, this leaves me (who followed the output in the uncollapsed state) in the middle of nowhere far away in that document. It appears, previously (Notebook v 6.x), it would only auto-collapse once per execution, but now it does it repeatedly.
(I have been directed here from the JupyterLab repo, where I reported the same issue: jupyterlab/jupyterlab#11760 )
Reproduce
Expected behavior
The output area should stay uncollapsed while I'm following the output.
Context
Screencast
Both examples show the same notebook executed in two different versions of jupyter notebook.
I have added one cell above and below each containing dummy output (
(pre-fill)
and(post-fill)
) to highlight the user experience if that happens in the middle of a long notebook.Version 7.0.2
Bad.Autocollapse.mov
Version 6.5.5
Good.Autocollapse.mov
The text was updated successfully, but these errors were encountered: