Spun out of T275807
Readers Web will be A/B testing the existing treatment of the language switcher and a new treatment being worked on as part of Desktop Improvements (Vector 2022). The initial cohort will be for logged-in users only
AC
- We should bucketed on a user's centralized ID (global ID) so that they remain consistently bucketed across sites (e.g. If I switch from English to French I should be bucketed the same)
- When I visit a wiki with the A/B test enabled, I receive either the existing treatment or the new one
- When I visit a wiki with the A/B test enabled and I have the magic query string parameter set then it should have the following effects:
Value | Effect |
---|---|
undefined | I'm entered into the A/B test and bucketed as usual |
control | I see the existing treatment |
A | I see the new treatment |
Developer Notes
- Bucketing should happen on the server side
- Would adding a class to the body tag to help with bucketing
- We should bucketed on a user's centralized ID (global ID) so that they remain consistently bucketed across sites…
This change be achieved with the following:
$lookup = CentralIdLookup::factoryNonLocal(); $id = null; if ( $lookup ) { $id = $lookup->centralIdFromLocalUser( $user ); } // The central ID lookup failed? if ( !$id ) { $id = $user->getId(); }
QA Steps
With Even Logged in User
- Visit https://patchdemo.wmflabs.org/wikis/51ef0c9126/wiki/Tree
- Login with username: alice and password patchdemo1
- In dev console, run mw.user.getId(); ensuring that user has an even user id.
- Assert that language button appears and languages do NOT appear in sidebar.
- Visit https://patchdemo.wmflabs.org/wikis/51ef0c9126/wiki/Tree?languageinheader=0
- Assert that languages appear in the sidebar and that the language button does NOT appear
With Odd Logged in User
- Visit https://patchdemo.wmflabs.org/wikis/51ef0c9126/wiki/Tree
- Login with username: bob and password patchdemo1
- In dev console, run mw.user.getId(); ensuring that user has an odd user id.
- Assert that languages appear in the sidebar and that the language button does NOT appear
- Visit https://patchdemo.wmflabs.org/wikis/51ef0c9126/wiki/Tree?languageinheader=1
- Assert that language button appears and languages do NOT appear in sidebar.
With Anonymous User (and languageinheader config off for anons)
- Logout and assert that you are an anonymous user.
- Visit https://patchdemo.wmflabs.org/wikis/51ef0c9126/wiki/Tree
- Assert that languages appear in the sidebar and that the language button does NOT appear
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T280825#7099839 |
2 | ✅ | T280825#7099839 |
3 | ✅ | T280825#7099839 |
4 | ✅ | T280825#7099839 |
5 | ✅ | T280825#7099839 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T280825#7146336 |
2 | ✅ | T280825#7146336 |
3 | ❌ | T280825#7146336 need more info |
4 | ✅ | T280825#7146336 |
5 | ✅ | T280825#7146336 |