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

Test: Scrollable notebook output #177719

Closed
3 tasks done
amunger opened this issue Mar 20, 2023 · 3 comments
Closed
3 tasks done

Test: Scrollable notebook output #177719

amunger opened this issue Mar 20, 2023 · 3 comments

Comments

@amunger
Copy link
Contributor

amunger commented Mar 20, 2023

Refs: #175778

Complexity: 5

Authors: @amunger, @rebornix

create issue

Create Issue


  1. Ensure "notebook.output.scrolling": true
  2. Create a new notebook file
  3. Run a few cells with large outputs, examples below
  4. Play around with different combinations of related settings (might require reloading vs code): notebook.output.textLineLimit, notebook.output.wordWrap, notebook.outputLineHeight
  5. Search for terms within the output different test item
  6. Set notebook.experimental.outputScrolling to false, reload the notebook, then change it back to true (a link should appear to refresh each output)

Try on insiders.vscode.dev as well by either:
re-opening that same noteboook with output
or
Start up a jupyter server from a command prompt to provide kernels
1. python -m pip install jupyter
2. python -m jupyter notebook --no-browser --NotebookApp.allow_origin=*
3. copy the URL that the previous command provides and
4. open a notebook -> select kernel -> existing Jupyter Server -> paste the URL from step 3

Some examples to try

Two scrollable output elements for one cell

install pandas first %pip install pandas within a cell

import pandas as pd

for i in range(100):
    print(i)

data = {'A': [1, 2], 'B': [3, 4]}
df = pd.DataFrame(data)

# This line will generate a KeyError because column 'C' does not exist in the DataFrame
print(df['C'])

Streaming output

the scroll bar should stick to the bottom unless it is scrolled up, also notice that the decorations change as it becomes a scrollable element.

import time
for i in range(200):
    time.sleep(.1)
    print(i)

Longer than the hard limit of 5000 lines

for i in range(5005):
    print(i)

Known issues

clicking output that contains a link will scroll to that link
can't drag scrollbar while output is being updated
wrong cursor type when hovering scrollbar
Notebook output has no focus border when setting focus to it
Notebook output scrollbar should fade away

@chrmarti
Copy link
Contributor

The experimental setting keeps updating to "notebook.output.scrolling". I guess that replaces it and it is good to test with that?

@amunger
Copy link
Contributor Author

amunger commented Mar 21, 2023

The experimental setting keeps updating to "notebook.output.scrolling". I guess that replaces it and it is good to test with that?

whoops, yes. The setting was updated and migrated. (so thanks for testing that as well)
updated the instructions.

@Tyriar
Copy link
Member

Tyriar commented Mar 21, 2023

I could only install jupyter by changing python to python3 as 2.7 is on my PATH, then I try to start it and get this:

image

@Tyriar Tyriar removed their assignment Mar 21, 2023
@Tyriar Tyriar closed this as completed Mar 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants