Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(763)

Issue 6851058: Growl-style notifications.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by frankban
Modified:
11 years, 5 months ago
Reviewers:
mp+134660
Visibility:
Public.

Description

Growl-style notifications. This branch introduces growl-style notifications in the top-right corner of the window. Implemented a notifier widget: it is a reusable piece of code that just need a title, a message and a timeout to display a notification. It is used to render notification outside view containers, so that notifications are preserved when the user changes the current view. A notifier is created when a notification is added, following these rules: - the notification is an error; - the notification is local (it's not related to the delta stream). The last point involves adding a new field "isDelta" to the notification model, defaulting to false. Notifications created when the delta stream arrives are marked as "isDelta: true". UI: new notifications appear on top, and disappear after 8 seconds. Mouse over prevents a notification to hide, mouse click destroys a notification. Also fixed a bug in the unit view: a callable was undefined when trying to "retry" or "resolve" a unit. https://code.launchpad.net/~frankban/juju-gui/bug-1076404-growl/+merge/134660 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Growl-style notifications. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+407 lines, -3 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 chunk +2 lines, -1 line 0 comments Download
A app/assets/images/notifier-error.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M app/index.html View 1 chunk +1 line, -0 lines 0 comments Download
M app/models/models.js View 1 chunk +2 lines, -0 lines 0 comments Download
M app/modules-debug.js View 1 chunk +4 lines, -0 lines 0 comments Download
M app/store/notifications.js View 1 chunk +1 line, -1 line 0 comments Download
A app/templates/notifier.handlebars View 1 chunk +3 lines, -0 lines 0 comments Download
M app/views/notifications.js View 3 chunks +30 lines, -2 lines 0 comments Download
A app/widgets/notifier.js View 1 chunk +148 lines, -0 lines 0 comments Download
M lib/views/stylesheet.less View 1 chunk +50 lines, -0 lines 0 comments Download
M test/index.html View 1 chunk +1 line, -0 lines 0 comments Download
M test/test_notifications.js View 1 chunk +61 lines, -0 lines 0 comments Download
A test/test_notifier_widget.js View 1 chunk +103 lines, -0 lines 0 comments Download

Messages

Total messages: 5
frankban
Please take a look.
11 years, 5 months ago (2012-11-16 13:55:51 UTC) #1
thiago
Thanks, Francesco. I like it! I have just one really minor comment. []s, Thiago. https://codereview.appspot.com/6851058/diff/1/app/views/notifications.js ...
11 years, 5 months ago (2012-11-16 14:39:29 UTC) #2
frankban
Thanks for the review Thiago! A reply to your comment follows. https://codereview.appspot.com/6851058/diff/1/app/views/notifications.js File app/views/notifications.js (right): ...
11 years, 5 months ago (2012-11-16 14:51:32 UTC) #3
matthew.scott
This all looks pretty good to me, Francesco! Thanks for the branch. Works well, tests ...
11 years, 5 months ago (2012-11-16 15:14:27 UTC) #4
frankban
11 years, 5 months ago (2012-11-16 15:28:24 UTC) #5
*** Submitted:

Growl-style notifications.

This branch introduces growl-style notifications
in the top-right corner of the window.
Implemented a notifier widget: it is a reusable
piece of code that just need a title, a message
and a timeout to display a notification. It is used
to render notification outside view containers, so
that notifications are preserved when the user changes
the current view.

A notifier is created when a notification is added,
following these rules:
- the notification is an error;
- the notification is local (it's not related to the
  delta stream).

The last point involves adding a new field "isDelta"
to the notification model, defaulting to false.
Notifications created when the delta stream arrives are
marked as "isDelta: true".

UI: new notifications appear on top, and disappear after
8 seconds. Mouse over prevents a notification to hide, 
mouse click destroys a notification.

Also fixed a bug in the unit view: a callable was undefined
when trying to "retry" or "resolve" a unit.

R=thiago, matthew.scott
CC=
https://codereview.appspot.com/6851058
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b