-
Notifications
You must be signed in to change notification settings - Fork 326
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
Update registering external tools #3255
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krschau
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
dhoehna
reviewed
Jun 19, 2024
jaholme
reviewed
Jun 20, 2024
jaholme
reviewed
Jun 20, 2024
jaholme
approved these changes
Jun 20, 2024
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.
timkur
reviewed
Jun 21, 2024
timkur
reviewed
Jun 21, 2024
timkur
reviewed
Jun 21, 2024
timkur
reviewed
Jun 21, 2024
timkur
reviewed
Jun 21, 2024
timkur
reviewed
Jun 21, 2024
zadesai
approved these changes
Jun 21, 2024
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.
timkur
approved these changes
Jun 21, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Prior to this, you could only register an external tool identified (and activated) by its filesystem path. This PR adds the ability for the user to select a tool from the list of installed apps (both MSIX-packaged and unpackaged). It also supports both launch/command-line activation and protocol activation.
Details
I added a button to the AddTool control to fetch the list of installed apps, based on the list of per-user installed packages and both common and per-user shortcut lists. I also updated the input section for specifying arguments to use variable substitution on a short list of known parameters (initially, just pid and hwnd). This also makes this section more open-ended, as we can easily extend the list later if required.
The user can provide command-line arguments using any format. Protocol arguments should include the protocol itself, and the protocol's Uri.Query can include the standard name-value pairs, or just names. There's no input validation: it's up to the user to provide arguments that are appropriate for her tools. I added tooltips for all the items on the AddTool control, plus instructions and example text for the launch/protocol argument strings.
As part of this, if the user has an externaltools.json file in the old format, we'll read this in and migrate the data to the new format. For persistence, the tools collection is now wrapped in a new ExternalToolCollection type, which includes a version number, so that going forward we can detect files in different versions and migrate accordingly.
Also fixed a bug where we were writing out the JSON file repeatedly when the ToolIcon and MenuIcon observable properties were changed. Now we only write out changes for properties that are not JsonIgnore.
Also added a custom percentage progress ring for reporting intermittent progress when fetching the list of installed apps, as this can take a few seconds. We can also use this progress ring for other long-running operations.
Filed a new issue to support activation via AppExecutionAlias (with arguments): #3251.
Testing
References and relevant issues
Fixed the following: