Add Status Items when running commands#147
Conversation
| await runOniOSSimulator(this.context, terminal, { | ||
| scheme: scheme, | ||
| simulatorId: destination.udid, | ||
| destination: destination, |
There was a problem hiding this comment.
I changed from passing primitives to Destination objects in 2-3 places, which allows us to better access the destination name for outputting it in the status bar
| pick.onDidHide(() => { | ||
| reject(new QuickPickCancelledError()); | ||
| pick.dispose(); | ||
| }); |
There was a problem hiding this comment.
So far cancelling a QuickPick just left the command "hanging", it would never resolve or reject. Now we count this as rejected, but will catch it in CommandExecution so no error is shown to the user
There was a problem hiding this comment.
This is a clever, thanks for adding this!
|
Thanks so much for your contribution! I tried running it locally and really like the idea
Don't worry about that — at first glance, the your code is already looks good. During the code review, I’ll update any parts where I prefer in different way, so no pressure to make it perfect |
|
I've updated the pull request with additional refactoring. I decided that is time to remove CommandExecution class at all and rely on AsyncLocalStorage to pass the current command down the call chain. I was planning to do it, but I decided that now is the right time to do it |
|
Thanks! ❤️ |
The main goal of these changes is to better communicate the current state of sweetpad and especially builds to the user, which can be hard to understand right now. The changes here are twofold:
Two very common scenarios where this PR improves the workflow are:
a) The user runs a build for the first time and we need to fetch the schemes and destinations, which can take considerable time on larger projects. So far, it appeared to the user as if the command doesn't do anything, since this is done silently in the background. Now, the user will get proper progress reports in the status bar
b) You Launch the app and want to know if the pipeline is still building, installing or already running. So far you had to check terminal output, now this can be seen easily on the vs code status bar
The auto-reveal option was added for users (such as me) who do not regularly require to inspect the app logs. For example, a lot of times my workflow is just changing code, then launching the app to check my changes. I do not require the terminal at all here. The new option to prevent auto-reveal of the terminal + the information I get from the statusbar are now enough to support such workflows.
Disclaimer: I am neither very familiar with TypeScript nor the VS Code API. I'm happy for any suggestions for this PR. I mainly wrote this for myself but I think this can really benefit others as well.