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
AC | Status | Details |
---|---|---|
1 | ✅ | T344006#9124465 |
2 | ✅ | T344006#9124465 |
3 | ✅ | T344006#9124465 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T344006#9153570 |
2 | ✅ | T344006#9153570 |
3 | ✅ | T344006#9153570 |