https://bugzilla.wikimedia.org/show_bug.cgi?id=37616

--- Comment #5 from Matthias Mullie <[email protected]> 2012-06-18 11:50:49 
UTC ---
I've got a few ideas:

1/ Prerequisite: update config $wmgArticleFeedbackv5BlacklistCategories to also
include the whitelisted AFTv4 categories.
Whitelisted AFTv4 articles should always show AFTv4 form, even if they're in
AFTv5 lottery. So we should AFTv5 blacklist the AFTv4 whitelisted entries to
make sure they're not shown twice.

2/ Since AFTv5's check is now in PHP (as well), we can manipulate more data. We
could, on applicable pages winning AFTv5 lottery, clear out the AFTv4 lottery,
like this (in beforePageDisplay() in ArticleFeedbackv5.hooks.php):
    // disable older AFT versions by making the odds 0 (for this request)
    $out->addJsConfigVars( 'wgArticleFeedbackLotteryOdds', 0 );
Disadvantage: we have to wait until the page's cache has been rebuilt

3/ Once we're certain that AFTv5 can be loaded (in JS), remove the elements
added by AFTv4, like this:
    var removeAft = function() {
        $aft = $( '#mw-articlefeedback' );
        if ( $aft.length > 0 ) {
            $aft.remove();
        } else {
            clearInterval( removeAftInterval );
        }
    }
    var removeAftInterval = setInterval( removeAft, 100 );
Disadvantage: it ain't pretty since we're allowing AFTv4 to first add itself
and then remove parts of it. AFTv4 binds aren't removed, etc...


I'd suggest to add in all 3, and after 30 days (when cache should be fully
rebuilt) remove 3/ again. This should make sure that cache does not affect our
code (option 3/) and our codebase remains "clean" (removing 3/ after 2/ has
been picked up)
Any suggestions/remarks on above idea?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to