You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
notebook scrolls up incorrectly when adjusting output heights #193231
The current behavior of the list view is to use the second visible element as an anchor which can cause some strange behavior.
In this scenario:
The next cell is focused and revealed, making that cell the anchor as second visible, since the executing cell takes up the rest of the visible region.
The output is removed, moving more elements into view from above
Output is added and the initial anchor is no longer the second element, so it is scrolled out of view
I'll try to play around with some options, but my initial thought would be to use the executing cell as the anchor. The output could expand and push the next cell out of view, but typing in that cell will bring it back into view.
I wanted to see the behavior locally. I really can't seem to repro this, my notebook stays pretty stable as the cell shrinks and grows. What am I missing?
I think I found it. Aaron Munger (@amunger), I believe you have editor.scrollBeyondLastLine disabled, am I correct? Can you reproduce this when flipping that setting back to the default value of true?
As I looked into the remaining open issue #193835 and PR #193530, I was trying to grasp what the issue really is, what has been actually fixed and what's left to fix.
Then, I pulled latest and ran out of sources and this is even worse than my last recording. Everything jumps around even when the cell is fully in view:
Aaron Munger (@amunger) I suggest reverting #193833, pausing, simplifying the problem, narrowing in on a solution and consider fixing it in debt week so as to not cause regressions during this endgame week.
João Moreno (@joaomoreno) thanks for the testing, the two recordings you posted above were using different execution commands so I want to ensure we refer to the same behavior:
This command moves focus to the next cell, so the def sum cell is now the focused cell
Then the output of the previous cell (which is no longer focused) starts to grow
The change introduced via Aaron Munger (@amunger) 's last PR was to ensure that the focused cell stay visually stable, once they are revealed into view
I captured a recording for what probably João Moreno (@joaomoreno) was comparing, right side is Stable and left side Insiders
In both setup, the next cell is fully visible
In Stable, shift+enter moves the next cell up, and then push it down, but the new focused cell is still visible in the viewport at the end
In Insiders, shift+enter moves the next cell up, and when the previous starts to grow, it does not move the focused cell downwards
Screen.Recording.2023-09-25.at.8.13.02.AM.mov
Even though the new behavior is more self explanatory (from our perspective), but unluckily is not the same as Jupyter Lab. It means we are changing from one custom behavior (our previous heuristics) to another (always keep focused cell stable)
Thanks for clarifying this Peng Lyu (@rebornix). It was not clear to me that (1) shift+enter and clicking the run cell action did different things, nor that (2) this bug was only about one of these actions.
Activity
amunger commentedon Sep 15, 2023
The current behavior of the list view is to use the second visible element as an anchor which can cause some strange behavior.
In this scenario:
I'll try to play around with some options, but my initial thought would be to use the executing cell as the anchor. The output could expand and push the next cell out of view, but typing in that cell will bring it back into view.
cc João Moreno (@joaomoreno)
joaomoreno commentedon Sep 22, 2023
I wanted to see the behavior locally. I really can't seem to repro this, my notebook stays pretty stable as the cell shrinks and grows. What am I missing?
Screen.Recording.2023-09-22.at.12.14.52.mov
joaomoreno commentedon Sep 22, 2023
I think I found it. Aaron Munger (@amunger), I believe you have
editor.scrollBeyondLastLinedisabled, am I correct? Can you reproduce this when flipping that setting back to the default value oftrue?amunger commentedon Sep 22, 2023
It repro's with or without
editor.scrollBeyondLastLine- you just need to scroll down enough so that the resized cell is only partially visible.The strange behavior is due to the notebook cell list setting different anchors depending on whether the element top is above the render top. https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts#L1219C2-L1219C2
joaomoreno commentedon Sep 25, 2023
As I looked into the remaining open issue #193835 and PR #193530, I was trying to grasp what the issue really is, what has been actually fixed and what's left to fix.
Then, I pulled latest and ran out of sources and this is even worse than my last recording. Everything jumps around even when the cell is fully in view:
Screen.Recording.2023-09-25.at.09.02.07.mov
Did #193833 just break this even more?
Aaron Munger (@amunger) I suggest reverting #193833, pausing, simplifying the problem, narrowing in on a solution and consider fixing it in debt week so as to not cause regressions during this endgame week.
cc Peng Lyu (@rebornix)
4 remaining items
rebornix commentedon Sep 25, 2023
João Moreno (@joaomoreno) thanks for the testing, the two recordings you posted above were using different execution commands so I want to ensure we refer to the same behavior:
def sumcell is now the focused cellJoão Moreno (@joaomoreno) can you confirm if this is what you are seeing?
rebornix commentedon Sep 25, 2023
I captured a recording for what probably João Moreno (@joaomoreno) was comparing, right side is Stable and left side Insiders
Screen.Recording.2023-09-25.at.8.13.02.AM.mov
Even though the new behavior is more self explanatory (from our perspective), but unluckily is not the same as Jupyter Lab. It means we are changing from one custom behavior (our previous heuristics) to another (always keep focused cell stable)
joaomoreno commentedon Sep 25, 2023
Thanks for clarifying this Peng Lyu (@rebornix). It was not clear to me that (1) shift+enter and clicking the run cell action did different things, nor that (2) this bug was only about one of these actions.
amunger commentedon Oct 19, 2023
fixed by #195283