Skip to content

Native Notebooks - Outline selection does not go to top #123828

Description

Steps to Reproduce:

  1. Open notebook
  2. Select a cell in the notebook outline

Actual Behavior:

Cell selected ends up ~middle of the window/notebook + doesn't have any selection on the cell that was picked so it's hard to identify where it is.

Expected Behavior:

Cell to be at the top + selected mode indicator

Activity

  1. claudiaregio commented on May 13, 2021

    @claudiaregio
    Author

    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

  2. rebornix commented on May 14, 2021

    @rebornix
    Contributor

    Johannes Rieken (@jrieken) not sure if we want a different experience in notebook.

  3. removed their assignment
    on May 14, 2021
  4. greazer commented on Sep 13, 2021

    @greazer
    Contributor

    Some thoughts here:

    • 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.
  5. greazer commented on Sep 13, 2021

    @greazer
    Contributor

    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

  6. greazer commented on Feb 20, 2022

    @greazer
    Contributor

    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:

    image

    image

    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.

  7. 39 remaining items

  8. roblourens commented on Jun 1, 2022

    @roblourens
    Member

    Thanks. I think I just want to compare elementBottom to wrapperBottom here:

    but I will fix in June since that will affect many reveal scenarios.

  9. modified the milestones: May 2022, June 2022 on Jun 1, 2022
  10. roblourens commented on Jun 1, 2022

    @roblourens
    Member

    Maybe it's not a big deal

  11. added a commit that references this issue on Jun 1, 2022
    af4b0e9
  12. added a commit that references this issue on Jun 2, 2022
    445d4aa
  13. added
    unreleasedPatch has not yet been released in VS Code Insiders
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Jun 2, 2022
  14. locked and limited conversation to collaborators on Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions