Skip to content

Commit 6ec9bb4

Browse files
committed
Notification panel transitions and visual enhancements
Update to PatternFly 3.27.1
1 parent 59d0df1 commit 6ec9bb4

File tree

5 files changed

+73
-22
lines changed

5 files changed

+73
-22
lines changed

app/styles/_navbar-vertical.less

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@
5656
@media(min-width: @screen-sm-min) {
5757
margin-right: @navbar-header-right-margin;
5858
}
59-
.badge {
59+
.nav-item-iconic .badge {
60+
background-color: @color-pf-blue-300;
61+
border: 2px solid @navbar-os-bg-color;
62+
height: 12px;
6063
margin: 0 !important;
6164
position: absolute;
62-
top: 9px;
6365
right: 13px;
66+
top: 9px;
67+
width: 12px;
6468
@media(min-width: @screen-sm-min) {
6569
top: 20px;
6670
}

app/styles/_notifications.less

+57-8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
notification-drawer-wrapper {
66
.drawer-pf {
77
height: calc(100vh ~"-" (@navbar-os-header-height-mobile + @project-bar-height-mobile));
8+
opacity: 1;
89
position: fixed;
10+
right: 0;
911
top: (@navbar-os-header-height-mobile + @project-bar-height-mobile);
12+
transition: top 150ms ease-in-out, opacity 150ms;
1013
z-index: @zindex-navbar-fixed - 2; // two less than navbar, one less than project-bar
1114
@media(max-width: 350px) {
1215
left: 0;
@@ -22,6 +25,14 @@ notification-drawer-wrapper {
2225
left: 270px;
2326
}
2427
}
28+
&.hide {
29+
opacity: 0;
30+
top: 38px;
31+
}
32+
&.hide-add,
33+
&.hide-remove {
34+
display: block !important;
35+
}
2536
.tech-preview & {
2637
height: calc(100vh ~"-" (@navbar-os-header-height-mobile + @project-bar-height-mobile + @tech-preview-banner-height));
2738
top: (@navbar-os-header-height-mobile + @project-bar-height-mobile + @tech-preview-banner-height);
@@ -31,6 +42,9 @@ notification-drawer-wrapper {
3142
}
3243
}
3344
}
45+
.drawer-pf-close, .drawer-pf-toggle-expand {
46+
padding: 2px 10px;
47+
}
3448
// the whole block is clickable, need to set pointer on all of these
3549
// for the correct visual
3650
.drawer-pf-notification,
@@ -48,34 +62,69 @@ notification-drawer-wrapper {
4862
}
4963
}
5064
}
65+
.drawer-pf-notification-info {
66+
font-size: @font-size-small;
67+
}
5168
.drawer-pf-notification-inner {
5269
padding: 15px;
5370
.pficon-close {
54-
color: @color-pf-black;
71+
color: @color-pf-black-400;
72+
&:hover,&:focus,&:active {
73+
color: @color-pf-black-700;
74+
}
5575
}
5676
}
57-
.expanded-notification .drawer-pf-notification-message {
58-
max-width: 35%; // keeps flex in check in case of a really long message
77+
.drawer-pf-title h3 {
78+
font-size: @font-size-base - 1;
79+
}
80+
.expanded-notification {
81+
.drawer-pf-notification-info {
82+
.text-muted;
83+
}
84+
.drawer-pf-notification-message-expanded {
85+
font-size: @font-size-base - 1;
86+
padding: 10px 10px 10px 42px;
87+
.text-muted;
88+
}
89+
&.unread {
90+
.drawer-pf-notification-info {
91+
color: inherit;
92+
}
93+
.drawer-pf-notification-message-expanded {
94+
color: inherit;
95+
font-weight: normal;
96+
.word-break();
97+
}
98+
}
5999
}
60100
}
61101

62102
.panel-heading {
63103
.panel-title {
104+
color: @color-pf-black-700;
105+
font-size: @font-size-h4;
106+
font-weight: bold;
107+
line-height: normal;
64108
// TODO: hack to eliminate side-to-side wobble
65109
// There is a hard-coded <h4> that wraps the header:
66110
// - https://github.com/patternfly/angular-patternfly/issues/539
67111
// I'm putting quite a bit of markup inside the header,
68112
// need to tinker to eliminate this rule.
69-
overflow: hidden;
113+
overflow:hidden;
70114
.container-fluid {
71115
margin-left: 0;
72116
margin-right: 0;
73117
padding-left: 0;
74118
padding-right: 0;
75119
}
76-
}
77-
.small {
78-
.small();
79-
color: @color-pf-black;
120+
.panel-counter {
121+
font-size: @font-size-small;
122+
font-weight: normal;
123+
padding: 0;
124+
a {
125+
display: inline-block;
126+
font-style: normal;
127+
}
128+
}
80129
}
81130
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<div class="container-fluid">
2-
<div class="row">
2+
<div class="truncate">
3+
{{notificationGroup.heading}}
4+
</div>
5+
<div class="row mar-top-md panel-counter">
36
<div class="col-xs-6">
4-
<strong>{{notificationGroup.heading}}</strong>
7+
{{notificationGroup.totalUnread}} Unread
58
</div>
6-
<div class="col-xs-6 text-right small">
9+
<div class="col-xs-6 text-right">
710
<a
811
title="All Events"
912
ng-href="project/{{$ctrl.customScope.projectName}}/browse/events"
@@ -12,9 +15,4 @@
1215
</a>
1316
</div>
1417
</div>
15-
<div class="row mar-top-md">
16-
<div class="col-xs-12">
17-
<em>{{notificationGroup.totalUnread}} Unread</em>
18-
</div>
19-
</div>
2018
</div>

app/views/directives/notifications/notification-body.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878
</div>
7979
</div>
8080

81-
<span ng-if="$ctrl.drawerExpanded" class="drawer-pf-notification-message text-muted small word-break">
82-
{{notification.event.message}}
83-
</span>
8481
<div class="drawer-pf-notification-info">
8582
<span class="date">{{notification.event.lastTimestamp | date:'shortDate'}}</span>
8683
<span class="time">{{notification.event.lastTimestamp | date:'mediumTime'}}</span>
8784
</div>
8885
</div>
86+
<div ng-if="$ctrl.drawerExpanded" class="drawer-pf-notification-message drawer-pf-notification-message-expanded">
87+
{{notification.event.message}}
88+
</div>
8989
</div>

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"uri.js": "1.18.12",
1919
"moment": "2.14.2",
2020
"moment-timezone": "0.5.3",
21-
"patternfly": "3.26.6",
21+
"patternfly": "3.27.1",
2222
"hawtio-core": "2.0.37",
2323
"hawtio-extension-service": "2.0.2",
2424
"jquery": "3.2.1",

0 commit comments

Comments
 (0)