Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP: Add WebView to Insert Command from Command Explorer #1972
Conversation
|
Will review after I get back from vacation. P.S. I would really recommend attempting to add tests. It may be possible to mock the LSP requests to PSES. Also here's an example of how I referenced a type that isn't exported |
|
@corbob can you add some pictures or a gif of what this looks like since it's UI related? |
|
Generally I think it might be worth thinking about how you could write tests for this. VSCode does a great job at allowing us to take advantage of an open instance of VSCode in our tests so the vscode.* APIs all work. My initial thought is, the InsertCommand method could be tested. If you look at some of the CustomView tests, you can get an idea for how to reach in and call private methods. |
a7740a4
to
bcff483
This allows the user to move the window and not lose the information they've entered.
Make sure only a single set of Common Parameters.
Needs to be encoded as UTF8 *without* BOM
for codacy...
How was this missed by Codacy before???
How was this missed by Codacy before??? Also the one that Codacy actually mentioned...
Make Mandatory Parameters Required.
Implement for-of loops to make it clearer Correctly check if Mandatory parameter. Correctly check for ValidateSets.
Tidy up Arrow functions (by converting to for-of loops.
PR Summary
Add a WebView for Inserting command selected from Command Explorer.
Currently mimics
Show-Commandin that it handles switches and text (switches don't get $true appended, and text is encapsulated in quotation marks if a space is involved).WIP:
Show-CommandhandlesValidateSetwith a drop down. Would like to add this functionality before merging.PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
xbetween the square brackets.Please mark anything not applicable to this PR
NA.WIP:to the beginning of the title and remove the prefix when the PR is ready