JanStevens / angular-growl-2

growl-like notifications for angularJS projects
MIT License
285 stars 97 forks source link

Milestone 0.6.0 #2

Closed JanStevens closed 10 years ago

JanStevens commented 10 years ago

After some thoughts, here are the new proposed features:

  1. HTML5 Notification (only for Chrome ATM)
  2. Optional setting a title attribute along with the message
  3. Allow for template editing (non-bootstrap)
  4. Define some other templates (non-bootstrap)

First one is more of a proof of concept, I have the basics down and should be fun to use it. Planning on adding a native fall back method if the user does not grant access for the notifications or they are not supported.

Second feature allows for an optional title attribute along with the message. You could do the same using <h4></h4> tags but this requires enabling HTML. Another point is that native notifications also have a title field (they even have an icon field).

Third feature, I think there are many cases where people would like to change the template of the notification (adding own classes or adding extra stuff), editing the template right now requires overwriting the source code.

Final feature, don't know if it is possible but different templates could be used as an example. Depends if I'm in the mood for CSS'ing

Any other requests are also welcome!

gunta commented 10 years ago

+1 for everything, but specially 2. Optional setting a title attribute along with the message

Also another request: It would be good to be able to set notifications from the html directly with directives, like this:

<!-- The growl-notification directive supports HTML markup -->
<div growl-success ng-if="formHasBeenSubmitted">
    <strong>Thank you {{firstName}}</strong>, we will contact you shortly.
</div>
JanStevens commented 10 years ago

I'm a bit against this request mainly because it defeats the purpose of the growl notifications. It is better to change this logic to your javascript instead of placing it in the template.

You could easily add an onSuccess function to your $resource request that will send the growl notification. (and an onError for the error growl)

ghost commented 10 years ago

As far as 2. and 3. are concerned, that's kinda what Angular Toaster does. It has a Title and icon. Maybe looking at the css can give u a beachhead!

Cheers and thx for keeping that plugin alive!

JanStevens commented 10 years ago

Current status:

  1. HTML5 Notification (only for Chrome ATM) - Not really a priority since they look a bit ugly and are not supported by any browser except chrome
  2. Optional setting a title attribute along with the message - Done
  3. Allow for template editing (non-bootstrap) - Done, template can be overwritten
  4. Define some other templates (non-bootstrap) - Done, every element in the notification now has a class. (see source)

I also added icons (can be disabled). I plan on releasing v0.6 this week when the site (with demo and options) is finished.

Testing and feedback, always welcome