Skip to content

Output cells should not auto-collapse more than once per execution  #7003

@burnpanck

Description

@burnpanck

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

  1. Execute a cell containing long-running code that continuously produces output, such as the following:
import time

for k in range(10):
   print("\n".join(f"- {k}.{v}" for v in range(100 if not k else 20)))
   time.sleep(5)
  1. Try keep the output area expanded and follow the output at it generates. It will constantly collapse away under your nose. If there is a lot of cells/output following the currently executing cell, you'll have a hard time getting back to that output.

Expected behavior

The output area should stay uncollapsed while I'm following the output.

Context

  • Operating System and version: macOS 13.4
  • Browser and version: Chome Version 115.0.5790.114 (Official Build) (arm64)
  • Jupyter Notebook version: 7.0.2

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions