Page MenuHomePhabricator

Remove AMC Outreach code from Mobile
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

In November 2023, we broke the AMC drawer (T351362) that prompted people to try the advanced mobile mode when clicking the desktop site link in footer or the history link.
Since then we have been maintaining a large amount of code (1000+ lines) that impacts user performance for no good reason. Note this code is enabled on Minerva so we'll need to disable that code first or consider this code in our removal.

Currently if you set:

$wgMFAmcOutreachMinEditCount = 0;
$wgMFAmcOutreach = true;

then the drawer shows but clicking it has no effect.

This was disabled in production.

User story

  • As a developer I don't want to maintain unused code
  • As a user I don't want to download unnecessary code.

Requirements

  • Remove`tests/node-qunit/mobile.startup/amcOutreach/amcOutreachDrawer.test.js` and tests/node-qunit/mobile.startup/amcOutreach/AmcEnableForm.test.js
  • src/mobile.startup/promoCampaign/promoCampaign.js has been removed
  • All messages prefixed with mobile-frontend-amc-outreach- have been removed from i18n folder and extension.json
  • src/mobile.startup/amcOutreach folder has been removed
  • Configuration flags $wgMFAmcOutreach and $wgMFAmcOutreachMinEditCount have been dropped and the README has been updated.
  • The includes/Amc/Outreach.php file has been removed.
  • The service MobileFrontend.AMC.Outreach is removed.
  • The style resources/mobile.startup/amcOutreach/amcOutreachDrawer.less has been removed.
  • When visiting Special:MobileOptions I should see a control for opting into advanced mode.
  • Code has been recompiled using npm run build and runs without any JS errors when viewing an article page and the page renders without any CSS error.

Screenshot 2025-08-20 at 5.04.37 PM.png (1,003×114 px, 16 KB)

Requirement

All Advanced Mobile Contributions (AMC) Outreach code and configuration must be removed from MobileFrontend so that the outreach overlay no longer appears. Advanced Mobile mode must remain functional, and the change must be validated through Pixel UI regression tests to ensure no unintended visual regressions occur.

BDD

Feature: Remove AMC Outreach overlay from MobileFrontend

  Scenario: AMC Outreach overlay removed and Advanced Mobile mode remains functional
    Given all AMC Outreach code and configuration have been removed
    When a user visits any article or Special:MobileOptions
    Then no AMC Outreach overlay or prompt appears
    And Advanced Mobile mode can still be enabled or disabled in settings
    And Pixel UI regression tests confirm no new visual differences

Test Plan

Test Case 1: Verify AMC Outreach overlay does not appear (via Pixel UI regression tests)

  1. Run Pixel UI regression tests for Minerva mobile skin on beta environment
  2. Open an article page, e.g. https://en.wikipedia.beta.wmcloud.org/wiki/Cat?useformat=mobile
  3. Compare visual snapshots before and after AMC Outreach code removal
  4. AC1: No AMC Outreach drawer, banner, or overlay is present in the rendered page

Test Case 2: Verify Advanced Mobile mode remains functional

  1. Navigate to https://en.wikipedia.beta.wmcloud.org/wiki/Special:MobileOptions
  2. AC2: The “Advanced mode” toggle control is visible and operational
  3. AC3: Enabling or disabling Advanced mode updates settings successfully without console or UI errors

QA Results - Beta

ACStatusDetails
1T402470#11342973
2T402470#11342973
3T402470#11342973

Design

  • Add mockups and design requirements

Acceptance criteria

  • Add acceptance criteria

Communication criteria - does this need an announcement or discussion?

  • Add communication criteria

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

This task was created by Version 1.2.0 of the Web team task template using phabulous

Event Timeline

HSwan-WMF set the point value for this task to 5.Sep 24 2025, 4:44 PM
ovasileva lowered the priority of this task from Medium to Low.Oct 28 2025, 4:59 PM

Change #1199511 had a related patch set uploaded (by Bvibber; author: Bvibber):

[mediawiki/extensions/MobileFrontend@master] WIP removal of AMC outreach drawer

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

Change #1200129 had a related patch set uploaded (by Bvibber; author: Bvibber):

[mediawiki/skins/MinervaNeue@master] Removal of AMC outreach drawer, Minerva side

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

Change #1200129 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Removal of AMC outreach drawer, Minerva side

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

For QA: probably enough to simplify verify in beta cluster that advanced mobile works okay. This can also skip QA if we are comfortable with that (I am!) !

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

[operations/mediawiki-config@master] Drop references to removed configuration

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

Change #1199511 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Removal of AMC outreach drawer, MobileFrontend side

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Verify AMC Outreach overlay does not appear (via Pixel UI regression tests)

  1. Run Pixel UI regression tests for Minerva mobile skin on beta environment
  2. Open an article page, e.g. https://en.wikipedia.beta.wmcloud.org/wiki/Cat?useformat=mobile
  3. Compare visual snapshots before and after AMC Outreach code removal
  4. AC1: No AMC Outreach drawer, banner, or overlay is present in the rendered page

screenshot.png (1,288×1,993 px, 404 KB)

Test Case 2: Verify Advanced Mobile mode remains functional

  1. Navigate to https://en.wikipedia.beta.wmcloud.org/wiki/Special:MobileOptions
  2. AC2: The “Advanced mode” toggle control is visible and operational

screenshot 2.mov.gif (1,346×1,746 px, 1 MB)

  1. AC3: Enabling or disabling Advanced mode updates settings successfully without console or UI errors

There is a console error but I'm not sure if it is related to this patch. It appears shortly after loading a page and not just the mobile options page.

VM1305:1 Uncaught TypeError: Vue is not a constructor
    at <anonymous>:1:93
(anonymous) @ VM1305:1
setTimeout
(anonymous) @ VM1305:1
globalEval @ startup.js:1146
runScript @ startup.js:1297
enqueue @ startup.js:1184
execute @ startup.js:1404
doPropagation @ startup.js:753
requestIdleCallback
setAndPropagate @ startup.js:826
impl @ startup.js:2015
(anonymous) @ load.php?lang=en&modules=user&skin=minerva&user=Edtadros-beta1&version=1h30t:1

I'm moving to signoff. There should be a task to cover that console error before this is signed off.

@Edtadros could you provide some more repro instructions for that "vue is not a constructor" error? Where did you see that error, and what skin/browser/OS/device was being used?

I'm not seeing it prominently in the client error logs FWIW.

@Edtadros looks like you have some old code from an old test! Please delete the content of this page: https://en.wikipedia.beta.wmcloud.org/wiki/User:Edtadros-beta1/common.js

egardner claimed this task.

Oh, that explains the error! Signing off in that case.

Change #1200173 merged by jenkins-bot:

[operations/mediawiki-config@master] Drop references to removed Advanced mobile contribution configuration

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

Mentioned in SAL (#wikimedia-operations) [2025-11-13T22:59:24Z] <catrope@deploy2002> Started scap sync-world: Backport for [[gerrit:1200173|Drop references to removed Advanced mobile contribution configuration (T402470)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-13T23:01:52Z] <catrope@deploy2002> catrope, jdlrobson: Backport for [[gerrit:1200173|Drop references to removed Advanced mobile contribution configuration (T402470)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-11-13T23:08:54Z] <catrope@deploy2002> Finished scap sync-world: Backport for [[gerrit:1200173|Drop references to removed Advanced mobile contribution configuration (T402470)]] (duration: 09m 30s)