Page MenuHomePhabricator

Migrate Vector's limited width to new client preference API
Closed, ResolvedPublic2 Estimated Story Points

Description

In T339268 we propose an inline script to replace the existing system and support multiple client preferences. This requires changes to Vector namely:

  • We need to use a class suffixed with -clientpref-0 or -clientpref-1 instead of -disabled or -enabled
  • We store in a different cookie

Requirements

QA

As an anonymous user:

  • Check the limited width toggle feature bottom right works (persists across page views). Clicking it should expand the article to full width and it should persist on page reload.
  • After disabling limited width a popup should show indicating the user can click the button again to restore limited width
  • (likely done by engineer) check the new CSS/JS works with old HTML

Sign off steps

  • Create task for monitoring the performance implications of the change: T344077
  • Create task for cleaning up code for cached HTML (Done in T343843)

QA Results - Beta

ACStatusDetails
1Check the limited width toggle feature bottom right works
1Persists across page views
1Clicking it should expand the article to full width
1Persist on page reload
2After disabling limited width a popup should show indicating the user can click the button again to restore limited width

QA Results - Prod

ACStatusDetails
1Check the limited width toggle feature bottom right works
1Persists across page views
1Clicking it should expand the article to full width
1Persist on page reload
2After disabling limited width a popup should show indicating the user can click the button again to restore limited width

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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

[mediawiki/core@master] core - client side preferences inline script

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

Change 944343 abandoned by Mabualruz:

[mediawiki/core@master] core - client side preferences inline script

Reason:

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

Jdlrobson added a subscriber: Mabualruz.

@Mabualruz given you are out next week I suggest you focus on wrapping up the core patch (T339268). I will take care of the Vector side of things when we are in a better position to merge.

Change 937192 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Limited width uses new client preferences system

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

Jdlrobson added subscribers: Edtadros, Mhurd, bwang.

Hey @Mhurd adding you since @Edtadros is winding down. Feel free to reassign to George if they'll be handling QA.

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

[mediawiki/skins/Vector@master] Fixes the pinning functionality

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

Change 947024 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fixes the pinning functionality

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

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

[mediawiki/skins/Vector@master] Fix suffix check

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

Jdlrobson updated the task description. (Show Details)

Change 947031 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix suffix check

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

Hey @Jdlrobson - quick double-check:

This task is tagged with 1.41.0-wmf.22

And https://en.wikipedia.beta.wmflabs.org says it's running 1.41.0-alpha:

Screenshot 2023-08-10 at 5.32.23 PM.png (1×1 px, 397 KB)

Does beta's 1.41.0-alpha encompass 1.41.0-wmf.22 changes?

Yep! Wmf22 has not been cut yet. It will happen on Tuesday next week.

Status:❓Need More Info
Environment: beta
OS: macOS Ventura
Browser: Chrome 115, Safari 16.6
Device: MBP
Emulated Device: NA

AC1:
✅ Check the limited width toggle feature bottom right works
✅ Persists across page views
✅ Clicking it should expand the article to full width
❓ Persists on page reload

@Jdlrobson Width change persists on reload, but the toggle icon switches back to the wrong state if you reload when it's in fullscreen mode. That could be a separate ticket, but wanted to flag it with❓just in case you wanted to fix as part of this one

ChromeSafari
width toggle state preserved across refresh, but button state wrong - chrome.mov.gif (960×1 px, 1 MB)
width toggle state preserved across refresh, but button state wrong - safari.mov.gif (1×1 px, 1 MB)

AC2:

✅ Popup message appears

ChromeSafari
chrome.png (987×1 px, 677 KB)
safari.png (1×2 px, 2 MB)

Thanks @Mhurd I'm seeing the same issue in production so it's an existing bug - good catch! I've opened T344061

@Mhurd could we repeat the QA as we had to change the implementation ever so slightly. Thanks in advance!

lgtm 👍

QA Results - Beta

ACStatusDetails
1Check the limited width toggle feature bottom right works
1Persists across page views
1Clicking it should expand the article to full width
1Persist on page reload
2After disabling limited width a popup should show indicating the user can click the button again to restore limited width

Per sign off step I've created T344077 to monitor the change.
Thanks @Mhurd for the thorough review (twice) on this one!

We should run the QA again once this is in production (Currently www.mediawiki.org on Wednesday 16th at earliest)

Triple-checked it on a couple group 1 and 2 production wikis

It worked, but I'm not seeing the width toggle issue I mentioned here and still see on betalabs - so it may not have landed on these yet 🤔

Ok it's live in groups 1 and 2 and still seems ok ( with the exception of the icon toggle state issue previously identified )

I updated the task description

Mhurd removed Mhurd as the assignee of this task.
Mhurd updated the task description. (Show Details)