Sublime Forum

Built-in Notification System

#1

I think we could use a notication system in sublime, or at least the API to be able to put one together. We have the new HTML based popup system which works great, and I think we could build on that to provide a way to display popup panels that are independent of cursor position.

I have included a screen shot of a very basic mockup of such a system, although I would have to think about keyboard focused users with dismissing the notification.

I think this would serve the need for a notification with higher visibility than flashing a message in the status bar, but less obtrusive than displaying a message dialog.

What I had envisioned is something similar to the popup API where you could supply html define location within a window or possibly even define a view if the notification is related to a specific view.

Package control could use this functionality to display a list of packages with updates available when the user disabled automatic updates.

I am sure there are other use cases for such a system. Below is a screen shot I’ve created to show what I had envisioned.

4 Likes

Interface Suggestions
#2

I agree that status bar message flashing is very unnoticable at times (especially when it’s hidden, heh), so I support the demand of something inbetween.

+0.5 on the specific suggestion with html popups, curious to see more suggestions.

0 Likes

#3

I figured html is an option that is currently in place that can be styled, but I am also interested the community’s opinions/suggestions.

It doesn’t even have to be an overlay like I have in my mockup, if we had an info bar that displayed above the panels/status bar to increase visibility, i think that would be an improvement.

0 Likes

#4

How do you see this feature acting when “Distraction Free Mode” is turned on? Would there be a queue of notifications that could be reviewed after exiting distraction free mode?

How would you feel about the API using the existing notification system for each OS, rather than rebuilding that feature within the program?

0 Likes

#5

I personally use Snarl + it’s JSON capabilities to send notifications from my ST3 plugins to system (I could use Growl but JSON was easier to understand to me).

There is small lag but I can send notifications that are clickable, have icons and potentially even notifications that can return back to sender that some action was clicked (or if not clicked).

I’ve added it in like 100-150lines, was very easy to do. Linux notifications system are not too good, windows does not have anything like that (I do not count top bar flashing).

0 Likes

#6

https://packagecontrol.io/packages/SubNotify

0 Likes

#7

Considering that both Windows 10 and OSX have now built in notification areas, maybe @jps should consider integrating natively?

I mean it might be easier for plugin developers to rely on editor API rather than 3rd party plugins?

Did you tried Win10? Action Center looks pretty powerful …

0 Likes

#8

I have looked at SubNotify in the past and it does provide a solution, I just don’t like the idea of creating a depenancy on the OS to provide this sort of functionality. Although I don’t think it would ever happen, I would hate to have to wait for a Sublime update to fix an issue with a breaking change in the OS notification API.

Maybe I am the only one, but I prefer to leave the system notifications to be information relative the to state of my system rather than having software notifications cluttering up the notices. I do realize that they can be categorized by application(based on my quick viewing on windows 10), which would be helpful but I think they should remain separate. Just my opinion.

@jasonaller does bring up a good point about “distraction free mode” which would pose a problem. I think they should still display in an unobtrusive spot.

Maybe there is a need for different level notifications, some that would not display in distraction free mode such as plugin update notifications and others that would for those that plugins that require notifications to the user. I have a custom build system in place that triggers a build on a linux machine and I cannot use the built in build-system (that i’ve seen). I would still want to see the build completed notification when in distraction free mode, but I would not want to see the notices that a plugin update is available.

I like the ideas everyone! Keep them coming!

1 Like

#9

This is one of those things that I think needs to either be implemented by Sublime (current tooltips won’t really cut it as it really needs to be a little more advanced than that) or a plugin would need to use some kind of external notification system which is what SubNotify (which I wrote) does.

Growl is cross platform which is why SubNotify supports it, but it also supports some native implementations where available, Windows, Ubuntu, etc. There are other notifications systems available as well, but I had to settle on something. I have no problem adding some other notification systems to SubNotify, but I had to initially pick something. I have found SubNotify sufficient for what I needed. Yeah, being able to click notifications with callbacks etc. would be nice, but not really something I had to have; I didn’t bother wasting time trying to shoehorn that functionality into systems that I might have been able to. I wanted to keep things simple and basically work the same no matter what system was used through SubNotify.

I would love to see a notification API built into Sublime, but that is really up to Jon. I guess I could outline all the different ways I would like it to work, but ultimately we will get what Jon gives us (or doesn’t) :). You can never tell, I didn’t expect tooltips at all.

2 Likes

#10

I 100% agree with @facelessuser. A proper API that all plugins can rely on would be amazing.

What I’d like to see as well is a way to show progress bars on the notifications or elsewhere. Both with a specific process (e.g. percantage) and with an unspecific (“working”).
As a primary consumer, Package Control comes to mind here, but I could use it for my own plugins too.

0 Likes

#11

Progress bar API would be cool in the status bar. I guess you could use those in a notification, but I usually view those as a one time message, not a persistent, updating message. I think a dialog with a progress bar would make more sense (like the update dialog), but maybe that is just me.

0 Likes

#12

I imagine progress bar notifications to be similar to what we have on smartphones nowadays (mainly Android because I don’t have other phones). Apps can put up a notification with a progress bar and can remove it when the progress is done, so they are not persistent.

The notification area could be the status bar, but I think we agree that the statusbar is better suited for persistent information (linter errors, row and column indices, the current git branch …).

0 Likes

#13

It works well in Android as notifications get hidden away. They can be persistent or semi-persistent without getting in the way. If we had a notification panel we could hide, I think I would agree.

0 Likes

#14

@iamntz Action Center indeed looks amazing (but also a little cluttered). The problem is that enterprise is still in Win7 so I have to use it (also I use only Linux in home)

@FichteFoll to do something more magic you have to have some custom program/plugin that listens on some protocol. I do not think Growl itself supports update of notification. Custom server written in python that can listen to growl but also is extension of it ?

0 Likes