Page MenuHomePhabricator

[S] Gadget regression: Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • The menu entry ''Check'' has a strange look

What should have happened instead?:

  • The menu entry ''Check'' should look like the other menu entries

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Screenshot 20221013 Vector (2022) Menü.jpg (1,040×755 px, 173 KB)

The gadget code is here: https://de.wiktionary.org/wiki/Benutzer:Formatierer/checkpage.js
The relevant code is:

if (document.getElementById("ca-view")) {
  var cp = mw.util.addPortletLink("p-views", null, "Check", "ca-checkpage",
            "checkpage() für diese Seite aufrufen",null,"#ca-view");
  $(cp).click(_public.analyzeThisPage);
} else {

Developer notes

We need to make sure gadget added links get the vector-tab-noicon class.

QA steps

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/Dog
  2. Open chrome developers console and execute the following:
mw.util.addPortletLink("p-views", null, "Check", "ca-checkpage",
              "checkpage() für diese Seite aufrufen",null,"#ca-view");
  1. Ensure a new tab labeled "Check" appears in the right side of the article toolbar and has the same padding/margin as the other tabs

QA Results - Beta

ACStatusDetails
1T320691#8343869

QA Results - Prod

ACStatusDetails
1T320691#8377969

Event Timeline

Aklapper renamed this task from Menu entry added by mw.util.addPortletLink has wrong classes in vector-2022 to Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022.Oct 15 2022, 8:18 AM
Aklapper added a project: Vector 2022.

({F35565589} is not visible for anyone else. Please make sure to attach files to a ticket - thanks!)

Screenshot from 2022-10-15 10-16-55.png (1,920×609 px, 134 KB)

Jdlrobson renamed this task from Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022 to Gadget regression: Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022.Oct 17 2022, 6:42 PM
Jdlrobson added a project: Regression.

Yep, this is a bug and regression our side.

We need to make sure gadget added links get the vector-tab-noicon class.

LGoto set the point value for this task to 1.Oct 18 2022, 5:01 PM
LGoto renamed this task from Gadget regression: Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022 to [S] Gadget regression: Custom menu tab added by mw.util.addPortletLink has wrong classes in vector-2022.Oct 18 2022, 5:33 PM

Change 844521 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Add vector-tab-noicon class to p-view menu items added by gadgets

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

Change 844521 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add vector-tab-noicon class to tabbed menus when menu items are added by gadgets

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

Visit https://en.wikipedia.beta.wmflabs.org/wiki/Dog
Open chrome developers console and execute the following:

mw.util.addPortletLink("p-views", null, "Check", "ca-checkpage", "checkpage() für diese Seite aufrufen",null,"#ca-view");

✅ AC1: Ensure a new tab labeled "Check" appears in the right side of the article toolbar and has the same padding/margin as the other tabs

Screen Shot 2022-10-25 at 3.18.36 PM.png (1,500×676 px, 302 KB)

Screen Shot 2022-10-25 at 3.18.23 PM.png (1,488×623 px, 297 KB)

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

Visit an article page
Open chrome developers console and execute the following:

mw.util.addPortletLink("p-views", null, "Check", "ca-checkpage", "checkpage() für diese Seite aufrufen",null,"#ca-view");

✅ AC1: Ensure a new tab labeled "Check" appears in the right side of the article toolbar and has the same padding/margin as the other tabs

Screenshot 2022-11-07 at 6.07.02 PM.png (1,203×928 px, 374 KB)

Screenshot 2022-11-07 at 6.06.50 PM.png (1,203×928 px, 372 KB)