Improve the implementation of Notifications
Summary:
Currently, you can't change a notification that's already shown. There's no reason for this.
(I'm planning to put file upload progress/errors in notifications.)
- Make `setContent()` and `setDuration()` immediately affect the notification.
- When there are more than 5 notifications, queue them up instead of dropping them.
- Allow arbitrarily many classes to be added/removed.
- Make the examples in the UIExamples tests more rich.
Test Plan:
- Verified normal notifications continue to function as expected.
- Played with the UIExamples notifications:
- Verified the "update every second" notification udpated every second.
- Verified the permanent alert notification was yellow and requires a click to dismiss.
- Verified the interactive notification responds correctly to "OK" / "Cancel".
- Verified the "click every 2 seconds" notification doesn't vanish until not clicked for 2 seconds.
Reviewers: btrahan, vrana
Reviewed By: btrahan
CC: aran
Differential Revision: https://secure.phabricator.com/D3653
This commit is contained in:
@@ -888,7 +888,7 @@ celerity_register_resource_map(array(
|
||||
),
|
||||
'javelin-behavior-aphlict-listen' =>
|
||||
array(
|
||||
'uri' => '/res/0743d3f3/rsrc/js/application/aphlict/behavior-aphlict-listen.js',
|
||||
'uri' => '/res/6dde3f43/rsrc/js/application/aphlict/behavior-aphlict-listen.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
@@ -1522,7 +1522,7 @@ celerity_register_resource_map(array(
|
||||
),
|
||||
'javelin-behavior-phabricator-notification-example' =>
|
||||
array(
|
||||
'uri' => '/res/df97e4b3/rsrc/js/application/uiexample/notification-example.js',
|
||||
'uri' => '/res/a6d51998/rsrc/js/application/uiexample/notification-example.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
@@ -2499,7 +2499,7 @@ celerity_register_resource_map(array(
|
||||
),
|
||||
'phabricator-notification' =>
|
||||
array(
|
||||
'uri' => '/res/cacd79f1/rsrc/js/application/core/Notification.js',
|
||||
'uri' => '/res/c604fbbe/rsrc/js/application/core/Notification.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user