1 of 30

Community configuration: What happened in a year?

Martin Urbanec, Michael Große�Growth team, WMF�Wikimedia Hackathon 2024 – May 03, 2024

2 of 30

Agenda

  1. Motivation: Why Community configuration?
  2. Current status: Where are we at?
  3. Architecture: How does it work?
  4. Next steps
  5. Questions and answers

3 of 30

Motivation

Michael Große

01

4 of 30

Common complaints about WMF

  • The slow pace of software development
  • Insufficient transparency and communication
  • Lack of community involvement in decision making

5 of 30

It proved to work!

Arabic Wikipedia disabled a Newcomer task

Screenshot from Special:EditGrowthConfig in GrowthExperiments extension

6 of 30

It proved to work!

Swahili Wikipedia independently enabled Mentorship features

Screenshot from Special:EditGrowthConfig in GrowthExperiments extension

7 of 30

  • Previous examples are from config forms custom built into GrowthExperiments
  • How can other extensions benefit from this tool as well?
  • => CommunityConfiguration 2.0

8 of 30

Current status

Martin Urbanec

02

9 of 30

By Webysther - Sample from MediaWiki source code on GitHub., CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=56188328

Community configuration is now

a (working) MediaWiki extension!

10 of 30

Screenshot from Special:CommunityConfiguration (May 2024)

11 of 30

You can try it out!

Live in eswiki beta:

Special:CommunityConfiguration

https://s.wmcz.cz/cc-beta

12 of 30

We answered most of the open questions!

We now (mostly) know what we want CommunityConfiguration to be like.

13 of 30

Should all configuration be present in one place or one config per feature set?

14 of 30

Should communities be able to add their own fields to Community configuration (gadgets, user scripts, etc.)?

15 of 30

How to ensure config is always loaded from the correct place?

16 of 30

There are still some unanswered questions.

17 of 30

How to make Community configuration discoverable?

18 of 30

Architecture

Martin Urbanec

03

19 of 30

Modular architecture

  • Validator: ensures the configuration is valid
  • Store: persists the configuration
  • Configuration provider: groups validator and store together
  • Editing form: the user-visible component

20 of 30

Validator

  • Ensures configuration is valid
  • Provides information about recognized variables
  • Current implementation uses JSON schema for validation (represented as a PHP class, processed by Core’s ReflectionSchemaSource class)

21 of 30

Example schema

class ExampleSchema extends JsonSchema {

public const String = [

self::TYPE => self::TYPE_STRING

];

}

22 of 30

Editor form

By default: An editing form is automatically generated based on a JSON schema

Client extensions might introduce a new editor capability to replace the default logic with their own, to meet more complex needs.

23 of 30

Store

  • Persists the configuration.
  • Current implementation uses a JSON wiki page in�the MediaWiki: namespace

24 of 30

Configuration provider

  • Groups store and validator together, including parameters (extension.json)
  • Defines how store/validator communicate together (new providers can be registered via extension.json)

25 of 30

Provider in extension.json

"attributes": { "CommunityConfiguration": { "Providers": {

"HelpPanel": {

"store": {

"type": "wikipage",

"args": [

"MediaWiki:GrowthExperimentsHelpPanel.json"

]

},

"validator": {

"type": "jsonschema",

"args": [ HelpPanelSchema::class ]

},

"type": "mw-config"

}

}}}

26 of 30

Next steps

Michael Große

04

27 of 30

Production deployment

  • Migrating the existing CommunityConfig 1.0 in GrowthExperiments into CommunityConfiguration 2.0
  • Making that available to the community, in production

28 of 30

Defining stable interfaces

  • If other teams are using it, it has to be consistent
  • Defining a minimal set of essential interfaces as stable
    • Probably structure of provider config in extension.json and the JsonSchema base class
  • Document and publish

29 of 30

Supporting a first non-Growth extension

  • Support other teams on integrating CommunityConfiguration 2.0 into their extensions
  • Co-create guidelines on what configuration is suitable for CommunityConfiguration

30 of 30

Questions and answers

Slidedeck: https://s.wmcz.cz/wmhack24-cc�Homepage: https://s.wmcz.cz/cc-homepage �Contact: murbanec@wikimedia.org, mgrosse@wikimedia.org