Page MenuHomePhabricator

How should ContentTranslation work on mobile contributions page
Closed, ResolvedPublic

Description

The web team will soon be undertaking work to remove the mobile version of Special:Contributions, replacing it with the core version. This has implications on ContentTranslation which adds the following heading and bar at the top of the Special:Contributions page:

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

Without any changes, this will soon appear on mobile.
If this is fine, then no work is needed.
If this is not wanted, then we'll need to add logic to hide this when mobile mode is detected.

Please advise.

Event Timeline

We have T286466: Persistent contribution entry point on the mobile navigation menu with new designs for entry points for mobile contributions page. If we are unifying the mobile and desktop Special:Contributions page, it would be nice to approach with the new design of entrypoints.
cc @Pginer-WMF for detailed inputs.

I think we will be looking at providing architecture more formally for special page navigation as part of desktop improvements. A related change that we will be thinking about as part of desktop improvements is T297536

Note that we plan to retain the existing look and feel of Special:Contributions on mobile via some HTML and CSS.

Regarding the most immediate question: we don't want the current desktop options to be shown on mobile.
Content translation is not usable on mobile, and Section Translation is not available yet in all languages.
Since these options are added by the Content Translation extension, does this mean that we should add a check for showing those options only on desktop? or should that be fixed at a different level?

As a long-term solution, we may want to support an extensible list of contribution options (as proposed in T286466 for mobile) on both mobile and desktop. This requires to explore how the designs should adapt to the extra space available on desktop. This solution should replace the current button group on desktop.

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.
https://en.wikipedia.org/wiki/Special:Contributions?useskin=minerva (is using skin minerva on desktop domain)
https://en.m.wikipedia.org/wiki/Special:Contributions?useskin=vector (is using skin vector on mobile domain)
https://en.m.wikipedia.org/wiki/Special:Contributions (is using skin minerva on mobile domain)

I create this task for making sure the options are hidden on mobile: T299056: Avoid showing on mobile the options to start a contribution added by Content Translation

Thanks for surfacing this and sharing the technical details, @Jdlrobson

Nikerabbit subscribed.

@Jdlrobson Anything else to discuss here or can this be closed?

Jdlrobson claimed this task.

LGTM! Thanks for the quick turn around here.