Skip to end of metadata
Go to start of metadata

Success and error toast messages

Our extensions have a need to communicate to the users what's happening. Things going bad, things finishing successfully, or just some additional information.

Luckily, we can utilise the parent – VS Code – and through their API invoke native toast messages when we need.

Native toasts provide us many benefits, and they come for free. Just some of the benefits are:

  • They work in a layer above our Web View extension space, and work in asynchronous manner. This means that the user can do an action in Extension 1, and if that action is slow, the user can go to Extension 2 and do some work there. When the action in Extension 1 completes, a toast will come in floating above informing the user it's done, even while they are in Extension 2



  • The messages get stored in VS Code notification box, and if the user missed what happened, they can still retrieve the message!

  • It allows for full compatibility between VS Code and SBAS, and the notifications which work in VS Code will automatically work in SBAS. The power of native!
  • It is long term sustainable as any change to the notification system VS Code does won't cause any headaches to the messaging. 
  • It's free!
  • No labels