Page MenuHomePhabricator

[Spike] [2 hrs] investigate using Universal language selector (ULS) on mobile web
Closed, ResolvedPublic

Description

The Compact language switcher currently in beta on desktop uses the Universal language selector to suggest and then allow users to browse languages in which an article is available. They are currently looking at rolling out Compact language switcher on stable and it calls into question whether or not we should be using the same tool on mobile web.

From a user perspective, there is not much advantage to switching the mobile web to it, but there might be gains from an engineering perspective that are worth investigating. Some elements to consider:

  • I don't know if it works on mobile out of the box
  • it currently doesn't support using the keyboard setting
  • it currently suggests 9 languages, when possible (on mobile web, we definitely want fewer)
  • it doesn't include translated article title

What are the user benefits?

  • the best part feature search (and I believe that this is done via a separate api call) (mentioned here: T137680)
  • ordering by geo might make sense when the language list is long > 50

Event Timeline

dr0ptp4kt renamed this task from Spike: investigate using Universal language selector (ULS) on mobile web to [Spike] [2 hrs] investigate using Universal language selector (ULS) on mobile web.Jun 20 2016, 4:23 PM

Here is my take on the spike. I'm happy to address more points if need be.

I don't know if it works on mobile out of the box

It doesn't. The extension seems to be tightly coupled with vector like skins. For example, the placement of the ULS cog can either be at the top of the page next to the user link, or in the left sidebar with interwiki links.

The rendered modal also is not responsive here is a screenshot:

Screen Shot 2016-06-23 at 2.08.30 AM.png (1×1 px, 367 KB)

A quick glance over the codebase also suggests that the extension is built with desktop in mind and uses events such as "mouseenter", etc.

it currently doesn't support using the keyboard setting

I'm not sure what this means. I can investigate more if anyone can shed some light on this point.

it currently suggests 9 languages, when possible (on mobile web, we definitely want fewer)

Yes, this value is hard-coded, but with some adjustments we can make the value derive from a config variable.

it doesn't include translated article title

You're right. Just links to languages are displayed.

the best part feature search (and I believe that this is done via a separate api call) (mentioned here: T137680)

Yes, this is one of the strongest points of ULS. Being able to search for "french" on any wiki and seeing "Français" is a big plus.

Under the hood, https://en.wikipedia.org/w/api.php?action=help&modules=languagesearch is being used, which we also can use on mobile.

ordering by geo might make sense when the language list is long > 50

It's debatable. Even the fact of using geo ordering is debatable. There are some concerns from the community such as:

The use of Geo-IP may be interpreted as trying to enforce certain languages in certain geographic areas, which would be contrary to the mission of the Wikimedia Foundation.

I don't know if it works on mobile out of the box

It doesn't. The extension seems to be tightly coupled with vector like skins. For example, the placement of the ULS cog can either be at the top of the page next to the user link, or in the left sidebar with interwiki links.

jquery.uls (the stand-alone library) has experimental mobile mode. The entry points in ULS are made for desktop skins yes, but it's easy to add more.

A quick glance over the codebase also suggests that the extension is built with desktop in mind and uses events such as "mouseenter", etc.

You seem to imply that essential functionality is not working on mobile. I don't think is the case, though I have not checked myself everything. Of course the interface itself does not adapt. It needs to be made mobile friendly in some way.

it currently doesn't support using the keyboard setting

I'm not sure what this means. I can investigate more if anyone can shed some light on this point.

This seems to be confusion of different parts of ULS extension. The compact language links does not have display&language settings. That's what the other entry points are for on the desktop skins.

it currently suggests 9 languages, when possible (on mobile web, we definitely want fewer)

Yes, this value is hard-coded, but with some adjustments we can make the value derive from a config variable.

It is hard coded for compact language links. jquery.uls is flexible.

it doesn't include translated article title

You're right. Just links to languages are displayed.

It is possible to customize the items with a decoractor function. That's what we are doing to show the featured article badges.

the best part feature search (and I believe that this is done via a separate api call) (mentioned here: T137680)

Yes, this is one of the strongest points of ULS. Being able to search for "french" on any wiki and seeing "Français" is a big plus.

The language selector uses a combination of client side search (input length 1-2) and server side (length >3).

ordering by geo might make sense when the language list is long > 50

It's debatable. Even the fact of using geo ordering is debatable. There are some concerns from the community such as:

The use of Geo-IP may be interpreted as trying to enforce certain languages in certain geographic areas, which would be contrary to the mission of the Wikimedia Foundation.

ULS provides a function to get list of likely languages. This information is based on multiple sources: browser settings, previously selected languages, geo-ip and other fallbacks.

Thanks for all the useful discussion!

My takeaway is there is a lot of work to do to apply this extension to mobile but it's not impossible. Similar to MultimediaViewer it may be cheaper for the time being to continue 2 parallel implementations.

I recommend we focus energies on pushing ULS to desktop, assess benefits there, comparing with the existing mobile experience (e.g. compare the same metric in both places and see where the advantages are) and then adapt the mobile experience/merge the experiences if necessary.

My main concern is how the Minerva skin is radically different from the desktop skins like Vector and there are much higher level problems such as skin architecture/inserting items into menus unrelated to ULS that will need resolving before that can change.

dr0ptp4kt claimed this task.
dr0ptp4kt subscribed.

We will not pursue integration into the extension.

Marking this as Resolved.