Page MenuHomePhabricator

CentralNotice: test registration
Closed, ResolvedPublic1 Story Points

Description

Add API methods for registering tests and retrieving a list of tests registered, and sending them via /beacon/impression

Details

Related Gerrit Patches:
mediawiki/extensions/CentralNotice : wmf_deployext.centralNotice.display: API for registering tests
mediawiki/core : wmf/1.28.0-wmf.3Update CentralNotice submodule
mediawiki/extensions/CentralNotice : masterext.centralNotice.display: API for registering tests
mediawiki/extensions/CentralNotice : wmf_deployext.centralNotice.display: API for registering tests

Related Objects

Event Timeline

AndyRussG created this task.May 3 2016, 5:28 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 3 2016, 5:28 PM
Pcoombe added a subscriber: Pcoombe.May 3 2016, 6:01 PM
AndyRussG claimed this task.May 3 2016, 8:01 PM
AndyRussG set the point value for this task to 1.

Quick question @DStrine and @AndyRussG : do we have an idea on when this task will be done?
The reading team should have their deployments needed out by May 26th [https://phabricator.wikimedia.org/T132604] and just wanted to check if we'll be able to get this task ready before that?

Thank you!

Change 290361 had a related patch set uploaded (by AndyRussG):
ext.centralNotice.display: API for registering tests

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

awight added a subscriber: awight.May 24 2016, 10:01 PM

The only gotcha I've noticed so far is that the mediaWiki.centralNotice.registerTest call can't happen until the ext.centralNotice.display module is loaded, but needs to come before we call recordImpression. The easiest workaround might be to call registerTest from a legacy alterImpressionData hook.

That involves putting something like this in the banner body:

<script>
mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {
    mediaWiki.centralNotice.registerTest( (MYCONDITION ? 'caseA' : 'caseB') );

    return true;
};
</script>

Also, it's a bit difficult to send around testing links because any "banner=" parameter will cause recordImpression not to fire.

Change 290361 merged by jenkins-bot:
ext.centralNotice.display: API for registering tests

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

Thanks for the change! When should we expect this to be deployed? Just want to know when I can start working on T134291.

Change 291118 had a related patch set uploaded (by Awight):
ext.centralNotice.display: API for registering tests

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

Change 291120 had a related patch set uploaded (by Awight):
Update CentralNotice submodule

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

Change 291118 merged by jenkins-bot:
ext.centralNotice.display: API for registering tests

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

Example campaign configuration:
https://meta.wikimedia.org/w/index.php?title=Special:CentralNotice&subaction=noticeDetail&notice=fr_tech_T134286
Example banner:
https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/fr_tech_T134286
Project URL to see the banner:
http://aa.wikibooks.org/

If you're using a browser that displays sendbeacon requests, you should be able to see the testIdentifiers parameter go out.

If the feature turns out to be broken after deployment, it's unused so can remain deployed broken as long as it doesn't cause any JavaScript console messages.

Change 291120 merged by jenkins-bot:
Update CentralNotice submodule

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

Ejegg added a subscriber: Ejegg.May 27 2016, 1:35 AM

@Pcoombe this is ready to play with on production! Also, reading web informs me that there's a new mw.config var: 'PopupsExperiment' that's true when the hovercards are shown on a page.

This caused T136387 and the production deployment was just reverted.

DStrine triaged this task as High priority.May 27 2016, 3:53 PM

Change 292367 had a related patch set uploaded (by AndyRussG):
ext.centralNotice.display: API for registering tests

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

Change 292367 merged by jenkins-bot:
ext.centralNotice.display: API for registering tests

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

Pcoombe closed this task as Resolved.Jun 14 2016, 9:24 PM

Confirmed this appears to be working as expected. Thanks!

mmodell removed a subscriber: awight.Jun 22 2017, 9:50 PM