Skip to content

Scroll top improvement based on context #169038

Closed

Description

@rebornix

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
    • Users have editor.scrollBeyondLastLine enabled
      • Reveal cell output
  • 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

Operations on non-focused cell

Split view

Activity

  1. added
    under-discussion
    on Dec 13, 2022
  2. roblourens commented on Dec 13, 2022

    @roblourens
    Member

    I noticed an issue recently, is this related?

    • Paste a large amount of text into a code cell
    • The notebook scrolls down so far that the focused code cell is out of the viewport

    I can open a separate issue if you want

  3. rebornix commented on Dec 13, 2022

    @rebornix
    ContributorAuthor

    roblourens I guess what you were seeing is #165415 , I'll update the description to include this.

  4. 5 remaining items

  5. added
    plan-item
    on Aug 31, 2023
  6. Yoyokrazy commented on Sep 21, 2023

    @Yoyokrazy
    Collaborator

    Couple cases discovered in the latest notebook sync. both of these are likely tied to outputLineLimit being large @ 100

    • when the shift-enter behavior is set to "firstline" the events are as follows:
      • first line of next cell is focused and shown at the bottom of the viewport
      • output is cleared and the focused cell is pulled upwards against the currently executing cell
      • output streams and pushes the focused cell out of the viewport.
      • my ideal thoughts:
        • anchor the focused cell (with setting), maintaining the first line visible. output will stream in, pushing the executing cell upwards out of the viewport
    firstLine-lots-of-movement.mp4
    • shift-enter set to "fullCell" and next cell has a large output
      • focus shifts to next cell, and the viewport exposes the bottom of the output for that cell. there is no cell editor in the viewport
      • my thoughts:
        • "fullCell" behavior should show the top of the next cell editor at the top of the viewport
    fullCell-focus-bottom-output.mp4
  7. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Sep 22, 2023
  8. locked and limited conversation to collaborators on Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

insiders-releasednotebook-layoutplan-itemunder-discussion

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions