Page MenuHomePhabricator

Make ReadingLists available on web for users in experiment (with hidden preference)
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently, the ReadingLists feature (bookmark icon/button and special page) are available via BetaFeatures. (on wikis that have the beta feature setup).

We need to adjust the code to make ReadingLists available on web for users in experiment (with hidden preference).

The user can see the ReadingLists bookmark icon if:

  1. They enabled ReadingLists as a beta feature (e.g. on test.wikipedia)
  2. They have the hidden preference set: readinglists-web-ui-enabled AND are in the treatment group for the experiment we-3-3-4-reading-list-test1
  3. They are using the desktop site and skin Vector 2022

Requirements

  • The hidden user preference exists
  • There is logic that activates the feature for people in the experiment treatment group

BDD

Feature: Enable ReadingLists for experiment treatment group

  Scenario: User meets experiment conditions
    Given I am logged in and using Vector 2022 on desktop
    And I have the hidden preference `readinglists-web-ui-enabled` set to true
    And I am assigned to the treatment group for `we-3-3-4-reading-list-test1`
    When I visit any article page
    Then I can see the ReadingLists bookmark icon
    And I can access Special:ReadingLists

  Scenario: User has BetaFeature enabled
    Given I am logged in and have ReadingLists enabled in BetaFeatures
    When I visit any article page using Vector 2022
    Then I can see the ReadingLists bookmark icon
    And I can access Special:ReadingLists

Test Steps

Test Case 1: Verify feature activation via experiment preference

  1. Log in to the wiki using Vector 2022.
  2. Set hidden preference readinglists-web-ui-enabled to true.
  3. Assign the user to the experiment treatment group we-3-3-4-reading-list-test1.
  4. Visit an article page.
  5. AC1: The ReadingLists bookmark icon is visible in the toolbar.
  6. AC2: The user can open and view Special:ReadingLists.

Test Case 2: Verify activation via BetaFeatures

  1. Enable ReadingLists from BetaFeatures (e.g., on test.wikipedia).
  2. Visit an article page using Vector 2022.
  3. AC3: The ReadingLists bookmark icon appears.
  4. AC4: Special:ReadingLists is accessible.

Notes for implementation


to support the hidden preference:

in extension.json add

"DefaultUserOptions": {
	"readinglists-web-ui-enabled": "0"
},

In HookHandler, add check that the preference is enabled:

$this->userOptionsLookup->getOption( $user, Constants::PREF_KEY_WEB_UI_ENABLED ) === '1';

And here is an example of how to add the experiment check, from ReaderGrowth:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReaderExperiments/+/1187912

QA Results - Prod

Event Timeline

aude triaged this task as High priority.Sep 22 2025, 10:37 PM
aude updated the task description. (Show Details)
aude moved this task from Incoming to Needs refinement on the Reader Experience Team board.
aude set the point value for this task to 3.Sep 23 2025, 3:00 PM
aude moved this task from Needs refinement to Ready for sprint on the Reader Experience Team board.

Change #1194745 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Add check for readinglists-web-ui-enabled hidden preference

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

Change #1194745 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add check for readinglists-web-ui-enabled hidden preference

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

Change #1196069 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Limit ReadingLists bookmark to users in experiment or enabled with beta features

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

@Edtadros this will be QAed next sprint as it's not completely done nor testable yet.

Change #1198124 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/WikimediaEvents@master] Add comment to note the experiment name is used in the ReadingLists extension

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

Change #1196069 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Limit ReadingLists bookmark to users in experiment or enabled with beta features

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

Change #1198124 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Add comment to note the experiment name is used in the ReadingLists extension

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

Edward, no need to run QA on this until after morning of Wed Oct 29 after test script is run by Steph and Katie.

This comment was removed by Edtadros.

Test Result - Prod

Status: ✅ PASS
Environment: testwiki
OS: macOS Tahoe 26.x
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Verify feature activation via experiment preference

  1. Log in to the wiki using Vector 2022.
  2. Set hidden preference readinglists-web-ui-enabled to true.
  3. Assign the user to the experiment treatment group we-3-3-4-reading-list-test1.
  4. Visit an article page.
  5. AC1: The ReadingLists bookmark icon is visible in the toolbar.
  6. AC2: The user can open and view Special:ReadingLists.

screenshot 148.mov.gif (1×1 px, 1 MB)

Test Case 2: Verify activation via BetaFeatures

  1. Enable ReadingLists from BetaFeatures (e.g., on test.wikipedia).
  2. Visit an article page using Vector 2022.
  3. AC3: The ReadingLists bookmark icon appears.
  4. AC4: Special:ReadingLists is accessible.

screenshot 149.mov.gif (1×1 px, 764 KB)

Jdrewniak claimed this task.