Previewing Notifications API


#1

Is there a way to preview the different notification messages, I’d like to stylise it only a bit to fit within the theme. Yet, I wonder if there is way to preview them, without actually making a real bug in my code.


#2

You can use the NotificationManager to pop up notifications. It is available at atom.notifications.


#3

So CMD-ALT-T should trigger a error message? Hmmm, seems that doesn’t work for me, neither is there anything notifications: in my Command Palette.


#4

I believe the command tied to that key map only works in Dev Mode. And no, I wasn’t suggesting using the Command Palette to trigger notifications. I was saying you could open the Developer Tools Console and type something like:

atom.notifications.addInfo('foo!')


#5

Oh! Thanks, you learned me a new trick :slight_smile:
This will do indeed.