While reading this task: T174995 and it's discussion beneath, I realized something also in mobile view. The main page doesn't have a discussion button or link to talk page in mobile view but other page have. See below;
- Link to Main page on mw.org (Desktop view): https://www.mediawiki.org/w/index.php?title=MediaWiki&mobileaction=toggle_view_desktop (discussion page present)
- Link to Main page on mw.org (Mobile view): https://m.mediawiki.org/w/index.php?title=MediaWiki&mobileaction=toggle_view_mobile (no link to discussion page)
- Link to a random page on mw.org (Desktop view): https://www.mediawiki.org/wiki/Sites_using_MediaWiki (link to discussion page available)
- Link to a (same random page) on mw.org (Mobile view): https://m.mediawiki.org/wiki/Sites_using_MediaWiki (link to discussion/talk page at the bottom using "Discussion" button)
So this only happens for a wiki's main page? Is this intentional?
Looking through the code history I think this is an oversight.
It was added in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/213263/1/includes/skins/SkinMinerva.php to disable watch link on main page and then swept into the generic logic in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/301104/1/includes/skins/SkinMinerva.php
The problem is "page actions" covers all the links at the top of the page and the button
isAllowedPageAction should be extended to allow "talk" buttons on the main page, but isAllowedPageAction needs to still return false on main page for edit, watch.
Feel free to have a go - make sure to add new tests and not to break the existing ones!
Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page while logged in
Scroll to the bottom of the page
Ensure that there is a "Discussion" button