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

workbench.action.closeActiveEditor command doesn't close a WebviewWidget #6955

Closed
tomer-epstein opened this issue Jan 23, 2020 · 8 comments
Closed
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@tomer-epstein
Copy link
Contributor

Description

workbench.action.closeActiveEditor command doesn't close a WebviewWidget

Reproduction Steps

Open the 'Getting Started' (Help -> 'Getting Started')
execute workbench.action.closeActiveEditor command.

Diagnostics:
it seems that the reason is that WebviewWidget doesn't implement Navigatable interface.

@amiramw
Copy link
Member

amiramw commented Jan 23, 2020

@tomer-epstein does it work in VS Code?

@tomer-epstein
Copy link
Contributor Author

Yes.

@vince-fugnitto
Copy link
Member

Open the 'Getting Started' (Help -> 'Getting Started')

Are you referring to the Getting Started from Theia?

@tomer-epstein
Copy link
Contributor Author

tomer-epstein commented Jan 23, 2020

Open the 'Getting Started' (Help -> 'Getting Started')

Are you referring to the Getting Started from Theia?

Yes. it's an example for WebviewWidget.
another vscode extension which opens WebviewWidget is https://github.com/SAP/yeoman-ui

@vince-fugnitto
Copy link
Member

Open the 'Getting Started' (Help -> 'Getting Started')

Are you referring to the Getting Started from Theia?

Yes. it's an example for WebviewWidget.
another vscode extension wich opens WebviewWidget is https://github.com/SAP/yeoman-ui

@tomer-epstein
I don't think our Getting Started is a WebviewWidget, what makes you believe it is?
https://github.com/eclipse-theia/theia/blob/master/packages/getting-started/src/browser/getting-started-widget.tsx

@tomer-epstein
Copy link
Contributor Author

debuging plugin-vscode-commands-contribution

image

@akosyakov
Copy link
Member

akosyakov commented Jan 23, 2020

In VS Code there is a difference between editor and code editor. Editor is any widget opened in the editor area (main area in Theia). Code editor is Monaco-based widget. So yes, webview is an editor in VS Code sense and closeActiveEditor should close the webview as well.

is a function which can check whether a given widget is an editor in VS Code sense. We should rewrite all vscode editor commands using it.

@akosyakov akosyakov added bug bugs found in the application vscode issues related to VSCode compatibility help wanted issues meant to be picked up, require help labels Jan 23, 2020
@paul-marechal
Copy link
Member

PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

5 participants