{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/644","repository_url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices","labels_url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/644/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/644/events","html_url":"https://github.com/PowerShell/PowerShellEditorServices/issues/644","id":308289944,"number":644,"title":"Add new commands for Find\\Install Editor Commands","user":{"login":"gerane","id":6662208,"avatar_url":"https://avatars0.githubusercontent.com/u/6662208?v=4","gravatar_id":"","url":"https://api.github.com/users/gerane","html_url":"https://github.com/gerane","followers_url":"https://api.github.com/users/gerane/followers","following_url":"https://api.github.com/users/gerane/following{/other_user}","gists_url":"https://api.github.com/users/gerane/gists{/gist_id}","starred_url":"https://api.github.com/users/gerane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerane/subscriptions","organizations_url":"https://api.github.com/users/gerane/orgs","repos_url":"https://api.github.com/users/gerane/repos","events_url":"https://api.github.com/users/gerane/events{/privacy}","received_events_url":"https://api.github.com/users/gerane/received_events","type":"User","site_admin":false},"labels":[{"id":800845065,"url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/labels/Area-psEditor","name":"Area-psEditor","color":"5319e7","default":false},{"id":300617211,"url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/labels/Issue-Discussion","name":"Issue-Discussion","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-24T19:04:27Z","updated_at":"2018-03-25T16:53:32Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I want to add some new commands that should make discovering and installing new Editor Commands or modules with them easier. One of the easiest ways we could do this is by writing wrappers around Find-Module and Install-Module. Just change it to only find modules with a particular tag or set of tags.\r\n\r\nEditor Commands are a great feature of PSES, but they don't get a lot of attention and are often overlooked. I think if we put some effort into making them easier to use, easier to find, and easier to share, we would start to see more adoption.\r\n\r\nThings that I was wanting to discuss and get community feedback on:\r\n\r\n### What Tag or Tags would be best? \r\n\r\nEx: EditorCommand, EditorCommands, PSES?\r\n\r\n### What is the best user experience?\r\n\r\nIn the short term, I could create Editor Command\\Commands for **Find-EditorCommand** and **Install-EditorCommand** that would tie into the *Show Additional Command* menu and use the command palette to prompt for user input and prompt users with lists of found modules. Maybe something where it is an Editor Command to Install Editor Commands, and it prompts for a name, displays results in command palette, and then installs the module the user selects in the command palette. However, that really should be just for the short term\r\n\r\nIdeally, it is better to have this at the root level. Long term, I think it would be best if this could tie in with an actual GUI and allow users a similar experience to installing extensions. I have not kept up with how far they have come with their webview features, but maybe that could be an option. I also don't know what aspects would be PSES and what would be VSCode Extension. \r\n\r\n### FInd-Module and listing Editor Commands in the module\r\n\r\nIt is one thing to list modules with Editor Commands inside, but could we also figure out a way to show what Editor Commands are inside the module and have those get returned by Find-Module? I have not really played around with the metadata enough to know if you can add custom fields and those get passed back. The other issue would be how would you educate people on how to do this.\r\n\r\n### Is there a standard for importing Editor Commands? \r\n\r\nWhen I first worked with @daviwil on this 2+ years ago, the idea was to conditionally load these by checking for the $psEditor variable. If the module was imported and it was running inside of Code, then it would auto register the Editor Commands. I know @SeeminglyScience uses another method, but I haven't looked into it enough to see what he's doing.\r\n\r\nThis could be something that could eventually be controlled by a GUI or config, but I am not sure how that will end in the long run. I think the majority of people stick to the defaults and never really go in and tweak the configs of editors, and it could lead to less adoption. Maybe have autoload as the default, and allow for override via config of GUI as an option.\r\n\r\n### Why now?\r\n\r\nI think now is a great time to start pushing and making an effort to get people using Editor Commands. I tried early on, and it was really bad timing. David was pushing hard to get the integrated terminal working, and when he finally did, it pretty much set Editor Commands back a long way. I had to stop pushing people to them due to the Integrated terminal breaking their integration with the command palette. It didn't make sense for David to invest time into them when he was devoting most of his time to fixing bugs and improving performance. I decided to stop trying to push them to people, and to let things settle.\r\n\r\nAt that point, we were still struggling to get people to switch to code. Now, I think we have great adoption and people are starting to get used to the normal features, so now should be a great time to really improve these and get some traction."},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/comments/375985203","html_url":"https://github.com/PowerShell/PowerShellEditorServices/issues/644#issuecomment-375985203","issue_url":"https://api.github.com/repos/PowerShell/PowerShellEditorServices/issues/644","id":375985203,"user":{"login":"tylerl0706","id":2644648,"avatar_url":"https://avatars2.githubusercontent.com/u/2644648?v=4","gravatar_id":"","url":"https://api.github.com/users/tylerl0706","html_url":"https://github.com/tylerl0706","followers_url":"https://api.github.com/users/tylerl0706/followers","following_url":"https://api.github.com/users/tylerl0706/following{/other_user}","gists_url":"https://api.github.com/users/tylerl0706/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerl0706/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerl0706/subscriptions","organizations_url":"https://api.github.com/users/tylerl0706/orgs","repos_url":"https://api.github.com/users/tylerl0706/repos","events_url":"https://api.github.com/users/tylerl0706/events{/privacy}","received_events_url":"https://api.github.com/users/tylerl0706/received_events","type":"User","site_admin":false},"created_at":"2018-03-25T16:53:32Z","updated_at":"2018-03-25T16:53:32Z","author_association":"COLLABORATOR","body":"> My 2 cents: Install/Find-EditorCommandModule (name pending) should be included in PSES in the same module as Register-EditorCommand and the like.\r\n\r\nAgreed.\r\n\r\n> Ultimately I think a separate UI for installing them would be awesome\r\n\r\nI wonder if we could take advantage of views:\r\nhttps://code.visualstudio.com/docs/extensionAPI/extension-points#_contributesviews\r\n![A view](https://code.visualstudio.com/assets/docs/extensionAPI/extension-points/views.png)\r\n\r\nYou just supply them some json and it renders it for you. As long as we can show/hide it using the command pallet, that will save us from doing actual UI work 😄 It might be worth investigating."}}
{"actor":{"display_login":"tylerl0706"}}