(Translated by https://www.hiragana.jp/)
⚓ T340262 Use Codex CSS Button components inside MobileFrontend
Page MenuHomePhabricator

Use Codex CSS Button components inside MobileFrontend
Closed, ResolvedPublic3 Estimated Story Points

Description

NOTE: When signing off please read sign off steps!

Vector is now using Codex components. To get the full benefit of transitioning over, we also need to do this for MobileFrontend starting with the CSS only button components

Checklist

  • Update MobileFrontend PHP code to use Codex button markup
  • Update MobileFrontend JavaScript code to use Codex button markup

QA

  • Check article page as anonymous user:
    • In Chrome browser, check download link in dropdown
    • Check page issues at top of page https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
    • In mobile device click edit icon to show editor overlay. Check close icon in top left displays correctly without a label.
    • Click watchstar to open up drawer at bottom of page. MAke sure the arrow is centered.
  • Make sure advanced mode is disabled on the mobile site
  • Go to a mobile diff page and check the icons for bytes added and for the username and the thanks icon in the bottom right. They should match or look similar to production as in the screenshots below:

https://en.m.wikipedia.org/wiki/Special:MobileDiff/1165399895

Screenshot 2023-07-18 at 2.39.16 PM.png (500×1 px, 61 KB)

Screenshot 2023-07-18 at 2.40.18 PM.png (417×1 px, 48 KB)

  • Exploratory testing: In mobile site perform the following functions. Look for any icons/buttons that look "strange".
    • Search
    • Edit
    • Click an image to view it in a lightbox
    • Click read in another language

Sign off steps

QA Results - Beta

QA Results - Prod

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
LGoto set the point value for this task to 3.Jun 29 2023, 5:35 PM

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

[mediawiki/extensions/MobileFrontend@master] MobileUI: Use Codex markup for icons in diff page

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

Change 934597 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] MobileUI: Use Codex markup for icons in diff page

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

Change 940378 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/MobileFrontend@master] Use codex button classes in Icon.js

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

Change 942021 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/Echo@master] Update Echo to use MobileFrontend IconButton.js

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

Change 940378 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Update Icon.js to be IconButton.js and use codex button classes

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

Change 942021 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Update Echo to use MobileFrontend IconButton.js

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

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

[mediawiki/extensions/MobileFrontend@master] Fixes: CTA drawer down arrow alignent

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

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

[mediawiki/skins/MinervaNeue@master] Restore space between download icon and text

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

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

[mediawiki/extensions/Popups@master] Scope rule to Popups

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

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

[mediawiki/skins/MinervaNeue@master] Fixes page issue icon

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

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

[mediawiki/extensions/MobileFrontend@master] IconButton: should use mf-icon-element class

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

I found a few issues with this code before it goes into production.

  • Labels showing on mobile devices

I noticed on a mobile device the labels are showing on https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain#/editor/all
It wasn't obvious in testing because of this code: https://gerrit.wikimedia.org/r/942041
While working on Minerva and fixing an issue with Popups (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/942041) the issue became apparent.

FIX: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/942450

  • Page issues icon not showing

Minerva uses the Icon element which now requires an "icon" field rather than a "name" field. I checked code search and couldn't find any other usages.

FIX: https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/942054

  • CTA drawer arrow not aligned.

FIX: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/942036

  • Download icon and text misaligned

This was broken by the changes to icon.spinner

FIX: https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/942052

  • Thanks button is not displaying icon or text

Compare https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:MobileDiff/397846 with https://en.m.wikipedia.org/wiki/Special:MobileDiff/1106461150

  • Growth overlay icon hidden

Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Homepage#/homepage/suggested-edits and notice the close icon is gone https://gerrit.wikimedia.org/g/mediawiki/extensions/GrowthExperiments/+/c8f8d766e575cdd227c94f61e9af6365725786e4/modules/ext.growthExperiments.Homepage.mobile/MobileOverlay.js#91

Screenshot 2023-07-27 at 9.13.49 AM.png (938×774 px, 373 KB)

  • Reference drawer label is showing

Screenshot 2023-07-28 at 4.40.01 PM.png (339×686 px, 84 KB)

Jdlrobson updated the task description. (Show Details)

Change 942041 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Scope rule to Popups

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

Change 942036 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Fixes: CTA drawer down arrow alignment

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

Change 942052 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Ensure space between download icon and text

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

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

[mediawiki/skins/MinervaNeue@master] Handle icon only labels with Codex in Minerva

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

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

[mediawiki/extensions/GrowthExperiments@master] Use IconButton instead of Icon

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

Change 942450 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] IconButton: should use mf-icon-element class

Reason:

chatted to Bernard and decided to go with https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/942509

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

Change 942509 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Handle icon only labels with Codex in Minerva

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

Change 942697 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/Thanks@master] Update Thanks extension to use IconButton.js from MobileFrontend

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

Change 942514 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Use IconButton instead of Icon

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

Change 942536 had a related patch set uploaded (by Jdlrobson; author: 沈澄しん):

[mediawiki/extensions/MobileFrontend@master] Update storybook to reflect change in Minerva

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

Change 942697 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] Update Thanks extension to use IconButton.js from MobileFrontend

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

Change 942536 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Update storybook to reflect change in Minerva

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

Change 942054 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fixes page issue icon

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

Change 942711 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/MobileFrontend@master] Update Button.js to be a wrapper of IconButton.js, remove mediawiki.ui.button as a dependency

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

bwang renamed this task from Use Codex CSS components inside MobileFrontend to Use Codex CSS Button components inside MobileFrontend.Jul 28 2023, 9:25 PM
bwang updated the task description. (Show Details)

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

[mediawiki/skins/MinervaNeue@master] Fixes: Close label showing in reference drawer

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

Change 942711 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Migrate mw-ui-button to cdx-button

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

Jdlrobson added a subscriber: Edtadros.

@bwang thanks for all your work and patience with this initiative! There is one remaining blocker for next weeks' train ("close" label shows on reference drawer close icon https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/942715) but I want to get a head start on QA so moving this to Edward.

@Edtadros I've updated T340262#9048822 to reflect bugs we've found so far. These should be captured in the QA steps but also give you an idea of the sort of things to look at. As part of this work we've also updated Pixel to cover more of the mobile site: https://pixel.wmcloud.org/reports/mobile/index.html

We've deemed minor position changes/icon changes to be improvements. At time of writing I'm seeing 21 failures, but all seem good to me.

Change 942715 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fixes: Close label showing in reference drawer

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

Test Result - Beta

@Jdlrobson, While I am putting this in Ready for signoff, there are two issues, AC5 and AC8. They look to me like they aren't in the scope of this task or may be unrelated to any patch for this task. You are the better person to determine this.

Status: ✅ PASS
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Check article page as anonymous user:

  • ✅ AC1: In Chrome browser, check download link in dropdown
    Screen Recording 2023-07-31 at 3.13.50 PM.mov.gif (966×714 px, 519 KB)
  • ✅ AC2: Check page issues at top of page https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
    Screen Recording 2023-07-31 at 3.14.54 PM.mov.gif (966×714 px, 287 KB)
  • ✅ AC3: In mobile device click edit icon to show editor overlay. Check close icon in top left displays correctly without a label.
    Screen Recording 2023-07-31 at 3.15.27 PM.mov.gif (966×714 px, 668 KB)
  • ✅ AC4: Click watchstar to open up drawer at bottom of page. MAke sure the arrow is centered.
    Screen Recording 2023-07-31 at 3.16.12 PM.mov.gif (966×714 px, 345 KB)

Make sure advanced mode is disabled on the mobile site

  • ❓ AC5: Go to a mobile diff page and check the icons for bytes added and for the username and the thanks icon in the bottom right. They should match or look similar to production as in the screenshots below: https://en.m.wikipedia.org/wiki/Special:MobileDiff/1165399895
    Screenshot 2023-07-18 at 2.39.16 PM.png (500×1 px, 61 KB)
    @Jdlrobson, the elements mentioned in the AC match to production. I verified the Thank button by comparing it to production instead of the image above since it was missing. The only thing that stood out is outside of the scope of the AC. There is no space below the "EDITS" text and the bottom of the page.
    Screen Recording 2023-07-31 at 4.30.29 PM.mov.gif (1×714 px, 2 MB)
  • ✅ AC6: Check watchlist https://en.m.wikipedia.org/wiki/Special:Watchlist
    Screenshot 2023-07-18 at 2.40.18 PM.png (417×1 px, 48 KB)
    Screenshot 2023-07-31 at 4.39.41 PM.png (802×855 px, 82 KB)
  • ✅ AC7: Check history page
    Screenshot 2023-07-18 at 2.41.25 PM.png (492×1 px, 73 KB)
    Screenshot 2023-07-31 at 4.42.12 PM.png (423×712 px, 54 KB)
  • ❓ AC8: Check Growth page. Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Homepage and click arrows next to "My impact". "Suggested Edits" and verify the overlay icon shows.
    Screen Recording 2023-07-31 at 4.43.47 PM.mov.gif (1×712 px, 351 KB)
    Screen Recording 2023-07-31 at 4.44.38 PM.mov.gif (1×712 px, 298 KB)
    I'm uncertain what the 'overlay icon' is, but there was an issue. The first screen capture shows the drawer that pops up to let me know the format has changed. When I close it, it closes the overlay. I am able to open the overlay after that since the drawer no longer shows.

Exploratory testing: In mobile site perform the following functions. Look for any icons/buttons that look "strange".

  • ✅ AC9: Search
    Screen Recording 2023-07-31 at 4.50.01 PM.mov.gif (1×712 px, 951 KB)
    when I clicked 'search within pages' it also looked good
  • ✅ AC10: Edit
    Screen Recording 2023-07-31 at 4.57.25 PM.mov.gif (1×712 px, 1 MB)
  • ✅ AC11: Click an image to view it in a lightbox
    Screen Recording 2023-07-31 at 4.58.38 PM.mov.gif (1×712 px, 488 KB)
  • ✅ AC12: Click read in another language
    Screen Recording 2023-07-31 at 5.01.05 PM.mov.gif (1×712 px, 391 KB)

AC5 and AC8 don't seem related to this change, but we should create new tickets if they are problems. I asked a follow up question on Slack about AC5 and reached out to the Growth team about AC8.

We just need to QA in this production (suggest Wednesday on ca.wikipedia.org)

Test Result - Prod

Status: Mixed
Environment: cawiki
OS: macOS Ventura
Browser: Chrome
Device: MBP, iPhone 14
Emulated Device:NA

Test Artifact(s):

QA Steps

Check article page as anonymous user:

  • ✅ AC1: In Chrome browser, check download link in dropdown
    Screen Recording 2023-08-02 at 5.02.05 PM.mov.gif (1×988 px, 954 KB)
  • ✅ AC2: Check page issues at top of page https://ca.m.wikipedia.org/wiki/Marina_Bernad%C3%B3_i_Bonada
    Screen Recording 2023-08-02 at 5.14.21 PM.mov.gif (1×988 px, 584 KB)
  • ✅ AC3: In mobile device click edit icon to show editor overlay. Check close icon in top left displays correctly without a label.
    Screen Recording 2023-08-02 at 5.16.01 PM.mov.gif (1×988 px, 1 MB)
  • ✅ AC4: Click watchstar to open up drawer at bottom of page. MAke sure the arrow is centered.
    Screen Recording 2023-08-02 at 5.16.52 PM.mov.gif (1×988 px, 1 MB)

Make sure advanced mode is disabled on the mobile site

  • ❌ AC5: Go to a mobile diff page and check the icons for bytes added and for the username and the thanks icon in the bottom right. They should match or look similar to production as in the screenshots below: https://ca.m.wikipedia.org/wiki/Especial:MobileDiff/31279935, It looks like the bytes added and surrounding text/icon are not aligned. See the red line below.//
    Screenshot 2023-08-02 at 5.23.17 PM.png (1×988 px, 103 KB)
  • ❓ AC6: Check watchlist https://ca.m.wikipedia.org/wiki/Special:Watchlist Special:Watchlist doesn't seem to work, might not have anything in it since I just started watching the pages.
    Screen Recording 2023-08-02 at 5.41.01 PM.mov.gif (1×988 px, 652 KB)
  • ✅ AC7: Check history page
    Screenshot 2023-08-02 at 5.52.32 PM.png (1×988 px, 159 KB)
  • ✅ AC8: Check Growth page. Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Homepage and click arrows next to "My impact". "Suggested Edits" and verify the overlay icon shows.
    Screen Recording 2023-08-02 at 5.54.18 PM.mov.gif (1×988 px, 638 KB)
    I'm uncertain what the 'overlay icon' is, But the overlay shows as expected. I clicked around in the overlays and everything looks good.

Exploratory testing: In mobile site perform the following functions. Look for any icons/buttons that look "strange".

  • ✅ AC9: Search
    RPReplay_Final1691024394.mov.gif (1×592 px, 3 MB)
    when I clicked 'search within pages' it also looked good
  • ✅ AC10: Edit
    RPReplay_Final1691024595.mov.gif (1×592 px, 2 MB)
  • ✅ AC11: Click an image to view it in a lightbox
    RPReplay_Final1691024712.mov.gif (1×592 px, 1 MB)
  • ✅ AC12: Click read in another language
    RPReplay_Final1691024933.mov.gif (1×592 px, 2 MB)

❓ AC6: Check watchlist https://ca.m.wikipedia.org/wiki/Special:Watchlist Special:Watchlist doesn't seem to work, might not have anything in it since I just started watching the pages.

Mmm I can't seem to replicate this. If you can replicate this again please create a new ticket as this doesn't seem related to this change.

❌ AC5: Go to a mobile diff page and check the icons for bytes added and for the username and the thanks icon in the bottom right. They should match or look similar to production as in the screenshots below: https://ca.m.wikipedia.org/wiki/Especial:MobileDiff/31279935, It looks like the bytes added and surrounding text/icon are not aligned. See the red line below.//

This looks like an existing problem - it's identical to English Wikipedia so I'm gonna call this a pass. Given this page is being removed I've folded this into T117279 for consideration at a later date.

Screenshot 2023-08-02 at 6.32.29 PM.png (1×2 px, 341 KB)