Page MenuHomePhabricator

Alerts are shown as "unseen" on mobile site when they have already been seen in the desktop
Closed, ResolvedPublic

Description

This happens when I see the alerts on the desktop site but don't read them. This results in them being greyed out on the desktop site. When I visit the mobile site after that, they are shown as though I haven't seen them. IOW, they show up in red saying I didn't see the alerts. They get greyed out only when I tap on them. This seems unnecessary.

Alerts in desktop site

Alerts in mobile site

Steps to reproduce
  1. Make sure you have some alerts
  2. Log in to the desktop site
  3. See the alerts i.e., don't take any actions available through the alerts
  4. Close the alert window (Number of alerts is shown greyed out)
  5. Log in to the mobile site
Expected results

Number of alerts is shown greyed out.

Actual results

Number of alerts is shown in red indicating I haven't seen them. To make things even worse, after I see the alerts in the mobile site they don't remain greyed out even after a simple refresh i.e., the red indicator pops up for the next page I load.

Event Timeline

Kaartic created this task.Dec 17 2017, 6:44 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptDec 17 2017, 6:44 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 401755 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/skins/MinervaNeue@master] Fix notifications always appearing as unseen

https://gerrit.wikimedia.org/r/401755

Petar.petkovic added a project: MinervaNeue.
Petar.petkovic added a subscriber: Petar.petkovic.

This may be external, since the change needed to happen in MinervaNeue. I have still provided a patch to resolve the issue, since change to method signature in Echo caused the code in Minerva to behave unexpectedly. This turned out to be simple change in the end, although finding the issue took a little more time than fixing.

Change 401755 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Fix notifications always appearing as unseen

https://gerrit.wikimedia.org/r/401755

@Petar.petkovic why does the task have MinervaNeue project tag? The issue description does not mention Minerva skin.

I checked the following cases:
(1)

  • there are some unseen Alerts (displayed in red)
  • click on the Alert badge - the red counter becomes grey.
  • in Preferences-Appearance change to MinervaNeue skin - the counter becomes red again
  • change the skin back to Vector - the Alerts (and Notices) become active - red and blue.

(2) Repeated the Steps to reproduce from the task description. However, following the steps I noticed that if only Alerts are present, the counter on mobile will not display the count for the Alerts that were seen on desktop.

@Etonkovidova the screenshots refer to the MinervaNeue skin which is used on the mobile site. The code itself with the problem is also the Minerva skin so this makes sense to me.

@Petar.petkovic why does the task have MinervaNeue project tag? The issue description does not mention Minerva skin.

@Jdlrobson has already explained this. Thank you Jon!

I checked the following cases:
(1)

  • there are some unseen Alerts (displayed in red)
  • click on the Alert badge - the red counter becomes grey.
  • in Preferences-Appearance change to MinervaNeue skin - the counter becomes red again
  • change the skin back to Vector - the Alerts (and Notices) become active - red and blue.

(2) Repeated the Steps to reproduce from the task description. However, following the steps I noticed that if only Alerts are present, the counter on mobile will not display the count for the Alerts that were seen on desktop.

Where did you check those reported cases? That sound even more buggy than initially reported. Did you test after the change is made or are you reporting the bugs found before the patch?

Minerva skin shows only one, unified button for alerts and notices. If any of alerts of notices has unseen items, Minerva displays red circle with number showing aggregate list of unread items from both alerts and notices.

Etonkovidova added a comment.EditedJan 4 2018, 5:46 PM

Thanks, @Jdlrobson - now it makes sense to me too.

@Petar.petkovic - yes, surprisingly it looks quite buggy. I tested it in betalabs that has a quirky way to deal with user sessions (kicking me out 8 of 10 times when I click on the notifications badges). I need to sort out which issues can be attributed to betalabs behavior and which ones are just issues.
I will check today and report back.

@Petar.petkovic Checked in production (wmf.12 and w,f.15) - switching to MinervaNeue on a desktop makes seen Alerts/Notices unseen (red). It does not happen with other skins.

Re-confirmed in betalabs the following:

(2) Repeated the Steps to reproduce from the task description. However, following the steps I noticed that if only Alerts are present, the counter on mobile will not display the count for the Alerts that were seen on desktop.

Moving the ticket out of QA, as per Elena's comments, the issue is even deeper than what's initially reported.

Change 403427 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/skins/MinervaNeue@master] Fix seen notifications appearing as unseen on mobile

https://gerrit.wikimedia.org/r/403427

@Catrope might now be a good opportunity to start moing this code into Echo itself? I've seen lots of breakages with this code as there is no easy way to keep it synced...

All it's doing is rendering a notification button. It feels like there should be some kind of hook NotificationBadgeRender that all skins can invoke that returns HTML/template data. The fact that Minerva needs to call various Echo functions troubles me :/

Change 403427 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Fix seen notifications appearing as unseen on mobile

https://gerrit.wikimedia.org/r/403427

Petar.petkovic moved this task from Backlog to Bugs on the MinervaNeue board.
Petar.petkovic moved this task from Backlog to Bugs on the Notifications board.

Checking two issues that were fixed in this task.
(1)

"Alerts are shown as "unseen" on mobile site when they have already been seen in the desktop"

This issue is fixed (checked in betalabs). If Alerts (and Notices) are seen on the desktop - they do not become red(blue) on the mobile.

(2) The issue below is fixed - checked in betalabs.

click on the Alert badge - the red counter becomes grey.
in Preferences-Appearance change to MinervaNeue skin - the counter becomes red again

Note: - if Alerts are seen on the desktop, but there are unseen Notices (displayed in blue), the mobile will displayed the summary count (seen Alerts and unseen Notices) in red. That might be confusing to a user, but it will require some re-design on the mobile site.

A couple of related phab task:
T185360: Minerva skin: the icon and the counter for seen Alerts/Notices will not be displayed.
T185361: [betalabs] MinervaNeue: some minor display issues

Etonkovidova closed this task as Resolved.Jan 20 2018, 12:48 AM