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

Show-Command explorer v1 #1406

Merged
merged 29 commits into from
Nov 28, 2018
Merged

Show-Command explorer v1 #1406

merged 29 commits into from
Nov 28, 2018

Conversation

corbob
Copy link
Contributor

@corbob corbob commented Jul 8, 2018

PR Summary

Implement a Show-Command type panel for #1405

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
@corbob
Copy link
Contributor Author

corbob commented Jul 9, 2018

I just noticed all the comments from Tyler. Some of them were resolved on their own 😀.

Once the refresh works...

src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
@corbob corbob changed the title WIP: Show-Command explorer Show-Command explorer v1 Aug 1, 2018
@corbob
Copy link
Contributor Author

corbob commented Aug 1, 2018

v1 of this is ready for review.

One thing that is bothering me is: when you select a command, right click and choose to Insert Command, it inserts at the current location in editor, but does not focus editor, and it selects the entire command that is insert instead of putting cursor at the end of the inserted command.

media/PowerShell.svg Outdated Show resolved Hide resolved
src/features/GetCommands.ts Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
}

}
function toCommand(command: any): Command {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally should be able to define (and export) an ICommand interface to describe the properties you require

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've defined an ICommand interface. I'm not sure on the need to export it. Is there a use case where we need to access it outside of GetCommands?

src/features/GetCommands.ts Outdated Show resolved Hide resolved
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking GREAT @corbob! I also had a couple comments and questions :) I'm really excited to get this in!

media/PwSh.svg Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Show resolved Hide resolved
src/features/ShowOnlineHelp.ts Outdated Show resolved Hide resolved
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just have a couple questions and you should address the rest of Rob's comments too :)

src/features/ShowOnlineHelp.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Outdated Show resolved Hide resolved
src/features/GetCommands.ts Show resolved Hide resolved
@TylerLeonhardt
Copy link
Member

I didn't see the "powerShell/getCommand" message used at all in this PR even though it's in the PSES PR. Is that on purpose?

@corbob
Copy link
Contributor Author

corbob commented Aug 28, 2018

The "powerShell/getCommand" message was added in PSES as a precursor to that we will need it on this side, but the next step I believe will be mostly on this side. However, based on the suggestion of a single message I think it's the better way.

@corbob corbob changed the title Show-Command explorer v1 WIP: Show-Command explorer v1 Aug 28, 2018
@corbob
Copy link
Contributor Author

corbob commented Aug 28, 2018

Changing PR back to WIP to address the refactoring @tylerl0706 suggested.

@TylerLeonhardt
Copy link
Member

@corbob, since "powerShell/getCommand" is not used in this feature (yet). You could just remove the message from the PSES PR so we can get this in 😊

Then V2 of the feature could do the refactoring.

If you want to do the refactoring now, that's great but I won't block on that 😊

src/main.ts Outdated Show resolved Hide resolved
@corbob corbob changed the title WIP: Show-Command explorer v1 Show-Command explorer v1 Sep 29, 2018
@corbob
Copy link
Contributor Author

corbob commented Sep 29, 2018

I think I've got most of the stuff. Only thing I'm not 100% on is some of the comment based documentation parts.

corbob added 12 commits November 5, 2018 21:54
First pass at bringing a TreeView into vscode-powershell. Built currently failing on unrelated code...
First pass at bringing a TreeView into vscode-powershell. Built currently failing on unrelated code...
Updated from previous name incarnation..
PSES isn't returning a string. Make sure we're expecting it. Allowing for console.log for debugging. These will all be removed prior to shipping.
Unable to currently update the list. If you run PowerShell.GetCommands prior to opening the treeview, it is populated with your commands. Need to get it to update.
Other icons appear to be 32 px square. This one was 50. Adjusting size to 32.
corbob added 16 commits November 5, 2018 22:02
Cleaning up the tslinter hints. Remove CommandNode, was part of a failed experiment to get the tree refresh working.
Correct casing of some things. Adjust names to increase chance of uniqueness.
Thanks to glennsarti for finding that the API expects to call back to a particular variable.
Add Insert Command
Add Right Click Options to View
Reset PSES Logging to Normal
Update OnlineHelp to take an item from the treeview. Pass that to online help PSES handler.
Adding functionality to PSES to get all commands (Name and Module Name), or get all of a single command. This solves performance issues with getting all of all of them.
Refactor into a single command. If nothing is passed, it will return all objects.
Clean up TODO comments
Clean up request type naming.
White space cleanup
OnlineHelp has been deprecated as of 1.9.0.
Clean up some naming and whitespace.
Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just took a sec to look at this again. It looks good to me!

Hopefully we can give it and the PSES PR a quick test soon and merge it in.

package.json Outdated Show resolved Hide resolved
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@TylerLeonhardt TylerLeonhardt merged commit f725c92 into PowerShell:master Nov 28, 2018
@corbob corbob deleted the Command-Explorer branch January 17, 2019 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants