[go: nahoru, domu]

Page MenuHomePhabricator

Newcomer tasks: hidden preference
Closed, ResolvedPublic

Description

We want our ambassadors to be able to test out newcomer tasks in production wikis before exposing it to all users. Since newcomer tasks won't have its own user preference option the way that help panel and homepage do, we want to make a hidden preference so that engineers can turn the feature on for specific users in specific wikis.

Event Timeline

@Catrope @Tgr -- this is the task I made for a hidden preference.

In other words, we want to extend $wgGEHomepageSuggestedEditsEnabled with a user preference. Presumably something like, if $wgGEHomepageSuggestedEditsEnabled is true or false, the preference has no effect; if it is null, the value of the preference is used instead.

(As an aside, what do you think about creating some minimal feature flag framework for tasks like this? I always found it strange that MediaWiki doesn't have anything like that, beyond the very limited BetaFeatures?)

How much hidden are we talking about here? Can those preferences at least be enabled using API?

We can make it public, as a sort-of Beta feature :

Capture d’écran_2019-10-31_10-36-15.png (180×653 px, 23 KB)

@Masumrezarock100 @Trizek-WMF -- thanks for asking about this. Since this is something we only want to do for testing purposes before releasing the feature, we didn't want to take on the work to add it to the preferences UI and translate its messages. How does that sound?

Makes sense to me. It's better to this after we release this feature.

Change 547705 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/GrowthExperiments@master] SuggestedEdits: Allow hiding behind a hidden preference

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

The attached patch adds $wgGEHomepageSuggestedEditsRequiresOptIn. By default it's set to false, which means all users get the suggested edits feature (current behavior). If it's set to true, only users who enable the preference get the suggested edits feature. The preference is currently hidden, but it could easily be made visible if we decide we want that (we'd just have to write a label for it and get it translated).

To enable the hidden preference, open the browser console and run new mw.Api().saveOption( 'growthexperiments-homepage-suggestededits', 1 ).done( function() { window.location.reload() } );

Change 547705 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] SuggestedEdits: Allow hiding behind a hidden preference

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

@Catrope - In order to test it - should $wgGEHomepageSuggestedEditsEnabled be set to false for, say, arwiki betalabs?

@Catrope - In order to test it - should $wgGEHomepageSuggestedEditsEnabled be set to false for, say, arwiki betalabs?

No, $wgGEHomepageSuggestedEditsEnabled should be kept as true, but $wgGEHomepageSuggestedEditsRequiresOptIn should be set to true. I'll enable that on Catalan beta.

Change 547855 had a related patch set uploaded (by Catrope; owner: Catrope):
[operations/mediawiki-config@master] GrowthExperiments: Require opt-in for suggested edits on arwiki beta

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

Change 547856 had a related patch set uploaded (by Catrope; owner: Catrope):
[operations/mediawiki-config@master] GrowthExperiments: Enable suggested edits, but as opt-in only

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

Change 547855 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Require opt-in for suggested edits on cawiki beta

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

Works on cawiki beatalbs. The Suggested edits module will be displayed when the following is pasted in the Console :

new mw.Api().saveOption( 'growthexperiments-homepage-suggestededits', 1 )
	.done( function() { window.location.reload() } );

I've added the task to my after-deployment checklist.

You need to right click on the screen and select "Inspect Element" then click on the Console tab in your browser. Then input

new mw.Api().saveOption( 'growthexperiments-homepage-suggestededits', 1 ).done( function() { window.location.reload() } );

And press "Enter".

Your browser should reload and you should see the suggested edits module.

Change 547856 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Enable suggested edits, but as opt-in only

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

Mentioned in SAL (#wikimedia-operations) [2019-11-08T00:19:17Z] <catrope@deploy1001> Synchronized wmf-config/InitialiseSettings.php: Enable suggested edits as hidden preference on arwiki, cswiki, kowiki, viwiki (T236968) (duration: 00m 53s)

This is working for me in production.