Page MenuHomePhabricator

Provide custom editing interface for GrowthExperiments on-wiki configuration
Open, Needs TriagePublic

Description

Background

GrowthExperiments uses wiki pages in the MediaWiki: namespaces to configure certain things (example: cs:MediaWiki:NewcomerTasks.json). Besides keeping config files readable, in theory this provides community members the ability to maintain the configuration (which references community-maintained elements like template names). In practice, editing a JSON file with no help is hard enough that this feature is unlikely to be used.

Goal

We should provide a user-friendly form (as a special page, or maybe as a custom editor) for interacting with the page. This would allow administrators to interact with the configuration without having to know JSON syntax, provide documentation, ensure the configuration is valid, and provide autocompletion (i.e. for page URLs) where it makes sense.

In the long term this should replace the current deployment strategy: GrowthExperiments could be deployed to all wikis in a default, invisible mode, and communities will do self-serve deployments by updating the configuration accordingly.

See also T249987: Scale: GrowthExperiments wiki monitoring dashboard and T274009: Scaling: Open question: How should we deal with on-wiki configuration for dozens of wikis?.

Specifications

  • All on-wiki configurations should happen from a single Special page.
  • The configurations should not require any JSON editing -- they should be done through a form.
  • Only administrators or interface-admins should be allowed to edit the form. But all users should be allowed to view the form with its current values.
  • The form will need to support links to other pages where documentation will be kept, including a link to the actual configuration page, so that users of the form can find the edit history and Talk page.
  • The form should have a description at the top, where we can explain what it is for and how to use.
  • On the form, fields may need to be grouped, e.g. all fields relating to mentorship could be grouped under a "Mentorship" header.
  • Each field should have a place for a description, to explain to the volunteers what the configuration of that field does.
  • For certain fields that take pagenames, we should only allow users to enter real page names that exist.
  • The form should not update in realtime, but rather should update with a "Save" button.
  • The page should display a line that says who last edited the page, and when: "Last updated by User:XYZ on 2021-02-01 11:22:33".
  • The page should have an edit history page, with the ability for permissioned users to undo revisions.

Implementation notes

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hello! :) I don't know if this was discussed, but it's worth remembering that not everyone should be given the right to change the templates used.

It would be nice if this special page (assuming it's a special page) could also provide view access for people without edit rights. (Or maybe we just make a different page for that.) The idea being that there should be a way to see what configuration exists currently, and also when and how it changed.

In the interface for making changes, it could be nice if you could get real time feedback from specifying templates to use with suggested edits on how many tasks exist with that type of configuration and maybe also sample articles.

Hello! :) I don't know if this was discussed, but it's worth remembering that not everyone should be given the right to change the templates used.

Hi! For the record, we plan to give this capability to administrators (precisely, those having editinterface and editsitejson). Is that fine with you?

Change 667371 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] WIP: Introduce Special:EditGrowthConfig

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

Hello! :) I don't know if this was discussed, but it's worth remembering that not everyone should be given the right to change the templates used.

Hi! For the record, we plan to give this capability to administrators (precisely, those having editinterface and editsitejson). Is that fine with you?

Yes, that is fine with me :) Thank you!

Change 674414 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] WIP: Add WikiPageConfigValidation

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

Change 674414 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add WikiPageConfigValidation

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

Change 677916 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] WIP: Allow users to maintain help panel links from Special:EditGrowthConfig

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

Change 678319 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Allow users to manage GEHomepageSuggestedEditsIntroLinks in Special:EditGrowthConfig

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

Change 667371 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Introduce Special:EditGrowthConfig

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

Change 678319 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Allow users to manage GEHomepageSuggestedEditsIntroLinks in Special:EditGrowthConfig

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

Urbanecm_WMF added a subscriber: Etonkovidova.

This can now be QA'ed.

@Etonkovidova The feature is scheduled to ride the wmf.2 train (ie. next week). Since it touches pretty much all our features, regressions can appear anywhere :/.

For @Urbanecm_WMF review. The items without marks - they'll need more time to check (or haven't been checked yet at all). I checked only few configs and will test more. So far, the actual functionality works without any issues. Great work!

Please take a look at the following notes. You may simply dismiss them since they, in my opinion, do not impact the functionality enough to justify immediate work.
(1)

  • Only administrators or interface-admins should be allowed to edit the form. But all users should be allowed to view the form with its current values.

Users, aside from Administrators, will only the warning message on the Special:EditGrowthConfig.


(2)

  • The form will need to support links to other pages where documentation will be kept, including a link to the actual configuration page, so that users of the form can find the edit history and Talk page.

The link to MediaWiki:GrowthExperimentsConfig.json is present. Should there be some other documentation links?

For @Urbanecm_WMF review. The items without marks - they'll need more time to check (or haven't been checked yet at all). I checked only few configs and will test more. So far, the actual functionality works without any issues. Great work!

Happy to hear that! Thanks for the tests.

Please take a look at the following notes. You may simply dismiss them since they, in my opinion, do not impact the functionality enough to justify immediate work.
(1)

  • Only administrators or interface-admins should be allowed to edit the form. But all users should be allowed to view the form with its current values.

Users, aside from Administrators, will only the warning message on the Special:EditGrowthConfig.

Good point. I'll work on that next week, hopefully.

(2)

  • The form will need to support links to other pages where documentation will be kept, including a link to the actual configuration page, so that users of the form can find the edit history and Talk page.

The link to MediaWiki:GrowthExperimentsConfig.json is present. Should there be some other documentation links?

Yes, but I have to write the docs first :). Thanks for the reminder!

Change 679922 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Allow users to return back to form on success

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

Change 679922 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Allow users to return back to form on success

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