-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Install vsix files from the explorer view (#13269) #13291
Install vsix files from the explorer view (#13269) #13291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @dhuebner! I think this is a really nice contribution and it works well! I do have a few minor comments regarding naming and visibility, I'd be interested to get your take on that before we merge this change.
packages/vsx-registry/src/browser/vsx-extensions-contribution.ts
Outdated
Show resolved
Hide resolved
packages/vsx-registry/src/browser/vsx-extensions-contribution.ts
Outdated
Show resolved
Hide resolved
packages/vsx-registry/src/browser/vsx-extensions-contribution.ts
Outdated
Show resolved
Hide resolved
|
||
protected override onAfterShow(msg: Message): void { | ||
super.onAfterShow(msg); | ||
if (this.options.id === VSXExtensionsSourceOptions.INSTALLED) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works when closing and re-opening the view. Unfortunately it seems that we do not have a notification system for when extensions are deployed, at least none that I can see and implementing one is probably out of scope here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not have a notification system for when extensions are deployed
Yeah, I also found nothing there.
An other point I mentioned in the description is that, it would be nice to have an easy way to check if an extension is already installed. And what is even more important, to have a detailed return value when attempting to install an extension. Right now it is just a number of extensions being installed and if it is 0
an error is reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully agree, there is definitely room for improvement on the exposure of extension management. I remember there being a discussion somewhere about being notified properly for uninstallations but I can't find it right now. Do you mind logging a Feature Request for the extension of that API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do.
2bb8237
to
f9deb0c
Compare
f9deb0c
to
a433d42
Compare
@martin-fleck-at |
@martin-fleck-at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the update! Everything looks good to me now!
Sure, I can have a look. |
What it does
Allows installing VSIX extensions from the file explorer using context menu.
@theia/navigator
dependency to get the navigator menu ID (existing dependencies like@theia/plugin-ext
already depends on the navigator package)canSelectFiles: true
to dialog options, otherwise one can't select files in the electron app. Could be a problem with default handling inElectronFileDialogService.toOpenDialogOptions()
How to test
Add a
*.vsix
to your workspace. Use the context menu to executeInstall Extension VSIX
action. You should see the 'Successfully installed' message. Go to the "Extensions" view and check the "Installed" list contains the new installed extension.Follow-ups
When testing extension installation I noticed that when installing an already installed extension a
Failed to install
error is reported. This is because local file deployer rejects installing existing extensions, but because the installing routine can only check the number of installed extension (in this case it's0
) a misleading error is reported.I think we need to change the installation routine return value to something more meaningful than just a number. With more information we can then to produce a better user feedback. See
PluginDeployerImpl.deployPlugins()
.Review checklist
Reminder for reviewers