Page MenuHomePhabricator

popupNotification Fix memory leaks
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

We believe popupNotifications.js has a memory leak because we create new popup widgets each time we show the popup, and since the OOUI popup widget doesn't have a destructor, we just remove the popup from the DOM.
We believe the simplest solution is to store an array of all popup Widgets, so that we don't reinitialize new widgets each time a popup notification is created

QA

Repeat QA we did on T334366

QA Results - Beta

QA Results - Prod

Event Timeline

Change 910081 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] popupNotification Fix memory leaks

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

LGoto set the point value for this task to 2.Apr 24 2023, 5:35 PM

I noticed an odd behaviour when scrolling down the page tools do not move to the sticky header while everything else from the menu does.

@ovasileva if that is intended, please let me know. else I will open a task to have the page tools on the sticky header.

I noticed an odd behaviour when scrolling down the page tools do not move to the sticky header while everything else from the menu does.

@ovasileva if that is intended, please let me know. else I will open a task to have the page tools on the sticky header.

Yes, page tools are not available in the sticky header

Change 910081 merged by jenkins-bot:

[mediawiki/skins/Vector@master] popupNotification Fix memory leaks

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

When the patch merges it will be possible to test this in an incognito window on https://en.wikipedia.beta.wmflabs.org/

@Mabualruz I'm seeing multiple popup elements in the dom when i repeatedly pin/unpin the TOC https://jmp.sh/l2UqeCT6

Change 912405 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] popupNotification Fix memory leaks

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

Change 912405 merged by jenkins-bot:

[mediawiki/skins/Vector@master] popupNotification Fix memory leaks

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: On page load for users who have not interacted with the toggle
Set up a pointer overlay that highlights the page width toggle.
Tooltip copy: "You can toggle between a limited width and full width by clicking this button."
Tooltip should show for all logged-out users on page load until dismissed via the "Dismiss" button.

Screenshot 2023-05-01 at 1.54.49 PM.png (1×1 px, 532 KB)

✅ AC2: On page load for users who have previously interacted with the toggle to enable full width without realizing what it did
Tooltip copy: "You have switched your layout to full width. To go back to limited width, press this button."
Tooltip should show for all logged-out users on page load until dismissed via the "Dismiss" button.

Screenshot 2023-05-01 at 1.55.15 PM.png (1×1 px, 544 KB)

❌ AC3: Clicking the button
Clicking the limited width button will display a secondary tooltip that informs you how to go back to fixed width
Tooltip copy: "You have switched your layout to full width. To go back to limited width, press this button."
The secondary tooltip should not show if you restore limited width, but should show if you click the button to switch to full width again.
When clicking it again (to restore limited width), the tooltip should fade out.
@Jdlrobson, the tool tips do not fade out.

Screen Recording 2023-05-01 at 1.55.53 PM.mov.gif (1×1 px, 1 MB)

✅ AC4: With cookies disabled
on page load I do not see a popup
on disabling limited width I see the popup

Screen Recording 2023-05-01 at 2.00.34 PM.mov.gif (1×1 px, 748 KB)

Change 913942 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] popupNotification Fix memory leaks

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

@Edtadros the 1st ever popup has to be dismissed so we attach the cookie that the user have been informed of the feature, then it would be the fade behaviour.

Change 913942 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Ensure page load popupNotification is closed when the toggle button is clicked

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC3: Clicking the button
Clicking the limited width button will display a secondary tooltip that informs you how to go back to fixed width
Tooltip copy: "You have switched your layout to full width. To go back to limited width, press this button."
The secondary tooltip should not show if you restore limited width, but should show if you click the button to switch to full width again.
When clicking it again (to restore limited width), the tooltip should fade out.

Screen Recording 2023-05-04 at 8.16.40 PM.mov.gif (1×2 px, 870 KB)

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

[mediawiki/skins/Vector@wmf/1.41.0-wmf.7] Ensure page load popupNotification is closed when the toggle button is clicked

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

Change 917162 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.41.0-wmf.7] Ensure page load popupNotification is closed when the toggle button is clicked

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

Mentioned in SAL (#wikimedia-operations) [2023-05-08T20:21:55Z] <taavi@deploy1002> Started scap: Backport for [[gerrit:917162|Ensure page load popupNotification is closed when the toggle button is clicked (T335153)]]

Mentioned in SAL (#wikimedia-operations) [2023-05-08T20:23:11Z] <taavi@deploy1002> jdlrobson and taavi: Backport for [[gerrit:917162|Ensure page load popupNotification is closed when the toggle button is clicked (T335153)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-05-08T20:29:53Z] <taavi@deploy1002> Finished scap: Backport for [[gerrit:917162|Ensure page load popupNotification is closed when the toggle button is clicked (T335153)]] (duration: 07m 58s)

Edtadros removed ovasileva as the assignee of this task.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: On page load for users who have not interacted with the toggle
Set up a pointer overlay that highlights the page width toggle.
Tooltip copy: "You can toggle between a limited width and full width by clicking this button."
Tooltip should show for all logged-out users on page load until dismissed via the "Dismiss" button.

Screenshot 2023-05-12 at 1.58.04 PM.png (738×1 px, 358 KB)

✅ AC2: On page load for users who have previously interacted with the toggle to enable full width without realizing what it did
Tooltip copy: "You have switched your layout to full width. To go back to limited width, press this button."
Tooltip should show for all logged-out users on page load until dismissed via the "Dismiss" button.

Screenshot 2023-05-12 at 1.57.39 PM.png (702×1 px, 345 KB)

✅ AC3: Clicking the button
Clicking the limited width button will display a secondary tooltip that informs you how to go back to fixed width
Tooltip copy: "You have switched your layout to full width. To go back to limited width, press this button."
The secondary tooltip should not show if you restore limited width, but should show if you click the button to switch to full width again.
When clicking it again (to restore limited width), the tooltip should fade out.

Screen Recording 2023-05-12 at 1.59.40 PM.mov.gif (736×1 px, 1 MB)

✅ AC4: With cookies disabled
on page load I do not see a popup
on disabling limited width I see the popup

Screen Recording 2023-05-12 at 2.02.54 PM.mov.gif (736×1 px, 1 MB)