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

vscode bugs: Custom panel steals focus #1

Open
bmingles opened this issue Jun 5, 2024 · 0 comments
Open

vscode bugs: Custom panel steals focus #1

bmingles opened this issue Jun 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bmingles
Copy link
Collaborator

bmingles commented Jun 5, 2024

UPDATE: vscode v90 introduced an optional workbench.editor.alwaysShowEditorActions setting. Setting this to true improves the experience here. Namely the run button will not disappear when running commands or selecting its dropdown. There does still seem to be a problem with the last selected command intermittently not persisting.

There appears to be a vscode bug where custom webview panels steal focus when editor title menus are clicked.

  • editor/title/run menu
  • toolbar overflow button ...
image

A related bug is that once the custom panel is visible, trying to change the active run command will not work. I assume this is a side effect of the first bug.

To reproduce in the dh-vscode extension:

Setup

  1. Open a dh python script
  2. Click the run button (should see it connect and panel open on right)

Button Hiding

  1. Try clicking the dropdown arrow beside the run button or the overflow menu
  2. The panel tab steals the focus which causes the run button to disappear
image

Broken Selection
Clicking on different run action won't actually change to the new action
image

Workarounds

  • To get the hidden button to return, click on a panel outside of the editor and click back into the editor
  • If you need to switch between Run Deephaven file and Run Deephaven selected lines, just make sure there are no visible dh panels either by closing the panels or by opening another file over top of it. Once you switch the cmd, the panels can be visible, and you should be able to run the command as many times as you want by clicking the play button directly.

e.g. The issue will persist as long as static_table is the visible tab. If you change it to vscode-demo.py, things will work as expected in vscode-ext-testing.py.
image

Related Issues (seem to be the root cause)

These 2 vscode issues seem to be related:

We may not have any way to fix this barring submitting a PR to the vscode repo, so we may need to expose our run commands a different way to improve the user experience.

@bmingles bmingles added the bug Something isn't working label Jun 5, 2024
@bmingles bmingles self-assigned this Jun 5, 2024
@mofojed mofojed added the triage label Jun 10, 2024
@vbabich vbabich added this to the June 2024 milestone Jun 18, 2024
@vbabich vbabich removed the triage label Jun 18, 2024
@mofojed mofojed modified the milestones: June 2024, Backlog Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants