Page MenuHomePhabricator

Make appearance menu persist
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

  • We want the appearance menu to persist across pages for both logged-out and logged-in users

User story

  • As a reader, I want the ability to set my appearance preferences once and then collapse the menu once I don't need it

Requirements

  • Menu state should persist across pageviews (i.e. if I collapse the menu as a logged-in or logged-out users and go to another page, the menu should keep the collapsed state)

BDD

Feature: Menu State Persistence Across Pageviews

  Scenario Outline: Menu state persistence for both logged-in and logged-out users
    Given the user <User_Status> logged into Wikipedia
    And the user <Menu_State> the menu on one page
    When the user navigates to another page
    Then the menu should remain <Menu_State>

    Examples:
      | User_Status | Menu_State |
      | is          | collapses  |
      | is not      | collapses  |
      | is          | expands    |
      | is not      | expands    |

Test Steps

Test Case 1: Menu State Persistence for Logged-Out Users (Collapsed)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC1: Confirm that the menu remains collapsed.

Test Case 2: Menu State Persistence for Logged-Out Users (Expanded)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC2: Confirm that the menu remains expanded.

Test Case 3: Menu State Persistence for Logged-In Users (Collapsed)

  1. Log into Wikipedia on a desktop computer.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC3: Confirm that the menu remains collapsed.

Test Case 4: Menu State Persistence for Logged-In Users (Expanded)

  1. Log into Wikipedia on a desktop computer.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC4: Confirm that the menu remains expanded.

Design

  • n/a

Acceptance criteria

  • Complete all requirements

Communication criteria - does this need an announcement or discussion?

  • n/a

QA Results - Beta

QA Results - PROD

Event Timeline

We didn't estimate this one as currently written since the engineers felt we needed more documentation around the current behaviour/design for this menu. (Does it currently work for logged out users? are we putting it in the "..." menu for anons? )

We weren't able to estimate this one as we had a number of questions about what it was referring to (sorry!)

@ovasileva a few questions when you have time:

  1. Is this specific to vector?
  2. What is the current behavior that needs to be updated?
  3. Does this include the work that has been discussed around where to pin the appearances menu for logged-out users?

We weren't able to estimate this one as we had a number of questions about what it was referring to (sorry!)

@ovasileva a few questions when you have time:

  1. Is this specific to vector?

Yes

  1. What is the current behavior that needs to be updated?

Currently, we're not saving the state of the menu across pages

  1. Does this include the work that has been discussed around where to pin the appearances menu for logged-out users?

No. This can be covered in a different ticket

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

[mediawiki/skins/Vector@master] Use client preferences for appearances menu

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

Just some technical follow-up notes:
Previously we were rendering pinned containers in the correct location server-side, now, due to the browser-based nature of client-preferences, we're moving the pinned container to either the pinned/unpinned container in the browser. With this update, I didn't notice any flash of unstyled content (because the appearance menu is rendered in the browser anyway) but there are still $this->isPinned properties in PHP that we should remove, and also rename the appearance menu to 'appearance menu' in the code instead of 'client preference menu' (the class .vector-feature-client-prefs-pinned-clientpref-1 is not great :P )

Change #1018793 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Use client preferences for appearances menu

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

Jdlrobson lowered the priority of this task from High to Medium.
Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

Test Steps

Test Case 1: Menu State Persistence for Logged-Out Users (Collapsed)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC1: Confirm that the menu remains collapsed.

screenshot 34.mov.gif (828×1 px, 1 MB)

Test Case 2: Menu State Persistence for Logged-Out Users (Expanded)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC2: Confirm that the menu remains expanded.

See AC1

Test Case 3: Menu State Persistence for Logged-In Users (Collapsed)

  1. Log into Wikipedia on a desktop computer.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC3: Confirm that the menu remains collapsed.

screenshot 36.mov.gif (580×1 px, 1 MB)

Test Case 4: Menu State Persistence for Logged-In Users (Expanded)

  1. Log into Wikipedia on a desktop computer.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC4: Confirm that the menu remains expanded.

See AC3

ovasileva raised the priority of this task from Medium to High.Apr 23 2024, 11:53 AM

Trying to test on beta today and the menu is no longer available for logged-out users.

Trying to test on beta today and the menu is no longer available for logged-out users.

@ovasileva a ticket is needed to enable the menu on anonymous users on beta cluster. We're currently disabled there.

Tested with url parameter. Looks good.

Test Result - Prod

Status: ✅ PASS
Environment: Prod
OS: macOS Sonoma 14.4.1
Browser: Chrome 124
Device: MBA
Emulated Device:NA

Test Artifact(s):

Test Steps

Test Case 1: Menu State Persistence for Logged-Out Users (Collapsed)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC1: Confirm that the menu remains collapsed.

2024-04-30_15-08-18 (1).gif (652×1 px, 3 MB)

Test Case 2: Menu State Persistence for Logged-Out Users (Expanded)

  1. Open Wikipedia on a desktop computer without logging in.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC2: Confirm that the menu remains expanded.

See AC1

Test Case 3: Menu State Persistence for Logged-In Users (Collapsed)

  1. Log into Wikipedia on a desktop computer.
  2. Collapse the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC3: Confirm that the menu remains collapsed.

2024-04-30_15-11-56 (1).gif (692×1 px, 3 MB)

Test Case 4: Menu State Persistence for Logged-In Users (Expanded)

  1. Log into Wikipedia on a desktop computer.
  2. Expand the menu on any page.
  3. Navigate to another page within Wikipedia.
  4. AC4: Confirm that the menu remains expanded.

See AC3