-
Notifications
You must be signed in to change notification settings - Fork 511
Find module display quick pick list first. #484
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
Conversation
This PR puts the quick pick list up first with "Cancel" as the only item and text that indicates what is happening and that it could take some time. @daviwil - please check my use of the CancellationTokenSource - especially in the pickPowerShellModule function where the request completes but the user (or timeout) has already cancelled the op. Not sure about returning Promise.resolve(""). My JavaScript FU is pretty weak. Also feel free to help with the wording of the various messages in the UI. Finally what timeout should we use? I set it for 1 minute but that might be long. It seems to take ~20 seconds on my machine. But as the gallery grows, so could that time. Finally, for the future, it would be nice if we could detect a user key press and if the find isn't done - cancel and restart a new find based on what the user typed. Also, need timer support so that you only kick off a new find after say 1 second of paused typing.
this.pickPowerShellModule().then((moduleName) => { | ||
if (moduleName) { | ||
// vscode.window.setStatusBarMessage("Installing PowerShell Module " + moduleName, 1500); | ||
this.languageClient.sendRequest(InstallModuleRequest.type, moduleName); |
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 left this comment in. I think the thought was it would be nice to display this status bar message but the extension should probably receive a message back from PSES that the module has been installed. Then it would display an "Install complete" message for say 5 seconds before being cleared.
I'll take a look at this later today, I'm making a lot of progress on getting the interactive console working so I'm trying to keep moving on that :) |
No problem. I was watching Joey demo this feature on a PluralSight video and not having UI come up for 20-30 seconds was a bit painful to watch. :-) |
This is one of those cases where I just cringe at the continual spread of a bad pattern that I established ;) |
This PR puts the quick pick list up first with "Cancel" as the only item and text that indicates what is happening and that it could take some time.
@daviwil - please check my use of the CancellationTokenSource - especially in the pickPowerShellModule function where the request completes but the user (or timeout) has already cancelled the op. Not sure about returning Promise.resolve(""). My JavaScript FU is pretty weak. Also feel free to help with the wording of the various messages in the UI.
Finally what timeout should we use? I set it for 1 minute but that might be long. It seems to take ~20 seconds on my machine. But as the gallery grows, so could that time.
Finally, for the future, it would be nice if we could detect a user key press and if the find isn't done - cancel and restart a new find based on what the user typed. Also, need timer support so that you only kick off a new find after say 1 second of paused typing.