From 6d6bab13c0aebb36604d6229f5749325fe91cb6c Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 12 May 2021 14:54:29 +0800 Subject: [PATCH 1/2] Show full notification text via tooltip The tooltip fixes the system notifications problem (mentioned below), and also allows one to quickly read the entire comment without actually having to visit the comment. Currently, we only show about 50 characters in the notification, truncating it to an ellipsis when exceeded. This is not much of a problem for dynamic text (e.g. comments) since the full text can be seen after clicking on the notification (brings you to the comment). For system notifications, this is problematic since there's no other way to know what the full text was. Tried to dynamically change the font size to auto fit, but it wasn't fruitful. Even if it did work, it'll probably won't be legible for a 2000-character comment, plus the entire list will look weird with various font sizes. --- ui/component/notification/view.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/component/notification/view.jsx b/ui/component/notification/view.jsx index 08e4cea8e..1097f9940 100644 --- a/ui/component/notification/view.jsx +++ b/ui/component/notification/view.jsx @@ -145,11 +145,16 @@ export default function Notification(props: Props) {
{notification_parameters.device.title}
-
{commentText}
+
+ {commentText} +
) : ( <> -
+
{notification_parameters.device.text}
-- 2.45.3 From 88b0dafde7da7b77ea927faaceadce496e0a2b77 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 12 May 2021 14:57:47 +0800 Subject: [PATCH 2/2] Beautify "missed out" notification; bring user to Verify page. ## Issue 6021: Notifications: Missed Out ## Changes - The notification already brings the user to the `/rewards`. Tweaked it to directly enter the Verify Page. - Use LBC icon instead of generic bell for this notification. --- ui/component/notification/view.jsx | 4 ++++ ui/constants/notifications.js | 1 + 2 files changed, 5 insertions(+) diff --git a/ui/component/notification/view.jsx b/ui/component/notification/view.jsx index 1097f9940..7ca1acc6e 100644 --- a/ui/component/notification/view.jsx +++ b/ui/component/notification/view.jsx @@ -42,6 +42,9 @@ export default function Notification(props: Props) { case NOTIFICATIONS.DAILY_WATCH_REMIND: notificationTarget = `/$/${PAGES.CHANNELS_FOLLOWING}`; break; + case NOTIFICATIONS.MISSED_OUT: + notificationTarget = `/$/${PAGES.REWARDS_VERIFY}?redirect=/$/${PAGES.REWARDS}`; + break; default: notificationTarget = notification_parameters.device.target; } @@ -80,6 +83,7 @@ export default function Notification(props: Props) { break; case NOTIFICATIONS.DAILY_WATCH_AVAILABLE: case NOTIFICATIONS.DAILY_WATCH_REMIND: + case NOTIFICATIONS.MISSED_OUT: icon = ; break; default: diff --git a/ui/constants/notifications.js b/ui/constants/notifications.js index c55377676..f7cfdc608 100644 --- a/ui/constants/notifications.js +++ b/ui/constants/notifications.js @@ -1,6 +1,7 @@ export const NOTIFICATION_CREATOR_SUBSCRIBER = 'creator_subscriber'; export const NOTIFICATION_COMMENT = 'comment'; export const NOTIFICATION_REPLY = 'comment-reply'; +export const MISSED_OUT = 'missed_out'; export const DAILY_WATCH_AVAILABLE = 'daily_watch_available'; export const DAILY_WATCH_REMIND = 'daily_watch_remind'; export const NEW_CONTENT = 'new_content'; -- 2.45.3