From 7664c0a94a4a70f507f15dd71c6aba1a9e6cdf76 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 --- .../core/js/forum/src/components/Notification.js | 12 ++++++++++++ framework/core/less/forum/NotificationList.less | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/framework/core/js/forum/src/components/Notification.js b/framework/core/js/forum/src/components/Notification.js index 7f948b3e5..a130e5870 100644 --- a/framework/core/js/forum/src/components/Notification.js +++ b/framework/core/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/framework/core/less/forum/NotificationList.less b/framework/core/less/forum/NotificationList.less index 324f51256..0937b0143 100644 --- a/framework/core/less/forum/NotificationList.less +++ b/framework/core/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; +}