From 52bf8b3c1c186c91b96dbfdb6f022c2fd8e4bb93 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 21 Aug 2015 09:54:41 +0930 Subject: [PATCH] Add notification excerpts to help distinguish posts --- js/forum/src/components/Notification.js | 12 ++++++++++++ less/forum/NotificationList.less | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/js/forum/src/components/Notification.js b/js/forum/src/components/Notification.js index 7f948b3e5..a130e5870 100644 --- a/js/forum/src/components/Notification.js +++ b/js/forum/src/components/Notification.js @@ -26,6 +26,9 @@ export default class Notification extends Component { {icon(this.icon(), {className: 'Notification-icon'})} {this.content()} {humanTime(notification.time())} +
+ {this.excerpt()} +
); @@ -58,6 +61,15 @@ export default class Notification extends Component { content() { } + /** + * Get the excerpt of the notification. + * + * @return {VirtualElement} + * @abstract + */ + excerpt() { + } + /** * Mark the notification as read. */ diff --git a/less/forum/NotificationList.less b/less/forum/NotificationList.less index 324f51256..0937b0143 100644 --- a/less/forum/NotificationList.less +++ b/less/forum/NotificationList.less @@ -114,3 +114,11 @@ font-weight: bold; } } +.Notification-excerpt { + color: @muted-more-color; + font-size: 12px; + margin-top: 5px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +}