Page MenuHomePhabricator

Mark as seen notifications from the Notifications Page
Closed, ResolvedPublic

Description

The notification badge becomes blue when there are new notifications the user has not seen. As soon as the panel is opened, these notifications are highlighted in blue and the badge becomes grey.

Currently when opening the Notifications Page, new notifications may get highlighted, but the notification badge does not turn grey as a result of the user seeing these notifications. This may make think the user that new notifications available when those are just the ones already seen.

Notifications becoming seen in the Notifications Page should affect the status of the notification panel and badge.

Event Timeline

This could be done by either:

  1. Waiting for per-notification seen time.
  2. Simplifying and updating the per-user seen time when they open the notification page.

It's likely this task will also fix T127419. @Etonkovidova please check that when this is resolved.

From the specs

Notifications becoming seen in the Notifications Page should affect the status of the notification panel and badge.

Please review the current behavior described below (the steps use the attached screen recording scenario) and the screen recording attached.

  1. I have unseen/unread Alerts =6 and unseen/unread Notices=99+. The badges display red and blue accordingly.
  2. I click on Alerts - the flyout open, the new alerts gets highlighted with animation, and the badge becomes gray (the seen status).
  3. I click on 'All notifications' in the flyout and Special:Notifications page is displayed. The unread notifications (presumably) unseen/unread Notices, get highlighted with animation. The Notices badge does not change color - it stays blue.
  4. I click on 'Beta' option; after redirecting to Beta feature page, the Notices badge turns grey indicating that all notices are seen.

According to the specs, I'd expect that all notifications (seen Alerts and unseen Notices) would become seen when I landed on Special:Notifications page (in step #3). The highlighting on Special:Notifications is perfect indication for a user since there are unseen Notices and highlighting emphasizes the fact that their status is new/unseen and it'd be a good signal to a user before the Notices badge changes to gray.

@Etonkovidova, nice job on the animation. Very helpful! Regarding your observation:

I'd expect that all notifications (seen Alerts and unseen Notices) would become seen when I landed on Special:Notifications page (in step #3).

Yes, that sounds right to me as well. Apparently it requires the loading of a new page to trigger the badge update. @Mooeypoo, is there any reason we can't update the badge when we land on the Notifications page? (Moving back to In Development.)

The problems here are (a) the request for updating 'seenTime' takes a little time while things load (and may get interrupted if the user leaves before the page loads fully) and (b) the page itself and the badges are two modules that don't "speak" to one another -- so the badges can't "know" that the seenTime was updated and update themselves.

There are several ways to get around this; the easiest one would be to "fake" a seen state in the badge icons right when special-notifications is loaded.