Page MenuHomePhabricator

[M] Create toggle to control the fixed width of the content for Vector 2022 skin
Closed, ResolvedPublic1 Estimated Story Points

Description

NOTE: Blocked on T319447

Background

We would like to add a toggle that controls the width of the site for the Vector 2022 skin

Design

Prototype: https://di-full-width-toggle.web.app/Galaxy TBD: precise location of the toggle

Limited width onLimited width off
Article (top of page)
en.wikipedia.org_wiki_Paris.png (943×1 px, 692 KB)
en.wikipedia.org_wiki_Paris (1).png (943×1 px, 790 KB)
Article (scrolled)
en.wikipedia.org_wiki_Paris (2).png (943×1 px, 728 KB)
Screen Shot 2022-10-21 at 2.28.08 PM.png (940×1 px, 619 KB)
Special page (that is "full-width")
en.wikipedia.org_wiki_Special_RecentChanges_hidebots=1&hidecategorization=1&hideWikibase=1&limit=100&days=7&enhanced=1&urlversion=2.png (943×1 px, 415 KB)
en.wikipedia.org_wiki_Special_RecentChanges_hidebots=1&hidecategorization=1&hideWikibase=1&limit=100&days=7&enhanced=1&urlversion=2 (1).png (943×1 px, 427 KB)

Acceptance criteria

  • Build a toggle that expands the fixed width of the page
  • This behavior would be persistent for logged-in users and not persistent for logged-out users
  • The toggle should appear around 1600px and be hidden below that breakpoint.
  • No changes are required for the existing logic of Special:RecentChanges / other Special Pages

QA

When testing this feature add ?vectorvisualenhancementnext=1 to the URL.

e.g.
https://en.wikipedia.beta.wmflabs.org/wiki/Albert%20Einstein?vectorvisualenhancementnext=1

  • Ensure that we test the new toggle alongside the help icon for suggested edits [1]
  • Per @matmarex check the old wikitext editor preview - the width of the content is limited even when the toggle is clicked, this should probably be changed now that we allow unlimited width.

[1] Steps to trigger this are:

  1. Go to Newcomer Special:Homepage (GrowthExperiments should be turned on, if not turn on all at Preferences > User Profile > Newcomer editor features)
  2. Select a "Suggested edits" task that is *NOT* machine assisted (eg., Copy edit)

You will be taken to the suggested article to copyedit in Read mode, with the floating Help panel icon visible.

image.png (1×3 px, 844 KB)
:

QA Results - Prod

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: matmarex.

The analytics team at Fandom has been kind enough to share some usage data of their full-width toggle with us:

Taking the month of September, 2022 into consideration and only logged out users I have found the following observations:

  • 1,032,589 logged out users set their preference using the toggle
  • These 1 million logged out users correspond to less than 1% (~.1%) of total logged out users. Meaning, less than 1% of logged out users interact with this toggle on a monthly basis. This is heavily skewed as we do have a lot of one-time logged out users. In contrast, about 1.27% of registered users have saved this preference in their profiles.
  • Of the logged out users that did use the toggle just over 90% of users set the toggle for one page and carry the results across Fandom. Alternatively, approx. 92% of users that did use the toggle set it for only one wiki.
  • Overwhelmingly, users prefer to set the toggle to ‘expand’ as opposed to collapse as approx. 96% of users that did use the toggle never set their view to collapse.

Screen Shot 2022-11-08 at 10.40.09 AM.png (636×1 px, 937 KB)

In short, an extremely small percentage of people on Fandom use the full-width toggle.

Edtadros subscribed.

@alexhollender_WMF please take a look at the ❓ and ❌ below.

Test Result - Beta

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

Test Artifact(s):

QA Steps

When testing this feature add ?vectorvisualenhancementnext=1 to the URL.

❓ AC1: Build a toggle that expands the fixed width of the page
The toggle works, but the prototype in the description changes the button face when it is expanded/collapsed. This button stays the same no matter the state. Is this considered a pass or fail?

Screen Recording 2022-11-09 at 5.20.42 PM.mov.gif (828×1 px, 804 KB)

✅ AC2: This behavior would be persistent for logged-in users and not persistent for logged-out users

Logged InLogged Out*
Screen Recording 2022-11-09 at 5.30.30 PM.mov.gif (828×1 px, 2 MB)
{F35736884}

✅ AC3: The toggle should appear around 1600px and be hidden below that breakpoint.

Screen Recording 2022-11-09 at 5.34.32 PM.mov.gif (828×1 px, 2 MB)

❓ AC4: No changes are required for the existing logic of Special:RecentChanges / other Special Pages
I wasn't sure how to validate that no changes were required. I assumed that at 1600px when the toggle appears that it would not do anything. If you look closely there still is some expanding when toggling full width on. Is this expected?
Screen Recording 2022-11-09 at 5.41.53 PM.mov.gif (828×1 px, 576 KB)

Screen Recording 2022-11-09 at 5.43.05 PM.mov.gif (828×1 px, 532 KB)

❌ AC5: Ensure that we test the new toggle alongside the help icon for suggested edits [1]
Functionally the toggle works. However the help icon overlaps part of the toggle.
Screen Recording 2022-11-09 at 5.51.34 PM.mov.gif (828×1 px, 2 MB)

✅ AC6: Per @matmarex check the old wikitext editor preview - the width of the content is limited even when the toggle is clicked, this should probably be changed now that we allow unlimited width.
Screen Recording 2022-11-09 at 5.56.12 PM.mov.gif (872×1 px, 2 MB)

@Edtadros thanks for catching these. Responses below.

❓ AC1: Build a toggle that expands the fixed width of the page
The toggle works, but the prototype in the description changes the button face when it is expanded/collapsed. This button stays the same no matter the state. Is this considered a pass or fail?

❌ Fail. The icon should change depending on the state of the toggle. Icons can be found here: https://doc.wikimedia.org/codex/v0.2.1/icons/all-icons.html

toggle full-width ontoggle full-width off
image.png (46×46 px, 396 B)
image.png (46×46 px, 392 B)
cdxIconFullScreencdxIconExitFullscreen

❓ AC4: No changes are required for the existing logic of Special:RecentChanges / other Special Pages
I wasn't sure how to validate that no changes were required. I assumed that at 1600px when the toggle appears that it would not do anything. If you look closely there still is some expanding when toggling full width on. Is this expected?

✅ Pass. This is expected

❌ AC5: Ensure that we test the new toggle alongside the help icon for suggested edits [1]
Functionally the toggle works. However the help icon overlaps part of the toggle.

Screen Recording 2022-11-09 at 5.51.34 PM.mov.gif (828×1 px, 2 MB)

❌ Fail. The width toggle should not appear whenever the help icon appears.

Change 856001 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/Vector@master] Limited width toggle (0eb8811 follow-up)

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

Change 856001 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Limited width toggle (0eb8811 follow-up)

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

Right now this toggle’s design looks exactly like Kartographer’s ‘Show full map’ toggle, which might prove confusing to the end-users (especially on wikis where Kartographer maps are used more):
https://www.mediawiki.org/w/index.php?title=Help:Extension:Kartographer&useskin=vector-2022

image.png (1×2 px, 628 KB)

Right now this toggle’s design looks exactly like Kartographer’s ‘Show full map’ toggle, which might prove confusing to the end-users (especially on wikis where Kartographer maps are used more):

image.png (1×2 px, 628 KB)

thanks for the heads up. the image you've added is not displaying. can you edit the permissions of the image so that it's public?

Yeah, sorry. Didn’t know this is necessary now.

(It's usually not, but it's possible to accidentally upload a file that no one can view. https://www.mediawiki.org/wiki/Phabricator/Help#File_visibility)

The icon does the same thing though, right? So wouldn't this reinforce its meaning rather than "prove confusing"?

The icon does the same thing though, right? So wouldn't this reinforce its meaning rather than "prove confusing"?

agreed, seems like they complement each other well. one is for the map, the other is for the whole page.

Right now this toggle’s design looks exactly like Kartographer’s ‘Show full map’ toggle, which might prove confusing to the end-users (especially on wikis where Kartographer maps are used more):
https://www.mediawiki.org/w/index.php?title=Help:Extension:Kartographer&useskin=vector-2022

image.png (1×2 px, 628 KB)

Could I suggest adding a tooltip / text label to the button, so that on hover, it's clear to the user what will happen if they click the button? That seems important for accessibility as well. (I write this from the perspective of a user who encountered this button today and wasn't entirely sure about what it would do.)

It still seems to me that this icon is generally wrong, since our layout does not expand to full screen. It only expands horizontally. That is, the correct icon will be something like this.

image.png (200×200 px, 2 KB)

Test Result - Prod

Status: Pass
Environment: enwiki, frwiki
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

When testing this feature add ?vectorvisualenhancementnext=1 to the URL.

✅ AC1: Build a toggle that expands the fixed width of the page

Screen Recording 2022-11-19 at 8.51.10 AM.mov.gif (784×1 px, 2 MB)

✅ AC2: This behavior would be persistent for logged-in users and not persistent for logged-out users

Logged InLogged Out*
Screen Recording 2022-11-19 at 8.52.59 AM.mov.gif (784×1 px, 1 MB)
Screen Recording 2022-11-19 at 8.55.36 AM.mov.gif (784×1 px, 1 MB)

✅ AC3: The toggle should appear around 1600px and be hidden below that breakpoint.

Screen Recording 2022-11-19 at 8.57.03 AM.mov.gif (784×1 px, 1 MB)

✅ AC4: No changes are required for the existing logic of Special:RecentChanges / other Special Pages
See screen capture above
✅ AC5: Ensure that we test the new toggle alongside the help icon for suggested edits [1]. Toggle should not appear when help icon appears per T319449#8386904
Screenshot 2022-11-19 at 9.00.56 AM.png (781×1 px, 316 KB)

✅ AC6: Per @matmarex check the old wikitext editor preview - the width of the content is limited even when the toggle is clicked, this should probably be changed now that we allow unlimited width.
Screen Recording 2022-11-19 at 9.02.48 AM.mov.gif (784×1 px, 1 MB)

In dewiki some logged-in users can see this toggle and some users can't. Are there preferences to switch on or off the toggle or what is the reason?

@doctaxon what is the browser width for these users? What browser are they using? Is there an on-wiki discussion you could point to (preferably with screenshots)?

The toggle only shows if it's needed (at 1600px). If users are not seeing the toggle, they probably have a browser resolution that means the content is already full screen (or they are not using the Vector 2022 skin).

Oh I see, it's a resolution thing only. Thank you for explaining.

If this is only for 1600px and above, I have a question: Why?

Wouldn’t full width be actually more useful for narrow screens? (On wide screens measures have limited width for legibility.) I have my monitor set up in portrait mode so my screen width is only 1080px, but if I switch to Vector 2022 the text block for main content is sometimes so narrow I actually decided to switch back.

If this is only for 1600px and above, I have a question: Why?

The 1600px breakpoint is selected as at this resolution the fixed width is relevant to all pages. See https://en.wikipedia.org/wiki/Special:RecentChanges?damaging=likelybad&hidebots=1&hidecategorization=1&hideWikibase=1&limit=50&days=30&enhanced=1&damaging__likelybad_color=c4&damaging__verylikelybad_color=c5&urlversion=2 for example. A fixed width toggle does not make sense below 1600px.

@Al12si I'm not sure I follow you... On narrow screens, there is no limited width. The content is already full screen.
e.g. here:

Screen Shot 2022-11-21 at 4.15.57 PM.png (787×775 px, 230 KB)

Here is my screen at 1080px and the content is full screen. What are you seeing?

Screen Shot 2022-11-21 at 4.16.45 PM.png (628×1 px, 257 KB)

Could I suggest adding a tooltip / text label to the button, so that on hover, it's clear to the user what will happen if they click the button? That seems important for accessibility as well. (I write this from the perspective of a user who encountered this button today and wasn't entirely sure about what it would do.)

thanks for this suggestions @kostajh — I've created a task: T323625

2 comments about the icon:

  • I agree with Iniquity's comment and proposed alternative-icon above at T319449#8405057 - I think re-using the "full-screen" icon is non-optimal and potentially confusing.
  • I wonder if the icon could have an opaque background, so that if it does overlap with other content (perhaps due to someone using User.css to further adjust the widths), then that content doesn't show through from behind. E.g. Because of my condensed-whitespace user.css, I see this:
    image.png (120×194 px, 6 KB)

1 comment about the toggle-availability sizing:

  • I agree with Al12si's comment just above, that it would be good to have the toggle displayed as soon as it becomes relevant (I think that's at ~1370px? Thus I'd suggest it appears at either 1380px/1400px). Reasoning:
    • 1600px is a common screen resolution, and any users with a display of that resolution will not be offered the toggle (unless in fullscreen-mode and on a page with no-scrollbar, IIUC, because the calculation is based on 'content-width', not window or screen width).
    • When I want to expand the view, it's often because I want the content to expand into the already available whitespace, such as in this screenshot of a 1590px wide window:

image.png (979×1 px, 439 KB)

Would it be possible to add a tooltip to the button? Currently, it's very unintuitive what it's purpose is (especially that the icon usually means full-screen and not full-width).

Would it be possible to add a tooltip to the button? Currently, it's very unintuitive what it's purpose is (especially that the icon usually means full-screen and not full-width).

That's tracked in T323625: Add label and title attribute/tooltip to full-screen toggle button (see T319449#8413871).

@ovasileva @Jdlrobson documenting this (though I don't think it's an issue):

because the main page on Commons has it's own max-width (separate from Vector 2022), the max-width toggle maybe doesn't have the expected effect:

Commons Main page (Legacy Vector), has max-widthCommons Main page (Vector 2022), width toggle
Screen Shot 2022-11-29 at 11.13.52 AM.png (975×1 px, 829 KB)

It still seems to me that this icon is generally wrong, since our layout does not expand to full screen. It only expands horizontally. That is, the correct icon will be something like this.

image.png (200×200 px, 2 KB)

@Iniquity I've had similar thoughts about the icon. I think the tradeoff here is the correctness of the icon versus the recognizability of the icon. I think the current icon is not exactly correct (but it is close to being correct), but it is quite recognizable. A more custom expand/collapse width icon would be more correct, but perhaps less recognizable. I will run some simple user testing on usertesting.com next week to see how people understand both sets of icons.

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/2325bf7e27/w/