microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.99k stars 29.54k forks source link

Making all the code-cell outputs scrollable #228927

Open nhadziosma1 opened 2 months ago

nhadziosma1 commented 2 months ago

Even when editing the setting of VS Code called notebook.output.scrolling to true, the output of a code-cell in a notebook (i.e. file with extension .ipynb) does not get restricted, except when using the function print(...) to create output. image

If you for example try using either:

Is there an option in VS Code which will allow its user to restrict the size of a code-cell output, not matter how the output is created (i.e. no matter if the output is generated using the function display(...), if it is a plot, if it is using the function print(...))?

Note: There was previously a similar issue created: the_issue, but the requestor never wrote a reply to what you had to say. I think that my request is a bit different, because I would not change the fact that each output is independent, but I would only make it possible to make either:

  1. make a setting which would allow the user to specify that if all the outputs of one code-cell exceed some size, to the code-cell output (looking at the code-cell output as an output, no matter if is actually comprised out of multiple outputs logically) scrollable
  2. make it possible to specify for each of the outputs of one code-cell individually to be scrollable if they exceed a certain size.

In my opinion, it would be the best if both of these settings were implemented, but having at least one of the two would do the trick for most of the people.

radekfer commented 2 months ago

A rather clumsy workaround for DataFrames is to change presentation of the cell to text/plain (three dots on the left of the cell output). It will render the table using ASCII and scrolling will be possible...

nhadziosma1 commented 2 months ago

A rather clumsy workaround for DataFrames is to change presentation of the cell to text/plain (three dots on the left of the cell output). It will render the table using ASCII and scrolling will be possible...

I know about this workaround, but thanks for sharing. :D

However, I created this issue in hope that it would incentivise the developers of VS Code to think about the solutions which I am suggesting. Also, I am hopeful that the issue will get enough attraction from other developers, and that this will further encourage the development of one of the proposed solutions.