Page MenuHomePhabricator

[Spike] understand why there are two different "Uploads" menu items
Closed, ResolvedPublic

Description

Description

Wikipedia and Commons both have an "Uploads" menu item within the personal tools / user menu area. On Wikipedia it's called Uploaded media and on Commons it's called Uploads. They both link to the same place, though with slightly different URL parameters. The goal of this task is to investigate why we have two different implementations of this menu item, and whether or not we should consolidate to one version that is used in both places.

Notes

Recent related bug: T288541

Event Timeline

On Commons, the link is provided by the UploadsLink extension. The link you see on enwiki is from the ContentTranslation extension, which is a beta feature on the English Wikipedia and is off by default.

UploadsLink is currently only enabled on Commons, and ContentTranslation is enabled only on Wikipedias (and testwiki). CX is available as a beta feature on many wikis, but it is on by default on many others. Currently, there is no wiki with both extensions enabled.

fwiw I find the ContentTranslation menu being attached to Contributions in Vector to be fairly annoying (New Vector "improves" this by making me always have to open the dropdown, instead of being surprised by it).
I'm not sure why the Uploaded Media link was added there (or the New page and Upload Media buttons on Special:Contribs), as they seem out of scope for content translation.

ovasileva triaged this task as Medium priority.Aug 12 2021, 7:05 PM

This appears to be a language team decision given the codebase involved per @AntiCompositeNumber .

I think that this is also related:

irudia.png (705×316 px, 29 KB)

I think that this is also related:

irudia.png (705×316 px, 29 KB)

Not really, feel free to file a separate task against ContentTranslation for that though.

Jdlrobson renamed this task from [Spike] investigate the two different "Uploads" menu items to [Spike] understand why there are two different "Uploads" menu items.Aug 13 2021, 3:07 PM

Just to add a bit of context. When Content Translation was launched we wanted to expose the tool in a way that could scale with other forms of contribution. So instead of adding one more link to the menu we explored the option to use the Contributions page (and a menu when hovering it's link) as a place where people could start different ways to contribute (being translation one of them). Since this was moving to the edges of the scope for the Language team, we just added two other basic forms of contribution that we could link to existing places such as requested articles to create new pages and Commons to upload media.
Recent work has been proposed to make a cleaner version of this idea on mobile (T286466).

We are totally ok in aligning any text and iconography to make sure that entry points in different places are consistent.

Would it not be better at this point to add that menu item via configuration rather than JavaScript? e.g. the way https://www.mediawiki.org/wiki/Extension:SandboxLink does it

Olga, language team are untagged. To we plan to do anything with this or can we resolve it, creating new spin off tasks, now we have our answer?

Would it not be better at this point to add that menu item via configuration rather than JavaScript? e.g. the way https://www.mediawiki.org/wiki/Extension:SandboxLink does it

The upload, contributions, translations is a menu in Vector legacy and other skins like this:

image.png (202×317 px, 13 KB)

That is why it is done in javascript. If we agree(cc @Pginer-WMF) on removing this menu and even stop supporting it in other skins, we can happily remove code and hacks and just fit that to the PersonalUrls hook.

The upload, contributions, translations is a menu in Vector legacy and other skins like this:

image.png (202×317 px, 13 KB)

That is why it is done in javascript. If we agree(cc @Pginer-WMF) on removing this menu and even stop supporting it in other skins, we can happily remove code and hacks and just fit that to the PersonalUrls hook.

For the new vector it makes sense for our extension to register the translation action (no need to add the rest) in a more standard way.
Removing the current approach when the new vector is the standard skin seems good. However, this menu is frequently used (we need to get updated numbers but I recall the menu being a common way to access the tool) and it may be too early to remove it while the legacy-vector is still the default on many wikis that heavily use Content translation such as Spanish or English (as source language to start translations).

Olga, language team are untagged. To we plan to do anything with this or can we resolve it, creating new spin off tasks, now we have our answer?

A note on process: As part of our triage process we review the tickets in the Language-Team to make sure they are on a more specific project (ContentTranslation in this case). Since Content Translation is a projects supported by the Language team, we are happy to continue the conversation and discuss any changes that make sense to make in the code we maintain.

Nikerabbit subscribed.

Do let us know if there is something we can do here.

@alexhollender pointed out today that this has regressed in modern Vector:

Screen Shot 2021-10-14 at 2.43.08 PM.png (322×332 px, 22 KB)

Help merging this patch would deal with this on the short term and reduce future breakage:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/730920

On long term we should aim to do this on the server.

Currently the last two buttons in the menu have different color and line-height.

ovasileva raised the priority of this task from Medium to High.Oct 15 2021, 3:31 PM

Currently the last two buttons in the menu have different color and line-height.

Yes. This is what @alexhollender pointed out.

@alexhollender pointed out today that this has regressed in modern Vector:

Screen Shot 2021-10-14 at 2.43.08 PM.png (322×332 px, 22 KB)

Help merging this patch would deal with this on the short term and reduce future breakage:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/730920

On long term we should aim to do this on the server.

This is now tracked in T293507: [Regression] User menu displaying blue translations and uploaded media links

ovasileva lowered the priority of this task from High to Medium.Nov 16 2021, 6:36 PM

What is left on this ticket y'all? This seems done to me. Not sure what action items we want to take though.

> The goal of this task is to investigate why we have two different implementations of this menu item,

Anwer: Commons has an upload link as uploading is a primary action on Commons. The upload link was never shown on other wikis, since uploading was something you did elsewhere. The uploads link is provided by the UploadLinks extension (see T288760#7279850)

However, when Content Translation was launched we wanted to expose the tool in a way that could scale with other forms of contribution. So instead of adding one more link to the menu we explored the option to use the Contributions page (and a menu when hovering it's link) as a place where people could start different ways to contribute (being translation one of them). Since this was moving to the edges of the scope for the Language team, we just added two other basic forms of contribution that we could link to existing places such as requested articles to create new pages and Commons to upload media. (T288760#7344250)

> and whether or not we should consolidate to one version that is used in both places.

Pau suggests: Removing the current approach when the new vector is the standard skin seems good.
I'd agree. As far as we're concerned the code is not hurting us in current form. It's product tech in UniversalLanguageSelector that can presumably be cleaned up when new Vector is the new default skin.

Resolving this for now, taking a note to discuss next steps with @alexhollender in a separate meeting.