Skip to content

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

Merged
merged 1 commit into from
Feb 18, 2017

Conversation

rkeithhill
Copy link
Contributor

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 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.
@rkeithhill rkeithhill added the Issue-Enhancement A feature request (enhancement). label Feb 4, 2017
@rkeithhill rkeithhill added this to the Backlog milestone Feb 4, 2017
@rkeithhill rkeithhill requested a review from daviwil February 4, 2017 23:07
this.pickPowerShellModule().then((moduleName) => {
if (moduleName) {
// vscode.window.setStatusBarMessage("Installing PowerShell Module " + moduleName, 1500);
this.languageClient.sendRequest(InstallModuleRequest.type, moduleName);
Copy link
Contributor Author

@rkeithhill rkeithhill Feb 4, 2017

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.

@daviwil
Copy link
Contributor

daviwil commented Feb 6, 2017

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 :)

@rkeithhill
Copy link
Contributor Author

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. :-)

@daviwil
Copy link
Contributor

daviwil commented Feb 18, 2017

This is one of those cases where I just cringe at the continual spread of a bad pattern that I established ;)

@daviwil daviwil merged commit 923c695 into develop Feb 18, 2017
@daviwil daviwil deleted the rkeithhill/improve-find-ps-module-ui branch February 18, 2017 15:54
@daviwil daviwil modified the milestone: Backlog May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants