Page MenuHomePhabricator

Don't hide width controls at narrow viewport sizes
Closed, ResolvedPublic3 Estimated Story Points

Assigned To
Authored By
JScherer-WMF
May 29 2024, 9:32 PM
Referenced Files
F55318705: 2024-06-14_10-00-22 (1).gif
Jun 14 2024, 5:05 PM
F55318569: 2024-06-14_09-58-01 (1).gif
Jun 14 2024, 5:05 PM
F55318560: 2024-06-14_09-56-13 (1).gif
Jun 14 2024, 5:05 PM
F55318548: 2024-06-14_09-54-16 (1).gif
Jun 14 2024, 5:05 PM
F55318535: 2024-06-14_09-49-07 (1).gif
Jun 14 2024, 5:05 PM
F55021864: screenshot 107.mov.gif
Jun 7 2024, 5:18 PM
F55021860: screenshot 108.mov.gif
Jun 7 2024, 5:18 PM
F55021848: screenshot 106.mov.gif
Jun 7 2024, 5:18 PM

Description

Background

Right now, the width control disappears from appearance settings on viewports below ~1400px

Width control present

Screenshot 2024-05-29 at 3.24.17 PM.png (1×2 px, 827 KB)

disappears 10 pixels narrower

Screenshot 2024-05-29 at 3.24.39 PM.png (1×2 px, 961 KB)

User story

As a Wikipedia desktop reader, I want appearance settings to remain consistent regardless of my viewport size, and for settings to have appropriate system feedback when they don't apply.

Requirements

  • Width appearance setting remains persistent, regardless of viewport width
  • At viewport widths below ~1400px (need to find the exact value), width settings should remain visible and clickable
  • If a reader at the "standard" width setting clicks the "wide" option at a viewport width where that action would have no effect, show an exclusion notice that reads: "The content is as wide as possible for your browser window."
  • The notice should persist until the reader navigates to another page, clicks "Standard" again, or the session ends.

Requirement

Ensure that the width controls in the appearance settings of the Vector 2022 skin remain visible and usable regardless of viewport width. When the "wide" option is clicked and the viewport width is too narrow for it to have an effect, an exclusion notice should be displayed and persist until the reader navigates away, clicks "Standard" again, or the session ends. The specific text of the exclusion notice should be: "The content is as wide as possible for your browser window."

BDD

gherkin
Feature: Persistent Width Appearance Setting in Vector 2022

  Scenario: Ensure width appearance setting remains visible and clickable
    Given the user is viewing the appearance settings in Vector 2022
    When the viewport width is below 1400px
    Then the width appearance setting should remain visible and clickable

  Scenario: Show exclusion notice for non-functional "wide" setting
    Given the user is viewing the appearance settings in Vector 2022
    And the viewport width is below 1400px
    When the user clicks the "wide" option
    Then an exclusion notice should appear
    And the notice should read: "The content is as wide as possible for your browser window."
    And the notice should persist until the reader navigates to another page, clicks "Standard" again, or the session ends

Test Steps

Test Case 1: Ensure Width Appearance Setting Remains Visible and Clickable

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. AC1: Confirm that the width appearance setting remains visible and clickable.

Test Case 2: Show Exclusion Notice for Non-functional "Wide" Setting

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. Click the "wide" option.
  4. AC2: Confirm that an exclusion notice appears, reading: "The content is as wide as possible for your browser window."
  5. AC3: Confirm that the notice persists until the reader navigates to another page, clicks "Standard" again, or the session ends.

Design

  • Design requirements listed above. We need to wordsmith the exclusion notice text before this goes live.

image.png (1×1 px, 110 KB)

Technical notes

The requirement of only showing the notice when the user clicks a setting can be achieved with CSS. During estimation the team estimated the following implementation approach:

  • Always render the exception message in the template, but make it hidden by default
  • If the browser is at a certain resolution AND the the "wide" option is selected
  • Use an input:checked and sibling selector ~ to target the exception notice and make it visible.

note: This approach is dependent on DOM order, so for it to work, the exception notice must be a sibling of the radio input.

Acceptance criteria

  • Add acceptance criteria

Communication criteria - does this need an announcement or discussion?

  • Add communication criteria

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

This task was created by Version 1.0.0 of the Web team task template using phabulous

QA Results - PROD

Details

Related Changes in Gerrit:

Event Timeline

The thinking behind only showing the exception notice on click is as follows:

  • I assume a reader knows that the content is as wide as possible until they tell me otherwise
  • Clicking "Wide" implies that they want the content to be wider, which isn't possible. This necessitates system feedback letting them know that the action will take no effect.
  • We don't want to prevent them from changing the settings because doing so does not follow usability best practices (i.e. user control and freedom) and has created edge cases with poor usability (see T364015, T362911) in other contexts.

Discussed with @JScherer-WMF - we will continue with this ticket, but not make any changes to the default widths of any of the pages at this time.

bwang removed bwang as the assignee of this task.Jun 4 2024, 4:32 PM
bwang subscribed.

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

[mediawiki/skins/Vector@master] Add width exclusion notice

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

Jdlrobson subscribed.

Bernard just needs to add a test and this should then be good to go!

Change #1038867 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add width exclusion notice

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

Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

Test Steps

Test Case 1: Ensure Width Appearance Setting Remains Visible and Clickable

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. AC1: Confirm that the width appearance setting remains visible and clickable.

screenshot 105.mov.gif (900×1 px, 631 KB)

screenshot 104.mov.gif (900×1 px, 783 KB)

Test Case 2: Show Exclusion Notice for Non-functional "Wide" Setting

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. Click the "wide" option.
  4. AC2: Confirm that an exclusion notice appears, reading: "The content is as wide as possible for your browser window."

screenshot 106.mov.gif (900×1 px, 883 KB)

  1. AC3: Confirm that the notice persists until the reader navigates to another page, clicks "Standard" again, or the session ends.

The message doesn't persist if the user navigates to another page

screenshot 108.mov.gif (900×1 px, 597 KB)

screenshot 107.mov.gif (900×1 px, 2 MB)

Tested persistence again and the message persists (the case above was an edge case and expected)

Test Result - PROD

Status: ✅ PASS
Environment: PROD
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure Width Appearance Setting Remains Visible and Clickable

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. AC1: Confirm that the width appearance setting remains visible and clickable.

2024-06-14_09-49-07 (1).gif (987×2 px, 1 MB)

2024-06-14_09-54-16 (1).gif (1×1 px, 2 MB)

Test Case 2: Show Exclusion Notice for Non-functional "Wide" Setting

  1. Set the viewport width to below 1400px.
  2. Open the appearance settings in Vector 2022.
  3. Click the "wide" option.
  4. AC2: Confirm that an exclusion notice appears, reading: "The content is as wide as possible for your browser window."

2024-06-14_09-56-13 (1).gif (733×1 px, 1 MB)

  1. AC3: Confirm that the notice persists until the reader navigates to another page, clicks "Standard" again, or the session ends.

The message doesn't persist if the user navigates to another page- As expected per T366216#9883973

2024-06-14_09-58-01 (1).gif (633×1 px, 1 MB)

2024-06-14_10-00-22 (1).gif (420×690 px, 2 MB)