Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks: Aligned scroll into view behaviour with vscode #13742

Merged
merged 6 commits into from
May 30, 2024

Conversation

jonah-iden
Copy link
Contributor

What it does

As in vscode clicking a cell to select it or deleting a cell and changing the selection that way should not move the newly selected cell into view

How to test

In a notebook test:

  1. clicking on a cell slightly outside of the view. Should not scroll
  2. deleting a cell. Should not scroll
  3. inserting new cell: Should scroll
  4. arrow keys. With and without text focus. Should scroll

Follow-ups

Review checklist

Reminder for reviewers

… unfocused

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew May 29, 2024 14:08
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work as expected for me, see:

2024-05-29.16-58-10.mp4

Clicking on/deleting a cell still scrolls the (potentially non-existing) cell fully into view.

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew May 30, 2024 07:17
@jonah-iden
Copy link
Contributor Author

seems i forgot two places two disable scrolling. Thanks for finding! Should be fixed now

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me 👍

Something worth mentioning (but can be fixed in a separate PR) would be that focusing and then moving the cursor via the arrow keys scrolls inside of the notebook in VSCode. As the cursor needs to be kept in view. This doesn't work in Theia.

@jonah-iden jonah-iden merged commit 255231a into master May 30, 2024
13 of 14 checks passed
@github-actions github-actions bot added this to the 1.50.0 milestone May 30, 2024
@msujew msujew deleted the jiden/notebook-aligned-scroll-into-view branch May 30, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants