Closed jrieken closed 7 years ago
@jrieken this is excellent feedback! i'll totally do this. that way i won't have to click the "close" button when i'm burning at the keyboard. :) Related to that - is there a hotkey that'll close status messages and info messages? So i don't HAVE to click the close button?
Thanks for the feedback I'll totally implement some changes to reflect your guidance. Mind if i send you a single change for review that you can sign off on and then i'll know i'm not doing it wrong?
that way i won't have to click the "close" button when i'm burning at the keyboard. :)
Not sure that we are on the same page here. I was talking about the status bar at the bottom. But you answer your question, ESC
it is when info|warn|error-messages show.
@jrieken makes sense. i was more talking about the info messages.
Apologies for that tangential conversation earlier, @jrieken. Was in my extension's code tonight merging a PR and finding the places i'll need to change this for my status message code. Any chance you have an example of how to achieve the recommendation you've made? It would help to see some conventions or examples to follow. Will do some experimentation in the meantime. Thanks again!
I have seen this pattern
vscode.window.setStatusBarMessage(constants.statusGettingFarms);
in a few places and as quick FYI there is something missing. Our status message actually stack, so to remove them or unset them you should invoke the Disposable the function returns (instead of calling it with the empty string). Alternatively, you pass in a timeout or promise which then also control the lifecycle of the status bar message.From looking at yours and others extensions I understand that this might be a not so obvious detail of our API and I am happy to hear any kind of feedback.