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

No scrollbar generated for large outputs #5629

Closed
tobiasharren opened this issue Apr 26, 2021 · 4 comments
Closed

No scrollbar generated for large outputs #5629

tobiasharren opened this issue Apr 26, 2021 · 4 comments
Labels
bug Issue identified by VS Code Team member as probable bug upstream-vscode Blocked on upstream VS code

Comments

@tobiasharren
Copy link

Environment data

  • VS Code version: 1.56.0-insider
  • Jupyter Extension version (available under the Extensions sidebar):
  • Python Extension version (available under the Extensions sidebar): v2021.6.780948196
  • OS (Windows | Mac | Linux distro) and version: Ubuntu 20.04.2 LTS
  • Python and/or Anaconda version: Python 3.8.3, conda 4.8.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Local

Expected behaviour

When running a code cell which generates large output (either text, or a series of plots), the ouput cells size should be limited and a scrollbar within the output cell should appear.

(Jupyter: Enable Scrolling For Cell Outputs
is active,
Jupyter: Max Output Size
is 50 (was 200 previously, but lowering it did not help)

Actual behaviour

The entire output is shown as one large chunk without scrollbar.

Steps to reproduce:

create a new file
save a .ipynb file

insert into the first code cell:
for i in range(50): print("test"
insert into a second cell:
from matplotlib import pyplot as plt for i in range(5): plt.figure() plt.plot(range(10), range(10)) plt.show()

run the notebook. (larger numbers lead to the same problem, so it is not just that the threshold is not reached

@tobiasharren tobiasharren added the bug Issue identified by VS Code Team member as probable bug label Apr 26, 2021
@joyceerhl
Copy link
Contributor

joyceerhl commented Apr 26, 2021

@tobiasharren are you using the new native notebooks interface, i.e. it looks like the following?

image

If so, the jupyter.enableScrollingForCellOutputs unfortunately does not apply, as that interface is provided by VS Code. Sorry for the confusion.

There also doesn't seem to be a way to configure this in VS Code settings:

image

Note for engineering triage: we should file this as an upstream issue on VS Code.

@joyceerhl joyceerhl added the info-needed Issue requires more information from poster label Apr 26, 2021
@tobiasharren
Copy link
Author

tobiasharren commented Apr 26, 2021

@joyceerhl thank you for your reply!
Yes that is exactly, what it looks like!

Is it then possible to not apply the native notebooks interface, while this does not work yet?
When right clicking and choosing "Open With" for .ipynb files, I get three choices (as seen in the picture):
vs
the first second one opens the notebook interface as before.
the third goes into an infinite loading progress for my notebook.

Also the "Open in Notebook Editor" option opens it in the same interface.

@joyceerhl
Copy link
Contributor

Yes, you can opt out as follows:

  1. Open the command palette (Ctrl+Shift+P on Windows, Cmd+Shift+P on Mac)
  2. Type 'Preferences: Open Settings (JSON)' and select the first option to open your user settings.json file Command palette
  3. Add the following line to your user settings.json file:
"jupyter.experiments.optOutFrom": ["NativeNotebookEditor"],
  1. If the following entry is present in your user settings.json file, delete it:
"workbench.editorAssociations": [
  {
    "viewType": "jupyter-notebook",
    "filenamePattern": "*.ipynb"
  }
]
  1. Reload Visual Studio Code for the new settings to take effect. You should be opted back into the old Jupyter notebook interface.

@joyceerhl joyceerhl added upstream-vscode Blocked on upstream VS code vscode-notebook and removed info-needed Issue requires more information from poster labels Apr 26, 2021
@joyceerhl
Copy link
Contributor

Closing this issue as we are already tracking this issue in #4406. @tobiasharren please feel free to file a new issue if you run into any other issues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug upstream-vscode Blocked on upstream VS code
Projects
None yet
Development

No branches or pull requests

2 participants