Page MenuHomePhabricator

Make the client preferences controls pinnable
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
Jdlrobson
Nov 14 2023, 12:28 AM
Referenced Files
F41562070: screenshot 348.png
Dec 5 2023, 7:44 AM
F41562069: screenshot 346.png
Dec 5 2023, 7:44 AM
F41562068: screenshot 347.png
Dec 5 2023, 7:44 AM
F41562067: screenshot 344.png
Dec 5 2023, 7:44 AM
F41562066: screenshot 345.png
Dec 5 2023, 7:44 AM
F41562064: screenshot 349.png
Dec 5 2023, 7:44 AM
F41562093: screenshot 351.png
Dec 5 2023, 7:44 AM
F41562092: screenshot 352.png
Dec 5 2023, 7:44 AM

Description

Following T350417 and T350195 we should be able to render the client preferences either in a dropdown or the sidebar. This task will make it possible to change the default or move the menus between locations.

Pre-work

  • check with Jennifer whether the click tracking ID should be the same or different depending on where the menu is positioned (

either in dropdown or outside dropdown). if they are supposed to be different please edit the Acceptance criteria in this ticket.

Acceptance criteria

  • When I append ?vectorclientpreferences=1 to a URL, I see the client preferences in the sidebar or user menu.

[]When I append ?vectorclientpreferences=0 to a URL ?vectorclientpreferences=0 I do not see it at all.
[]When I am an anonymous user I do not see it at all.

  • When I append ?vectorclientprefspinned=0 to a URL I see the client preferences in the top right
  • When I append ?vectorclientprefspinned=1 to a URL I see the client preferences in the sidebar.
  • I should be able to click "hide" to move it to the dropdown
  • As a logged in user, my preference persists across page views.
  • Make sure click tracking is functioning for interactions with both types of settings - each selection of an option should have an associated click tracking event

TODO

  • Create ClientPreferencePinned feature
  • Update client pref to match existing pinnable element conventions (i.e. use PinnableContainer, PinnableHeader PHP components and templates)

QA Results - Beta

QA Results - Prod

Event Timeline

ovasileva set the point value for this task to 5.Nov 16 2023, 6:16 PM
bwang removed bwang as the assignee of this task.Nov 21 2023, 5:04 PM
bwang subscribed.

Change 976280 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Make client prefs fully pinnable

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

@ovasileva @KSarabia-WMF @jwang @bwang : Looking at AC4 this looks correctly instrumented, but the same event name will be triggered for these options regardless of whether they are pinned or not. Do we need unique identifiers so we can distinguish interactions with controls in the dropdown vs controls in the sidebar? (FWIW vector-client-pref-vector-feature-limited-width-value-0 is currently the event for disabling limited width regardless of where it is located)

@ovasileva @KSarabia-WMF @jwang @bwang : Looking at AC4 this looks correctly instrumented, but the same event name will be triggered for these options regardless of whether they are pinned or not. Do we need unique identifiers so we can distinguish interactions with controls in the dropdown vs controls in the sidebar? (FWIW vector-client-pref-vector-feature-limited-width-value-0 is currently the event for disabling limited width regardless of where it is located)

I don't think we need separate events here, since we'll be aggregating both to report on overall preference change

Change 976280 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Make client prefs fully pinnable

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

Change 976861 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Fix sticky styles for pinnable elements by moving sticky styles into separate vector-sticky-pinned-container element

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

Looks like we are either missing a message or need to make this optional:

Screenshot 2023-11-27 at 9.27.48 AM.png (524×1 px, 73 KB)

We should fix this before branch cut.

Replication:

  • Click hide
  • See popup message

Change 977747 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Fix misc client pref bugs

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

Change 976861 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix sticky styles for pinnable elements by moving sticky styles into separate vector-sticky-pinned-container element

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

Change 977747 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix misc client pref bugs

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

Edtadros subscribed.

Test Result - Beta

Status: ❓Need More Info / ❌ FAIL
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

@ovasileva Please take a look at AC2 and AC3. Also, a second pair of eyes on AC8 would be good.

✅ AC1: When I append ?vectorclientpreferences=1 to a URL, I see the client preferences in the sidebar or user menu.

screenshot 133.mov.gif (972×1 px, 911 KB)

❌ AC2: When I append ?vectorclientpreferences=0 to a URL I do not see it at all.
I do not see it, but the content is still shifted left.

screenshot 273.png (1×1 px, 358 KB)

❓ AC3: When I am an anonymous user I do not see it at all.

screenshot 272.png (1×1 px, 402 KB)

The menu will still appear if I append the parameter to the URL, but it is blank. Is this expected?
screenshot 134.mov.gif (972×1 px, 887 KB)

✅ AC4: When I append ?vectorclientprefspinned=0 to a URL I see the client preferences in the top right

screenshot 274.png (974×1 px, 326 KB)

✅ AC5: When I append ?vectorclientprefspinned=1 to a URL I see the client preferences in the sidebar.

screenshot 275.png (974×1 px, 317 KB)

✅ AC6: I should be able to click "hide" to move it to the dropdown

screenshot 135.mov.gif (972×1 px, 1 MB)

✅ AC7: As a logged in user, my preference persists across page views.

screenshot 136.mov.gif (972×1 px, 2 MB)

✅ AC8: Make sure click tracking is functioning for interactions with both types of settings - each selection of an option should have an associated click tracking event
Pinned to Sidebar

screenshot 285.png (510×908 px, 101 KB)

screenshot 284.png (510×908 px, 101 KB)

screenshot 281.png (510×908 px, 101 KB)

screenshot 280.png (510×908 px, 101 KB)

screenshot 283.png (510×908 px, 106 KB)

screenshot 282.png (510×908 px, 101 KB)

screenshot 279.png (510×908 px, 104 KB)

Unpinned (in dropdown)

screenshot 289.png (510×908 px, 101 KB)

screenshot 290.png (510×908 px, 101 KB)

screenshot 292.png (510×908 px, 101 KB)

screenshot 291.png (510×908 px, 101 KB)

screenshot 286.png (510×908 px, 101 KB)

screenshot 287.png (510×908 px, 101 KB)

screenshot 288.png (510×908 px, 101 KB)

Change 978116 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Fix incorrect client-pref-pinned classes when client pref feature is disabled

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

bwang removed bwang as the assignee of this task.Nov 28 2023, 6:11 PM

Change 978513 had a related patch set uploaded (by Jdlrobson; author: Bernard Wang):

[mediawiki/skins/Vector@wmf/1.42.0-wmf.7] Fix incorrect client-pref-pinned classes when client pref feature is disabled

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

Change 978116 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix incorrect client-pref-pinned classes when client pref feature is disabled

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

Change 978513 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.42.0-wmf.7] Fix incorrect client-pref-pinned classes when client pref feature is disabled

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

Mentioned in SAL (#wikimedia-operations) [2023-11-29T21:50:44Z] <tgr@deploy2002> Started scap: Backport for [[gerrit:978683|Update coverage of Reader Demographics 2 surveys (T344393)]], [[gerrit:978513|Fix incorrect client-pref-pinned classes when client pref feature is disabled (T351141 T352257)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-29T21:52:07Z] <tgr@deploy2002> dani and tgr and jdlrobson: Backport for [[gerrit:978683|Update coverage of Reader Demographics 2 surveys (T344393)]], [[gerrit:978513|Fix incorrect client-pref-pinned classes when client pref feature is disabled (T351141 T352257)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-29T22:01:20Z] <tgr@deploy2002> Finished scap: Backport for [[gerrit:978683|Update coverage of Reader Demographics 2 surveys (T344393)]], [[gerrit:978513|Fix incorrect client-pref-pinned classes when client pref feature is disabled (T351141 T352257)]] (duration: 10m 35s)

QA content not shifting properly.

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC2: When I append ?vectorclientpreferences=0 to a URL I do not see it at all.

screenshot 138.mov.gif (588×1 px, 717 KB)

✅ AC3: When I am an anonymous user I do not see it at all.

screenshot 272.png (1×1 px, 402 KB)

This is as designed per task sync discussion.

Looks good, resolving!

Test Result - Prod

Status: ❌ FAIL
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: When I append ?vectorclientpreferences=1 to a URL, I see the client preferences in the sidebar or user menu.

screenshot 339.png (771×1 px, 453 KB)

✅ AC2: When I append ?vectorclientpreferences=0 to a URL I do not see it at all.

screenshot 340.png (771×1 px, 454 KB)

✅ AC3: When I am an anonymous user I do not see it at all.

screenshot 341.png (958×974 px, 394 KB)

❌ AC4: When I append ?vectorclientprefspinned=0 to a URL I see the client preferences in the top right

screenshot 342.png (771×1 px, 425 KB)

❌ AC5: When I append ?vectorclientprefspinned=1 to a URL I see the client preferences in the sidebar.

screenshot 343.png (771×1 px, 424 KB)

✅ AC6: I should be able to click "hide" to move it to the dropdown

screenshot 167.mov.gif (770×1 px, 1 MB)
screenshot 168.mov.gif (770×1 px, 1 MB)

✅ AC7: As a logged in user, my preference persists across page views.

screenshot 170.mov.gif (770×1 px, 1002 KB)
screenshot 173.mov.gif (770×1 px, 1 MB)
screenshot 172.mov.gif (770×1 px, 1 MB)
screenshot 169.mov.gif (770×1 px, 1 MB)
screenshot 171.mov.gif (770×1 px, 1 MB)

✅ AC8: Make sure click tracking is functioning for interactions with both types of settings - each selection of an option should have an associated click tracking event
Pinned to Sidebar

screenshot 355.png (551×999 px, 100 KB)
screenshot 354.png (551×999 px, 100 KB)
screenshot 353.png (551×999 px, 100 KB)
screenshot 350.png (551×999 px, 100 KB)
screenshot 352.png (551×999 px, 100 KB)
screenshot 351.png (551×999 px, 100 KB)

Unpinned (in dropdown)

screenshot 349.png (551×999 px, 99 KB)
screenshot 345.png (551×999 px, 100 KB)
screenshot 344.png (551×999 px, 102 KB)
screenshot 347.png (551×999 px, 100 KB)
screenshot 346.png (551×999 px, 100 KB)
screenshot 348.png (551×999 px, 100 KB)

Regarding the pinning functionality,

❌ AC4: When I append ?vectorclientprefspinned=0 to a URL I see the client preferences in the top right
❌ AC5: When I append ?vectorclientprefspinned=1 to a URL I see the client preferences in the sidebar.

It looks like you need both the vectorclientprefs and the vectorclientprefspinned flags in the URL to see that functionality, with vectorclientprefs=1
Logged in, I can see this working in prod: https://en.wikipedia.org/wiki/Rome?vectorclientpreferences=1&vectorclientprefspinned=0