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
Native Notebooks - Outline selection does not go to top #123828
Couldn't find the original issue and thought that I forgot to file it but turns out it was closed. #123175
Received customer feedback (4/4) in interviews that they expected selecting a cell in the table of contents would bring the cell to the top and currently they have a hard time identifying where the cell is.
(I have also struggled with this same issue, when I click on a cell in the outline I find my eyes scattering to figure out where the cell actually is)
This also deviates from Jupyter behavior which is why it could be hard to adapt to
Markdown is typically used in a notebook to separate logical blocks of cells. It would seem to make sense to be able to see as much of that logical set of cells as possible when navigating to it. With a regular text editor seeing code context around the navigation point can make more sense.
Jupyter's behavior is to scroll markdown to the top.
It's unclear what would be appropriate if Show Code Cells for outline view is on and the user clicks on a piece of code in the outline view. Scrolling to the middle or top of the screen doesn't necessarily seem right. What about scrolling such that the cell that contains the piece of code is set at the top of the workbench window and the selected piece of code is highlighted temporarily? Of course we'd have to deal with large cells where the selected line appears below the bottom of the editor window. In that case, scrolling the code to the middle of the screen makes more sense (now you're more in the editor mode in this situation). Most notebooks do not contain large cells; however.
I'd also point out that the current behavior is quite buggy, which doesn't help. If you open this notebook and use breadcrumbs or the outline view to navigate the markdown, you'll easily run across them. I.e. sometimes the selected markdown is up off the top of the viewport (possibly because a cell is large below it), you'll also sometimes see headers getting rendered and then erased.
This is still bothersome. And I also noticed that the scroll position for notebooks when clicking on one of the outline items is further down vertically than even regular code:
I still think that when any item is clicked in a notebook outline it should be scrolled to the top as it's not likely that prior code/cells will be interesting to see in context. But barring that, the scroll position should at least be identical to that of pure code.
Jupyter, Google Colab and probably others scroll the selected item to the top of the window.
Activity
vscodebot commentedon May 13, 2021
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
claudiaregio commentedon May 13, 2021
Couldn't find the original issue and thought that I forgot to file it but turns out it was closed. #123175
Received customer feedback (4/4) in interviews that they expected selecting a cell in the table of contents would bring the cell to the top and currently they have a hard time identifying where the cell is.
(I have also struggled with this same issue, when I click on a cell in the outline I find my eyes scattering to figure out where the cell actually is)
This also deviates from Jupyter behavior which is why it could be hard to adapt to
vscode-triage-bot commentedon May 14, 2021
Pinging
notebooktopic followers: Claudia Regio (@claudiaregio) Rich Chiodo (@rchiodo) Jim Griesmer (@greazer) Don Jayamanne (@DonJayamanne) jilljac (@jilljac)rebornix commentedon May 14, 2021
Johannes Rieken (@jrieken) not sure if we want a different experience in notebook.
greazer commentedon Sep 13, 2021
Some thoughts here:
greazer commentedon Sep 13, 2021
I'd also point out that the current behavior is quite buggy, which doesn't help. If you open this notebook and use breadcrumbs or the outline view to navigate the markdown, you'll easily run across them. I.e. sometimes the selected markdown is up off the top of the viewport (possibly because a cell is large below it), you'll also sometimes see headers getting rendered and then erased.
https://github.com/greazer/covid-19-data/blob/master/SampleNbsAndScripts/my-analysis-plotly.ipynb
greazer commentedon Feb 20, 2022
This is still bothersome. And I also noticed that the scroll position for notebooks when clicking on one of the outline items is further down vertically than even regular code:
I still think that when any item is clicked in a notebook outline it should be scrolled to the top as it's not likely that prior code/cells will be interesting to see in context. But barring that, the scroll position should at least be identical to that of pure code.
Jupyter, Google Colab and probably others scroll the selected item to the top of the window.
39 remaining items
roblourens commentedon Jun 1, 2022
Thanks. I think I just want to compare elementBottom to wrapperBottom here:
vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts
Line 1244 in 3e8d674
but I will fix in June since that will affect many reveal scenarios.
roblourens commentedon Jun 1, 2022
Maybe it's not a big deal
Check whether cell is _entirely_ in the view, not partially
Check whether cell is _entirely_ in the view, not partially (#151003)