Page MenuHomePhabricator

[follow up] Languages overlay does not need to use API.
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

NOTE: This is follow up work to T331905. Benefits: Clicking languages on mobile will feel more responsive as no API call will be required, less JS loaded on page load.

Background

Currently clicking the language button triggers an API request to look up languages.
With T331905 and once cache has cleared, the languages will always be accessible within the page.

Doing this will reduce MobileFrontend's JavaScript footprint and make the language button feel more responsive.

TODO

  • Drop language overlay API lookup - instead use DOM manipulation to access languages

QA Results - Beta

ACStatusDetails
1T331908#8962050

QA Results - Prod

ACStatusDetails
1T331908#8974941

Event Timeline

Change 898039 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Language overlay uses page HTML

https://gerrit.wikimedia.org/r/898039

Jdlrobson triaged this task as Medium priority.Mar 15 2023, 5:41 PM
Jdlrobson renamed this task from Languages overlay does not need to use API. to [follow up] Languages overlay does not need to use API..Mar 29 2023, 6:07 PM
ovasileva set the point value for this task to 3.Mar 30 2023, 5:56 PM
Jdlrobson raised the priority of this task from Medium to High.Jun 8 2023, 8:00 PM

Bumping to high as this has been bumped several sprints now, we have a patch and this significantly improves user responsiveness/performance of the mobile site for users changing languages.

NOTE: to test this you'll need languages set up locally. MobileContentProvider will not work here.

I have the Interwiki extension enabled locally with following permission:

wfLoadExtension('Interwiki');
$wgGroupPermissions['sysop']['interwiki'] = true;

and following table on http://localhost:8888/wiki/Special:Interwiki:

Screenshot 2023-06-20 at 10.38.52 AM.png (250×1 px, 42 KB)

I have a local wiki page with the following text:

[[es:Espagne]]

The languages on the mobile site should work with JS disabled and JS enabled.

Change 898039 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Language overlay uses page HTML

https://gerrit.wikimedia.org/r/898039

@Jdlrobson is the verification for this task that in mobile the language selector should work with/without JS enabled?

With JS disabled the button should point to a section at the bottom of the page.

Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: With JS disabled the button should point to a section at the bottom of the page.

Screen Recording 2023-06-24 at 4.33.15 PM.mov.gif (958×1 px, 180 KB)

Edtadros removed Edtadros as the assignee of this task.

Test Result - Prod

Status: ✅ PASS
Environment: cawiki
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: With JS disabled the button should point to a section at the bottom of the page.

Screen Recording 2023-06-28 at 4.29.00 PM.mov.gif (950×1 px, 1003 KB)