Page MenuHomePhabricator

Mobile Echo code scattered between Minerva, Echo and MobileFrontend extensions
Closed, ResolvedPublic3 Estimated Story Points

Description

Echo replaces the Minerva rendered button with a NotificationBadge. The purpose of this seems to purely be to allow Echo to change the badge count.

As we transition this to Codex we should clean this code up, namely:

TODO

  • Stop Echo replacing the NotificationBadge rendered by Minerva and instead progressively enhance it. Move logic for changing badge into Echo, using hooks if necessary

QA

On mobile site https://en.m.wikipedia.beta.wmflabs.org/ login.

  • When no notifications a bell icon should show in the top right on mobile
  • When a user has > 0 notifications a red circle with white text shows with the number inside it.
  • When clicking the notification icon with JS enabled, the drawer/overlay opens and the number of notifications resets to 0, remains red and white text.
  • When clicking the noticiation icon with JS disabled, the user navigates to Special:Notifications
  • Login on desktop site, change skin to Minerva Expected: Two icons show. Clicking notification icons take you to Special:Notifications.

Signoff criteria

  • Create ticket for preferred behavior for notification icon and state (potentially using component from vector 2022) Done in T343838

QA Results - Beta

ACStatusDetails
1T342907
2T342907
3T342907
4T342907
5T342907

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript
Jdlrobson updated the task description. (Show Details)

Change 941531 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Migrate Echo icons to Codex.

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

ovasileva lowered the priority of this task from High to Medium.Jul 27 2023, 5:24 PM

Discussed in standup. Next steps:

  1. Proceed with code cleanup. Fix current issue with notification number as the link
  2. After completion: create new ticket for preferred behavior, potentially adopting the components from Vector 2022
ovasileva updated the task description. (Show Details)
ovasileva set the point value for this task to 3.

Change 943647 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] WIP: Echo uses Button template

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

Change 941531 abandoned by Jdlrobson:

[mediawiki/skins/MinervaNeue@master] Migrate Echo icons to Codex.

Reason:

Please see https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/943647

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

Change 944352 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Echo@master] Drop dead code

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

https://gerrit.wikimedia.org/r/943647 is now ready for review. Note, this switches the Echo icon temporarily back to mw-ui-button from Codex to contribute to the work in T342908. This will then switch to Codex along with all the other icons.

There is a follow up patch in Echo to remove code replaced by the code I've added in Minerva. It's not a priority to review this and we probably want to keep the patch around for at least a week to allow ourselves a safe rollback path.

Jdlrobson removed Jdlrobson as the assignee of this task.EditedAug 3 2023, 1:23 AM
Jdlrobson added a subscriber: Jdrewniak.

@Jdrewniak would you be able to review this? https://gerrit.wikimedia.org/r/943647 is now ready for review. It moves all code into Minerva. Minor visual changes to be expected.

This comment was removed by Jdlrobson.

Change 943647 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Echo uses Button template

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

Change 946984 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Echo@master] Disable Echo behaviour on Minerva desktop

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

Change 946984 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Disable Echo behaviour on Minerva desktop

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

Change 947417 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Fixes: Echo circle notification appears as large red square

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

Change 947417 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fixes: Echo circle notification appears as large red square

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

Status: Pending
Environment: Beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA
Test Links:
Desktop: https://en.wikipedia.beta.wmflabs.org/wiki/Beer
Mobile: https://en.m.wikipedia.beta.wmflabs.org/wiki/Beer

✅AC1: bell icon should show in the top right on mobile.

T342907_Notifications_Mobile3.png (983×753 px, 169 KB)

❌AC2: > 0 notifications a red circle with white text shows with the number inside it.
The notification of Thanks is there but no number result popped up by the notification bell. Desktop version number pops up though.

Notification configDesktop StatusMobile NO NotificationNotification Result
T342907_Notifications_Mobile1.png (788×573 px, 69 KB)
T342907_Notifications_Mobile2.png (567×1 px, 140 KB)
T342907_Notifications_Mobile3.png (983×753 px, 169 KB)
T342907_Notifications_Mobile4.png (946×778 px, 126 KB)

⬜AC3: clicking the notification icon with JS enabled, the drawer/overlay opens and the number of notifications resets to 0, remains red and white text.
I can't test until I see the notification working on mobile

✅AC4: clicking the notification icon with JS disabled, the user navigates to Special: Notifications

T342907_Notifications_Mobile5.png (1×1 px, 163 KB)

Please note there is a 5th QA step (I've updated formatting to make that clearer)

@GMikesell-WMF regarding AC2 rightly or wrongly this is current behaviour in production. Nice find! I've noted it in T344029 as it doesn't seem related to this change. For now please generate a notification alert (by getting another user to edit your talk page)

Screenshot 2023-08-10 at 4.40.07 PM.png (359×1 px, 57 KB)

Screenshot 2023-08-10 at 4.40.24 PM.png (393×1 px, 95 KB)

Status: ✅ PASS
Environment: Beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA
Test Links:
Desktop: https://en.wikipedia.beta.wmflabs.org/wiki/Beer
Mobile: https://en.m.wikipedia.beta.wmflabs.org/wiki/Beer
https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Testuserone

✅AC1: bell icon should show in the top right on mobile.

T342907_Notifications_Mobile3.png (983×753 px, 169 KB)

✅AC2: > 0 notifications a red circle with white text shows with the number inside it.
https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Testuserone

T342907_Notifications_Mobile6.png (979×762 px, 78 KB)

✅AC3: clicking the notification icon with JS enabled, the drawer/overlay opens and the number of notifications resets to 0, remains red and white text.
I can't test until I see the notification working on mobile

T342907_Notifications_Mobile7.png (983×776 px, 79 KB)

✅AC4: clicking the notification icon with JS disabled, the user navigates to Special: Notifications

T342907_Notifications_Mobile5.png (1×1 px, 163 KB)

✅AC5: desktop site, change skin to Minerva Expected: Two icons show. Clicking notification icons take you to Special:Notifications.

T342907_Notifications_Mobile8.png (471×2 px, 76 KB)
T342907_Notifications_Mobile9.png (461×2 px, 73 KB)
GMikesell-WMF updated the task description. (Show Details)

QA looks good and I manually reviewed the 6 Pixel failures https://pixel.wmcloud.org/reports/echo/index.html

Change 944352 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Drop dead code

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