Page MenuHomePhabricator

Avoid showing on mobile the options to start a contribution added by Content Translation
Closed, ResolvedPublic


The web team will soon remove the mobile version of Special:Contributions, replacing it with the core version. This has implications on ContentTranslation which adds some options to start new contributions in the Special:Contributions page:

Screen Shot 2022-01-05 at 9.28.09 AM.png (384×2 px, 55 KB)

If nothing gets done, these options will be shown on mobile, which we want to avoid. Otherwise mobile users would be directed to the desktop version of content Translation on mobile.

As part of this ticket we want to make sure that the options to contribute are (a) still visible on desktop and (b) not visible on mobile (when mobile uses the core version).

Some technical details from the related ticket:

Regarding the most immediate question: we don't want the current desktop options to be shown on mobile.

Good to know. Depending on whether you want this on desktop Minerva you'll need to add a skinStyle to hide this OR alternatively, call the following in whatever code outputs the HTML to limit it to the mobile domain

ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) && MobileContext::singleton()->usingMobileDomain();

e.g. (is using skin minerva on desktop domain) (is using skin vector on mobile domain) (is using skin minerva on mobile domain)

More context in T298644: How should ContentTranslation work on mobile contributions page

As part of future tasks, a proper option to start contributions on mobile (T286466) will be provided and will be adapted to desktop in order to replace the current one. This ticket is a prerequisite for this line of work.

Event Timeline

Change 753691 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] Show Special:Contributions page entrypoints only on desktop

Change 753691 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Show Special:Contributions page entrypoints only on desktop

On Test wiki the Contributions page seems updated and the entry point is not showing, as expected:

test.m.wikipedia.org_wiki_Special_Contributions_Pginer-WMF(iPhone SE).png (1×750 px, 174 KB)