Page MenuHomePhabricator

Provide custom editing interface for GrowthExperiments on-wiki configuration
Closed, ResolvedPublic

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

There are a very large number of changes, so older changes are hidden. Show Older Changes

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.

Screen Shot 2021-04-14 at 6.14.12 PM.png (437×876 px, 69 KB)

(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.

Screen Shot 2021-04-14 at 6.14.12 PM.png (437×876 px, 69 KB)

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

@Urbanecm_WMF

  • MediaWiki:GrowthExperimentsConfig.json page when "Edit source" clicked, brings Special:EditGrowthConfig which is really convenient.
  • the invalid user input is handled quite well

Minor issues
(1)

  • 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 implemented timestamp e.g. Last updated by ET13 2 minutes and 14 seconds ago. might be more difficult for translating

(2) When a page loads, non-JS UI is displayed:

Screen Shot 2021-04-16 at 5.31.01 PM.png (679×864 px, 60 KB)

(3) When a namespace is included into both - "Namespaces with Help Panel enabled in reading mode" and "Namespaces with Help Panel disabled", the "Namespaces with Help Panel disabled" will supersede. so if "User talk" is entered as in the screenshot, the Help panel won't be present on "User talk" pages.

Screen Shot 2021-04-16 at 5.57.02 PM.png (198×778 px, 27 KB)

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

[mediawiki/extensions/GrowthExperiments@master] Decouple validation from UI definition

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

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

[mediawiki/extensions/GrowthExperiments@master] Validate in WikiPageConfigWriter rather than in Special:EditGrowthConfig

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

Change 681112 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Validate in WikiPageConfigWriter rather than in Special:EditGrowthConfig

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

Change 681115 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Decouple validation from UI definition

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

Change 677916 merged by jenkins-bot:

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

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

This is actually in progress (implementing the rest of the features).

@Urbanecm_WMF -- I created this spreadsheet listing the desired copy for the form. It contains all the existing copy in one column, and the desired copy in the other. I also indicate what order the elements should be in, and there's a notes column.

In terms of the ordering of the sections themselves, I think it should be this:

  1. Newcomer homepage
  2. Mentorship
  3. Suggested edits
  4. Help panel settings
  5. Help panel links

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

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfig: Reorder configuration fields

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

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

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Change messages

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

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

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Add explanatory messages to sections

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

@Urbanecm_WMF -- I created this spreadsheet listing the desired copy for the form. It contains all the existing copy in one column, and the desired copy in the other. I also indicate what order the elements should be in, and there's a notes column.

In terms of the ordering of the sections themselves, I think it should be this:

  1. Newcomer homepage
  2. Mentorship
  3. Suggested edits
  4. Help panel settings
  5. Help panel links

Thanks for the spreadsheet! I uploaded patches to edit the form according to the reqirements, and moved this task to Code Review. Once merged, it will be possible to test them in beta labs.

Change 691158 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfig: Reorder configuration fields

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

Change 691163 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Change messages

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

Change 691165 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Special:EditGrowthConfig: Add explanatory messages to sections

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

@MMiller_WMF The patches should soon arrive to the beta cluster, and will ride the next weeks train as well.

I suggested a couple of small improvements in the messages text:

currentsuggestedexplanationpatch
Copy editing: templates to find articles that need copy editing, spelling, grammar, punctuation improvements.Copy editing: templates to find articles that need copy editing, such as spelling, grammar, and punctuation improvements.My suggestion reads as a more complete sentence.patch
Links: templates to find articles that need more wikilinks.Links: templates to find articles that need more links.All the other messages say just "links" and not "wikilinks".patch

Links: templates to find articles that need more links.

About links, may be: Links: templates to find articles that need more links to another articles? Or smth else. It seems to me that it is necessary to clarify what kind of links.

When Special:EditGrowthConfig will be available for all wikis where Growth features are deployed, it should be announced in Tech/News.

When Special:EditGrowthConfig will be available for all wikis where Growth features are deployed, it should be announced in Tech/News.

This should now be ready to announce, right? Or did we announce it through some other task already?

Boldly closing, as we rely on this feature now. There are some tasks for improvements left, but overall, the feature works as intended.