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

Shift+enter notebook behavior is odd #99156

Closed
Tyriar opened this issue Jun 2, 2020 · 12 comments
Closed

Shift+enter notebook behavior is odd #99156

Tyriar opened this issue Jun 2, 2020 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 2, 2020

Testing #98821

Disclaimer: I don't know how other notebooks behave, but I know shift+enter as run from kusto.

Shift+Enter appears to do the following:

  • Empty cell: Creates a new cell underneath
  • Non-empty cell: Runs the cell and then focuses the next cell after it's finished(???)
  • Non-empty running cell(???): Focus and scrolls to the next cell. the textarea isn't focused though

It does so many things, some of them are broken (scrolling but breaking focus state?) and one of them is time based (when running cell).

recording (2)

@roblourens
Copy link
Member

It is "execute and focus next". When there is no next cell, it creates a next cell - that should be the only time it creates a new cell. I think your gif shows that. One bug is, it should focus the next cell immediately and not wait for execution to finish.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug notebook labels Jun 2, 2020
@roblourens roblourens modified the milestones: June 2020, May 2020 Jun 2, 2020
@roblourens
Copy link
Member

All of this matches JupyterLab (except the bug)

@Tyriar
Copy link
Member Author

Tyriar commented Jun 2, 2020

@roblourens it's also focusing the next cell list item sometimes and the textarea other times. This isn't right surely?

@roblourens
Copy link
Member

I see that issue - it should match whether the active cell editor is focused but doesn't do it consistently. Also an issue with alt+enter

@roblourens
Copy link
Member

I don't know whether we will want that - it doesn't match JupyterLab but feels right to me. Leaving it for now.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 2, 2020

I see that issue - it should match whether the active cell editor is focused but doesn't do it consistently. Also an issue with alt+enter

Is this tracked? The inconsistency is very annoying, it seems to only focus the textarea if it's a new textarea, not an existing one:

recording (5)

@roblourens
Copy link
Member

That was also fixed in my commit above

@Tyriar
Copy link
Member Author

Tyriar commented Jun 3, 2020

@roblourens the focus behavior is the opposite to what I was expecting where the cell is focused, not the textarea, just making sure it was intentional? To start working on the next cell now is shift+enter, enter, typing, as opposed to shift+enter, typing.

@Tyriar Tyriar added the verified Verification succeeded label Jun 3, 2020
@roblourens
Copy link
Member

It should focus the next cell's editor only if the active cell's editor is focused when you use the command. Does that make sense? Is that not what you see?

@Tyriar
Copy link
Member Author

Tyriar commented Jun 4, 2020

No it doesn't happen:

recording (12)

It also doesn't happen if the output was already there or on the last cell either:

recording (13)

@Tyriar Tyriar reopened this Jun 4, 2020
@Tyriar Tyriar removed the verified Verification succeeded label Jun 4, 2020
@roblourens
Copy link
Member

roblourens commented Jun 4, 2020

I see flakiness, one more try

@Tyriar Tyriar added the verified Verification succeeded label Jun 5, 2020
@Tyriar
Copy link
Member Author

Tyriar commented Jun 5, 2020

Thanks, works as expected now 👍

@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @rebornix @Tyriar and others