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: scrolling behavior during notebook cell resizing #196327

Closed
3 tasks done
amunger opened this issue Oct 23, 2023 · 0 comments
Closed
3 tasks done

Test: scrolling behavior during notebook cell resizing #196327

amunger opened this issue Oct 23, 2023 · 0 comments

Comments

@amunger
Copy link
Contributor

amunger commented Oct 23, 2023

refs: #194516

Complexity: 5

Create Issue


Description

There have been a few behavior changes when executing a cell with shift+enter around how scrolling behaves in relation to the next cell which should then be focused.

Pre-requisites - If you don't have python set up to run notebooks

  1. ensure python is installed on your machine
  2. open a workspace where you will be running tests for this TPI
  3. Create: new jupyter notebook and run print(1) in a cell.
    a. If the cell runs successfully, you're already set up, otherwise...
  4. The kernel picker should open, select "Python Environments..." -> "Create Python Environment..." -> select venv or conda, and whichever version you'd like.

A virtual environment should get created in your workspace with all necessary packages installed, and the cell should run successfully.

Testing

  1. ensure notebook.scrolling.experimental.anchorToFocusedCell is not set
  2. Create a notebook with several cells that generate output in a variety of ways (examples below), and has enough cells to take up multiple screen heights.
  3. Execute the cells in the notebook with shift+enter which will select the next cell as they are executed.
  4. Try exposing different behaviors by
    a. shrinking the viewport
    b. scrolling to put the executing cell in different positions on the screen
    c. executing a cell that is followed by a very large cell
    d. re-execute cells, with and without clearing the output first
  5. Try a different setting for notebook.scrolling.revealNextCellOnExecute

Behaviors to expect:

  • Don't push a focused cell out of view (unless notebook.scrolling.revealNextCellOnExecuteis set to none)
    • Scrolling up will end this behavior
  • A cell with focus in the editor should always be anchored if cells above are resizing
  • If you execute a cell that already had output, it should not shrink the output size during execution.

Example Cells

Remove and add output (when run multiple times)

import time
time.sleep(3)
for i in range(29):
    print(i)

Stream in output

import time
for i in range(20):
    time.sleep(.5)
    print(i)

large outputs that are immediately replaced

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

Large cells (e.g. a bunch of extra empty newlines)

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

5 participants