-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Closed
Labels
insiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersnotebook-layoutplan-itemVS Code - planned item for upcomingVS Code - planned item for upcomingunder-discussionIssue is under discussion for relevance, priority, approachIssue is under discussion for relevance, priority, approach
Milestone
Description
Currently the scroll top position update is not context-aware, meaning when we have cell height changes, we don't know if it's because output height change, or users re-run a cell and outputs are updated/replaced, or users shift+enter to run cell and navigate to next cell. Users might have different expectations for each scenario but currently our heuristics for updating the scroll top didn't take the context into account.
Let's use this issue to finalize the desired behavior of scroll top update. The polished/new design should cover
- Update element height API respects context (execution, execute+create, output update)
- Reveal API should handle out of sync view/content height
Execute focused cell
- Click the run button or press Ctrl+Enter to run focused cell
- If there is no enough room/space after the cell (e.g., the focused cell is the last cell)
- Users have
editor.scrollBeyondLastLine
disabled- There is no output before execution, the view should scroll up to reveal the output fully
- Some users might want the bottom of the output to be fully revealed, when the output is larger than the viewport Keep viewpoint (don't scroll) when Shift+Enter is pressed vscode-jupyter#5186
- There is output before execution, the cell position should be persistent
- There is no output before execution, the view should scroll up to reveal the output fully
- Users have
editor.scrollBeyondLastLine
enabled- Reveal cell output
- Users have
- If there is enough room after the cell
- Reveal cell output
- If the cell input is larger than the viewport, execute cell should reveal the output properly Disable auto scrolling when executing cell. #129440
Operations on focused cell
- Collapse focused cell output should always keep the cell in viewport Native Notebooks - Collapsing output from bottom leads to incorrect scroll location #114866
- Type/Pasting content into focused cell should keep the cell in viewport
- pasting code makes cell invisible on screen #165415
- Notebook cell list reveal api might reveal a position on a cell whose view height is not synced with real editor height yet.
Operations on non-focused cell
- ❓ Execute non-focused cell, should it keep the focused cell position persistent or keep the top of the target cell persistent? Cell moves up when output comes #121723
- Non focused cell output height change should not change scroll top on scroll VSCode automatically scrolls to top of cell output when scrolling up #142439
- Shift+enter executes and moves focus to next cell, then new focused cell should always be in viewport Shift enter to empty cell doesn't place the new cell in a visible location on screen #134607
Split view
- Scroll top position of inactive notebook editor should not change if the first partially visible cell's height change When split to two views, the unactive view for jupyter notebook is not fixed #145340
Metadata
Metadata
Assignees
Labels
insiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersnotebook-layoutplan-itemVS Code - planned item for upcomingVS Code - planned item for upcomingunder-discussionIssue is under discussion for relevance, priority, approachIssue is under discussion for relevance, priority, approach