Steps to replicate the issue (include links if applicable):
- Go to an arbitrary mobile Wiktionary page, like https://en.m.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion?safemode=1 while logged in.
- Run the console command: mw.util.addPortletLink("p-associated-pages", "https://www.mediawiki.org/", "Test");
What happens?:
The link is added to the portlet bar but is completely unstyled.
What should have happened instead?:
The new portlet link should look like the others.
The issue gets fixed when I manually add the class minerva__tab-text to the new link.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Derived Requirement
Ensure that new portlet links added via mw.util.addPortletLink on mobile Wiktionary pages are styled consistently with existing links by automatically applying the appropriate classes, such as minerva__tab-text.
BDD
Feature: Portlet Link Styling on Mobile Wiktionary Pages
Scenario: Ensure new portlet links are styled like existing links
Given the user is logged in on a mobile Wiktionary page When the user runs the command `mw.util.addPortletLink("p-associated-pages", "https://www.mediawiki.org/", "Test")` Then the newly added portlet link should be styled like the other portlet links, including the class `minerva__tab-text`
Test Steps
Test Case 1: Ensure New Portlet Link is Styled Correctly on Mobile Wiktionary Pages
- Log in to the mobile version of Wiktionary and navigate to a page like https://en.m.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion?safemode=1.
- Open the browser console and run the command mw.util.addPortletLink("p-associated-pages", "https://www.mediawiki.org/", "Test").
- AC1: Confirm that the new portlet link is styled consistently with the other links in the portlet bar, including having the class minerva__tab-text.
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T376363#10212759 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T376363#10232115 |