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:
- They enabled ReadingLists as a beta feature (e.g. on test.wikipedia)
- 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
- 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:ReadingListsTest Steps
Test Case 1: Verify feature activation via experiment preference
- Log in to the wiki using Vector 2022.
- Set hidden preference readinglists-web-ui-enabled to true.
- Assign the user to the experiment treatment group we-3-3-4-reading-list-test1.
- Visit an article page.
- AC1: The ReadingLists bookmark icon is visible in the toolbar.
- AC2: The user can open and view Special:ReadingLists.
Test Case 2: Verify activation via BetaFeatures
- Enable ReadingLists from BetaFeatures (e.g., on test.wikipedia).
- Visit an article page using Vector 2022.
- AC3: The ReadingLists bookmark icon appears.
- 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
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T405294#11325956 |
| 2 | ✅ | T405294#11325956 |
| 3 | ✅ | T405294#11325956 |
| 4 | ✅ | T405294#11325956 |

