Skip to content

Commit dc69c4e

Browse files
committed
Touch up notification/messages panels
Summary: Fixes T5575. Moves "All" links into title/header. Mark all read floats left, and connection status sits in footer. Also added hints to enable notifications (it's a cool feature). Test Plan: Tested locally both menus. {F190630} Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5575 Differential Revision: https://secure.phabricator.com/D10269
1 parent ff51a1a commit dc69c4e

File tree

4 files changed

+39
-30
lines changed

4 files changed

+39
-30
lines changed

resources/celerity/map.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
return array(
99
'names' => array(
10-
'core.pkg.css' => 'f8054294',
10+
'core.pkg.css' => '383d0947',
1111
'core.pkg.js' => '7c8455ef',
1212
'darkconsole.pkg.js' => 'df001cab',
1313
'differential.pkg.css' => '4a93db37',
@@ -37,7 +37,7 @@
3737
'rsrc/css/aphront/typeahead.css' => 'a989b5b3',
3838
'rsrc/css/application/auth/auth.css' => '1e655982',
3939
'rsrc/css/application/base/main-menu-view.css' => 'aceca0e9',
40-
'rsrc/css/application/base/notification-menu.css' => '5e3b5c86',
40+
'rsrc/css/application/base/notification-menu.css' => '6aa0a74b',
4141
'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d',
4242
'rsrc/css/application/base/standard-page-view.css' => '517cdfb1',
4343
'rsrc/css/application/chatlog/chatlog.css' => '852140ff',
@@ -730,7 +730,7 @@
730730
'phabricator-nav-view-css' => '9283c2df',
731731
'phabricator-notification' => '0c6946e7',
732732
'phabricator-notification-css' => 'ef2c9b34',
733-
'phabricator-notification-menu-css' => '5e3b5c86',
733+
'phabricator-notification-menu-css' => '6aa0a74b',
734734
'phabricator-object-selector-css' => '029a133d',
735735
'phabricator-phtize' => 'd254d646',
736736
'phabricator-prefab' => 'bbae734c',

src/applications/conpherence/controller/ConpherenceNotificationPanelController.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,14 @@ public function processRequest() {
7575

7676
$content = hsprintf(
7777
'<div class="phabricator-notification-header">%s</div>'.
78-
'%s'.
79-
'<div class="phabricator-notification-view-all">%s</div>',
78+
'%s',
8079
phutil_tag(
8180
'a',
8281
array(
8382
'href' => '/conpherence/',
8483
),
8584
pht('Messages')),
86-
$content,
87-
phutil_tag(
88-
'a',
89-
array(
90-
'href' => '/conpherence/',
91-
),
92-
'View All Conpherences'));
85+
$content);
9386

9487
$unread = id(new ConpherenceParticipantCountQuery())
9588
->withParticipantPHIDs(array($user->getPHID()))

src/applications/notification/controller/PhabricatorNotificationPanelController.php

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,39 @@ public function processRequest() {
4646
),
4747
pht('Notifications'));
4848

49-
$connection_status = new PhabricatorNotificationStatusView();
49+
if (PhabricatorEnv::getEnvConfig('notification.enabled')) {
50+
$connection_status = new PhabricatorNotificationStatusView();
51+
} else {
52+
$connection_status = phutil_tag(
53+
'a',
54+
array(
55+
'href' => PhabricatorEnv::getDoclink(
56+
'Notifications User Guide: Setup and Configuration'),
57+
),
58+
pht('Notification Server not enabled.'));
59+
}
60+
$connection_ui = phutil_tag(
61+
'div',
62+
array(
63+
'class' => 'phabricator-notification-footer'
64+
),
65+
$connection_status);
5066

5167
$header = phutil_tag(
5268
'div',
5369
array(
5470
'class' => 'phabricator-notification-header',
5571
),
5672
array(
57-
$connection_status,
5873
$notifications_link,
74+
$clear_ui,
5975
));
6076

6177
$content = hsprintf(
62-
'%s'.
63-
'%s'.
64-
'<div class="phabricator-notification-view-all">%s %s %s</div>',
78+
'%s%s%s',
6579
$header,
6680
$content,
67-
$clear_ui,
68-
" \xC2\xB7 ",
69-
phutil_tag(
70-
'a',
71-
array(
72-
'href' => '/notification/',
73-
),
74-
pht('View All Notifications')));
81+
$connection_ui);
7582

7683
$unread_count = id(new PhabricatorFeedStoryNotification())
7784
->countUnread($user);

webroot/rsrc/css/application/base/notification-menu.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,35 @@
8181
color: {$darkgreytext};
8282
}
8383

84+
.phabricator-notification-header a:hover {
85+
text-decoration: underline;
86+
}
87+
8488
.phabricator-notification-header .phabricator-notification-clear-all {
8589
color: #18559D;
8690
float: right;
8791
font-weight: normal;
8892
}
8993

90-
.phabricator-notification-view-all {
91-
text-align: center;
92-
font-weight: bold;
94+
.phabricator-notification-footer {
9395
background: {$greybackground};
9496
border-top: 1px solid {$thinblueborder};
9597
border-bottom-left-radius: 3px;
9698
border-bottom-right-radius: 3px;
9799
padding: 8px;
98100
font-size: 12px;
101+
color: {$darkgreytext};
102+
}
103+
104+
.phabricator-notification-footer a {
105+
color: {$darkgreytext};
106+
}
107+
108+
.phabricator-notification-footer a:hover {
109+
text-decoration: underline;
99110
}
100111

101112
.phabricator-notification-menu .aphlict-connection-status {
102-
float: right;
103-
font-weight: normal;
104113
color: {$lightgreytext};
105114
}
106115

0 commit comments

Comments
 (0)