Page MenuHomePhabricator

Minerva Codex migration: Add support for gadget developers with new Codex markup
Closed, ResolvedPublic2 Estimated Story Points

Description

NOTE: This work may result in icons disappearing in various gadgets. If you get any complaints after deploying this code please point them to T344067

Follow up work from T342908

Gadget developers can use mw.util.addPortletLink to add menu items. The switch to Codex will break this without changes

TODO

  • makes the addPortletLink handler compatible with and without Codex.
  • It should work with the following code:
mw.util.addPortletLink('p-interaction', '#', 'text', 'foo2' )
mw.util.addPortletLink('page-actions', '#', 'text', 'foo3' ) 
mw.util.addPortletLink('p-personal', '#', 'text', 'foo' )

QA

Using the Minerva skin, verify the mw.util.addPortletLink() method is working as before.

  • Run mw.util.addPortletLink('p-interaction', '#', 'text', 'foo2' ) in the console and confirm it adds to the main menu (hamburger)
  • Run mw.util.addPortletLink('page-actions', '#', 'text', 'foo3' ) in the console and confirm it adds a page action without an icon.
  • Run mw.util.addPortletLink('p-personal', '#', 'text', 'foo' ) in the console and confirm it adds to the user dropdown menu (make sure AMC is enabled)

QA Results - Beta

ACStatusDetails
1T344006#9124465
2T344006#9124465
3T344006#9124465

QA Results - Prod

ACStatusDetails
1T344006#9153570
2T344006#9153570
3T344006#9153570

Event Timeline

Jdlrobson renamed this task from Add support for gadget developers with new Codex markup to Minerva Codex migration: Add support for gadget developers with new Codex markup.Aug 10 2023, 4:59 PM
Jdlrobson triaged this task as High priority.

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

[mediawiki/skins/MinervaNeue@master] Prepare addPortletLink handler for Codex switchover

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

Jdrewniak reassigned this task from Jdrewniak to bwang.
Jdrewniak added a subscriber: bwang.
Jdrewniak subscribed.
bwang removed bwang as the assignee of this task.Aug 18 2023, 10:02 PM
Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

QA Steps

Using the Minerva skin, verify the mw.util.addPortletLink() method is working as before.

✅ AC1: Run mw.util.addPortletLink('p-interaction', '#', 'text', 'foo2' ) in the console and confirm it adds to the main menu (hamburger)

Screenshot 2023-08-28 at 9.58.09 AM.png (945×1 px, 302 KB)

✅ AC2: Run mw.util.addPortletLink('page-actions', '#', 'text', 'foo3' ) in the console and confirm it adds a page action without an icon.
Screenshot 2023-08-28 at 9.58.42 AM.png (945×1 px, 364 KB)

✅ AC3: Run mw.util.addPortletLink('p-personal', '#', 'text', 'foo' ) in the console and confirm it adds to the user dropdown menu (make sure AMC is enabled)
Screenshot 2023-08-28 at 9.59.40 AM.png (934×1 px, 344 KB)

Change 947474 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Update addPortletLink for Codex

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

Edtadros removed Edtadros as the assignee of this task.

Test Result - Prod

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

Test Artifact(s):

QA Steps

Using the Minerva skin, verify the mw.util.addPortletLink() method is working as before.

✅ AC1: Run mw.util.addPortletLink('p-interaction', '#', 'text', 'foo2' ) in the console and confirm it adds to the main menu (hamburger)

screenshot 14.png (899×739 px, 193 KB)

✅ AC2: Run mw.util.addPortletLink('page-actions', '#', 'text', 'foo3' ) in the console and confirm it adds a page action without an icon.
screenshot 15.png (899×739 px, 259 KB)

✅ AC3: Run mw.util.addPortletLink('p-personal', '#', 'text', 'foo' ) in the console and confirm it adds to the user dropdown menu (make sure AMC is enabled)
screenshot 16.png (899×739 px, 265 KB)