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

Copilot suggestions shouldn't show up in unfocused notebook cells #133353

Closed
roblourens opened this issue Sep 17, 2021 · 9 comments
Closed

Copilot suggestions shouldn't show up in unfocused notebook cells #133353

roblourens opened this issue Sep 17, 2021 · 9 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 notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Type some python code
  • Quickly press esc to move focus out of the editor
  • An inline suggestion shows up in the editor
  • If I am working across multiple cells, I often leave these suggestions behind. They should be disabled in unfocused cells

image

Is there any way to accomplish this @hediet

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug notebook labels Sep 17, 2021
@roblourens roblourens added this to the Backlog milestone Sep 17, 2021
@hediet
Copy link
Member

hediet commented Sep 18, 2021

Does it generally make sense to hide ghost text if the editor does not have focus anymore?
Or should this just be done for notebook cells?

@roblourens
Copy link
Member Author

roblourens commented Sep 20, 2021

Not sure - does copilot still have a mode where they open extra suggestions in a side editor? I thought that switching normal editors while using copilot might be a real use case. For the purposes of this issue, either way is fine.

@rebornix
Copy link
Member

+1 for hiding ghost text for blurred text editor.

@hediet hediet modified the milestones: Backlog, September 2021 Sep 21, 2021
@hediet
Copy link
Member

hediet commented Sep 21, 2021

+1 for hiding ghost text for blurred text editor.

Implemented.

@hediet hediet closed this as completed in c79d31a Sep 21, 2021
hediet added a commit that referenced this issue Sep 21, 2021
…causes issues with the hover that steals the focus of the editor.

This reverts commit c79d31a.
@hediet hediet reopened this Sep 21, 2021
@hediet
Copy link
Member

hediet commented Sep 21, 2021

Unfortunately, the hover used to cycle through inline suggestions also takes the focus from the editor as soon as the user clicks on it.

Thus, we cannot hide the ghost text when the editor loses focus.

I don't know how to not hide the ghost text when the hover gets focus. Even worse, when the hover gets the focus and then loses it to something else (e.g. the sidebar), the ghost text should also hide, but this is even harder to detect.

@roblourens
Copy link
Member Author

Is there no concept that says whether focus is inside the editor or inside an editor widget? I thought there was a context key for that case.

@hediet
Copy link
Member

hediet commented Sep 22, 2021

There is, but it does not work:

recording

#133518 seems to fixes this, but I have no idea why.
This seems to be a different incarnation of #133517.

It is also a time grave. I've already spent quite some time debugging this stuff.
@alexdima had the insight that the other issue is caused by electron interpreting the two clicks as single double-click, but I have no idea why this causes focus problems.

@hediet
Copy link
Member

hediet commented Sep 22, 2021

I moved this to october, as the PR that fixes the fix for this will also be merged not before next milestone (due to vacation).

@tanhakabir tanhakabir added the notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) label Oct 4, 2021
@hediet hediet closed this as completed in 9d43adc Oct 6, 2021
@mjbvz mjbvz added the verified Verification succeeded label Oct 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2021
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 notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@roblourens @rebornix @hediet @tanhakabir @mjbvz and others