Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

[M] Create user preference to turn fixed width on and off
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

As per request of the English Wikipedia community, we would like to explore creating a preference that can control the fixed/limited width of the site. No need to feature flag this.

Design

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

  • Create a user preference which controls the content width (on/off)
  • Should appear in the skin settings like so:

Screen Shot 2022-10-05 at 12.12.54 PM.png (449×618 px, 81 KB)

  • Should not appear for skins it doesn't apply to e.g. legacy Vector, timeless. When those skins are selected, the preference should hide.
  • Defaults to on
  • When disabled, all pages should have no max width e.g. skin-vector-disable-max-width is applied to all pages

QA Results - Beta

QA Results - Prod

Event Timeline

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

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

[mediawiki/skins/Vector@master] Create user preference to turn fixed width on and off

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

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

[mediawiki/core@master] Create user preference to turn fixed width on and off

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

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

[mediawiki/skins/Vector@master] Create user preference to turn fixed width on and off

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

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

[mediawiki/skins/Vector@master] Create user preference to turn fixed width on and off

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

Change 841984 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Create user preference to turn fixed width on and off

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

Change 843532 had a related patch set uploaded (by Func; author: Func):

[mediawiki/skins/Vector@master] Follow-up 76d1135: Use better practice in the code

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

Change 843532 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Follow-up 76d1135: Use better practice in the code

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

Change 843886 had a related patch set uploaded (by Func; author: Func):

[mediawiki/skins/Vector@wmf/1.40.0-wmf.6] Follow-up 76d1135: Use better practice in the code

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

Change 843886 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.40.0-wmf.6] Follow-up 76d1135: Use better practice in the code

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

Change 844019 had a related patch set uploaded (by Func; author: Func):

[mediawiki/skins/Vector@master] i18n: Rename some messages to follow common practice

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

Change 844019 merged by jenkins-bot:

[mediawiki/skins/Vector@master] i18n: Rename some messages to follow common practice

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Create a user preference which controls the content width (on/off)
see below
✅ AC2: Should appear in the skin settings (see description)

Screen Shot 2022-10-20 at 2.17.27 PM.png (832×729 px, 135 KB)

✅ AC3: Should not appear for skins it doesn't apply to e.g. legacy Vector, timeless. When those skins are selected, the preference should hide.
Screen Recording 2022-10-20 at 2.17.51 PM.mov.gif (730×620 px, 317 KB)

✅ AC4: Defaults to on
Checked different user. Verified it was defaulted to ON.
✅ AC5: When disabled, all pages should have no max width e.g. skin-vector-disable-max-width is applied to all pages
Screen Shot 2022-10-20 at 2.19.51 PM.png (1×2 px, 503 KB)

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Create a user preference which controls the content width (on/off)
see below
✅ AC2: Should appear in the skin settings (see description)
{F35605938}
✅ AC3: Should not appear for skins it doesn't apply to e.g. legacy Vector, timeless. When those skins are selected, the preference should hide.
{F35605940}
✅ AC4: Defaults to on
Checked different user. Verified it was defaulted to ON.
✅ AC5: When disabled, all pages should have no max width e.g. skin-vector-disable-max-width is applied to all pages
{F35605976}

it seems when the new limited-width mode disabled there’s still a max-width on the outer container. I think what people want is total full-width, for example:

image.png (2×7 px, 1 MB)

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

[mediawiki/skins/Vector@master] Disable container max width when max width disabled

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

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

[mediawiki/skins/Vector@master] Features: Make max width a feature

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

@Jdlrobson also realizing the sticky header has a max-width that should be removed as well:

default/currentmax-width removed
Screen Shot 2022-10-21 at 2.26.48 PM.png (936×1 px, 616 KB)
Screen Shot 2022-10-21 at 2.28.08 PM.png (940×1 px, 619 KB)

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

[mediawiki/skins/Vector@master] Disable container max width when max width disabled

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

This comment was removed by Jdlrobson.

@Jdlrobson I've added screenshots to the task description to hopefully clarify what is expected here

@Jdlrobson I've added screenshots to the task description to hopefully clarify what is expected here

I guess this means we need to apply the change to the full page body rather than just our container, @Jdlrobson should be done now or in a followup?

I already mentioned this on the enwiki RFC, but the current implementation increases the width somewhat, but still enforces a limit. Gadget-wide-vector-2022 does the right thing. Here's some screenshots:

With limited width mode enabled

Screen Shot with Limited Width Mode enabled.png (2×5 px, 1 MB)

With limited width mode disabled

Screen Shot with Limited Width Mode disabled.png (2×5 px, 1 MB)

With Gadget-wide-vector-2022

Screen Shot with Gadget-wide-vector-2022.png (2×5 px, 1 MB)

Change 845618 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Disable container max width when max width disabled

Reason:

This doesn't appear to be what we want. Revising.

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

Change 845652 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Features: Make max width a feature

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

I tried it on beta. Looks good, thanks.

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC5: When disabled, all pages should have no max width e.g. skin-vector-disable-max-width is applied to all pages

Limited width onLimited width off
Article (top of page)
Screen Shot 2022-10-25 at 3.11.30 PM.png (755×2 px, 478 KB)
Screen Shot 2022-10-25 at 3.03.47 PM.png (774×2 px, 398 KB)
Article (scrolled)
Screen Shot 2022-10-25 at 3.11.20 PM.png (390×2 px, 325 KB)
Screen Shot 2022-10-25 at 3.07.44 PM.png (851×2 px, 559 KB)
Special page (that is "full-width")
Screen Shot 2022-10-25 at 3.10.12 PM.png (855×2 px, 191 KB)
Screen Shot 2022-10-25 at 3.07.28 PM.png (831×2 px, 188 KB)
Screen Shot 2022-10-25 at 3.14.46 PM.png (698×2 px, 264 KB)
LGoto renamed this task from Create user preference to turn fixed width on and off to [M] Create user preference to turn fixed width on and off.Nov 3 2022, 5:10 PM

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC5: When disabled, all pages should have no max width e.g. skin-vector-disable-max-width is applied to all pages

Limited width onLimited width off
Article (top of page)
Screenshot 2022-11-06 at 8.05.30 PM.png (534×2 px, 252 KB)
Screenshot 2022-11-06 at 8.08.35 PM.png (524×2 px, 250 KB)
Article (scrolled)
Screenshot 2022-11-06 at 8.05.41 PM.png (525×2 px, 258 KB)
Screenshot 2022-11-06 at 8.08.32 PM.png (524×2 px, 428 KB)
Special page (that is "full-width")
Screenshot 2022-11-06 at 8.07.01 PM.png (581×2 px, 130 KB)
Screenshot 2022-11-06 at 8.07.24 PM.png (660×2 px, 230 KB)
Screenshot 2022-11-06 at 8.08.06 PM.png (524×2 px, 129 KB)
Screenshot 2022-11-06 at 8.08.20 PM.png (524×2 px, 117 KB)

It looks like the max-width is still applied when previewing an edit, in the CSS in Chrome Devtools I see that #wikiPreview has max-width: 60em set. @Jdlrobson, should this task be re-opened, or should I file a separate bug?

@Rchard2scout - thanks for the report! Could you open a new ticket?

cc @Samwilson - I thought we had a ticket for this, but perhaps not. I could only find T312963 which added the max-width. Sam: the ask is that the previews respect the full width preference (toggle), but perhaps there are good reasons not to do that (since you are previewing what the page looks like for the majority of people?)

Yeah that's a good point. So the preview should follow whatever the default value of the new preference is? i.e. if a site has it set to wide then preview should be wide even if the user has it set to narrow? And vice versa.

@Jdlrobson, @Samwilson - after doing some debugging today I'm seeing the following:

  1. If the toggle is set to full width, the preview does respect the previous width setting and shows at full width
  2. If the toggle is set to the default width, the preview shows at fixed width but is aligned left with the page

Did we make any changes here since this was reported? I agree that we might want to switch the preview to show the default width rather than the individual preference