Page MenuHomePhabricator

Issue with mw.loader.getState() and Popups Extension
Closed, ResolvedPublic

Assigned To
Authored By
KSarabia-WMF
Nov 27 2023, 6:01 PM
Referenced Files
Restricted File
Jan 4 2024, 5:28 PM
Restricted File
Jan 4 2024, 5:28 PM
F41650678: Screenshot 2024-01-04 at 9.25.27 AM.png
Jan 4 2024, 5:28 PM
F41617838: screenshot 386.png
Dec 22 2023, 12:40 AM
F41617837: screenshot 387.png
Dec 22 2023, 12:40 AM

Description

The bug involves an issue with the mw.loader.getState() function, specifically when the ResourceLoader module is not registered. When the Popups extension is not loaded, calling mw.loader.getState( 'ext.popups.main' ) returns null instead of the expected result. Consequently, the getInstrumentationDependencies() function returns [ 'ext.popups.main' ] instead of an empty array ([]).

QA:

  • Toggle popups extension on and off.
  • Observe Network tab each time.
  • Ensure DesktopWebUIActions events is firing.

QA Results - Beta

ACStatusDetails
1T352073#9422791

QA Results - test.wikipedia.org

ACStatusDetails
1T352073#9435803

Event Timeline

Change 978004 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/WikimediaEvents@master] desktopWebUIActions: Fix getInstrumentationDependencies()

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

Change 978004 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] desktopWebUIActions: Fix getInstrumentationDependencies()

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

ovasileva triaged this task as Medium priority.Nov 30 2023, 6:51 PM
ovasileva moved this task from Incoming to QA on the Web-Team-Backlog (FY2023-24 Q2 Sprint 5) board.
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Toggle popups extension on and off.
Observe Network tab each time.
✅ AC1: Ensure DesktopWebUIActions events is firing.

screenshot 387.png (492×817 px, 93 KB)

screenshot 386.png (495×817 px, 94 KB)

Jdlrobson claimed this task.

I repeated the testing by Edward in T352073#9422791 on test.wikipedia.org

Test Result - test.wikipedia.org

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Toggle popups extension on and off.
Observe Network tab each time.
✅ AC1: Ensure DesktopWebUIActions events is firing.

Screenshot 2024-01-04 at 9.25.27 AM.png (559×747 px, 103 KB)

{F41650684}
{F41650686}