Page MenuHomePhabricator

Full community configuration support for suggested edits
Open, MediumPublic

Description

Community configuration allows tweaking various parameters of the existing suggested edits task types, but it doesn't allow creating new task types. This wouldn't make sense for structured tasks, but for template-based ones it would be very useful, especially for non-Wikipedias where the existing task types aren't really applicable (cf. T284485: Think about Growth features being used by non-Wikipedias), but it would also be valuable for Wikipedia communities willing to experiment.

The code was written with this kind of extensibility in mind so this shouldn't be too hard. What's needed to happen:

  • check that the configuration loader and search system, the growthtasks API, the filtering UI and the task card UI all handle new task types (in theory they should but we never tested)
  • same for logging/statsd (we might want to have a shared statsd bucket for all custom task types)
  • modify task validation logic; currently TaskTypeHandler::validateTaskTypeObject() will fail if the relevant UI messages aren't defined, and that just breaks suggested edits completely
  • link to the relevant UI messages in Special:EditGrowthConfig
  • support community configuration for the guidance panel
  • support arbitrary template-based task types in Special:EditGrowthConfig

The config page support seems the trickier part - the usual UX for this is one where you can add/remove form rows, but MediaWiki's PHP form framework doesn't support that. Either we drop PHP support and do it on the frontend, or maybe we could provide a button for deleting each task type, an empty field for adding a new task type, and some mechanism for sorting task types within a difficulty level.

We should probably also add an option to disable the fake "Create a new article" task type, and make the task type defaults (ie. new users starting with copyedit+links enabled) configurable.

A low-effort version would be not adding any UI. New task types would be an advanced feature then, only available via direct JSON editing.

Event Timeline

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

How would we handle instrumentation for community created task types?

Good question. In EventLogging the task type is an arbitrary string so I don't think any changes would be needed. For statsd we'd want to avoid having an unbounded set of keys so we could probably bucket them all into a custom pseudo-type?

MMiller_WMF lowered the priority of this task from High to Medium.Oct 11 2021, 2:28 AM
Tgr updated the task description. (Show Details)

Related, can probably be included here: support task types not existing on some wikis:

  • treat the default template-based task types as disabled in ConfigurationLoader when no templates are defined for them (which will basically mean they will be missing from the configuration entirely)
  • check ConfigurationLoader::getTaskTypes in SuggestedEdits::isEnabledForAnyone and treat the feature as disabled if there are no task types available
  • in Special:EditGrowthConfig, show a warning if the task type is enabled (and is template based) and the template list is empty, explaining that this task type is effectively disabled
Urbanecm_WMF changed the task status from Open to In Progress.Jan 31 2022, 11:32 AM

No activity on this in a while, moving off the current sprint board and we can revisit later.

Urbanecm_WMF changed the task status from In Progress to Open.Jun 13 2022, 5:23 PM