Page MenuHomePhabricator

Make it possible to declare a Community configuration provider that does not display on the dashboard
Closed, ResolvedPublic2 Estimated Story Points

Description

In MediaWiki-extensions-CommunityConfiguration, we should allow client extensions to define a configuration provider that is not displayed on the dashboard (Special:CommunityConfiguration). This can be handled by a flag within the provider descriptor in extension.json. Allowing opting-out from the form is important to support providers that deliberately do not have a form, such as https://www.mediawiki.org/wiki/MediaWiki:NewcomerTopicsOres.json (which is technically a CommunityConfiguration, but it can be edited only via raw JSON).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
KStoller-WMF set the point value for this task to 2.Apr 2 2024, 4:05 PM

Change #1017036 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/extensions/CommunityConfiguration@master] Filter dashboard providers based on displayOnDashboard flag

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

Change #1017036 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Filter dashboard providers based on skipDashboardListing flag

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

@Cyndymediawiksim - to test should I try to add some providers to extension.json? And where (in what json file) can I see which providers are present now?

@Etonkovidova, yes you can add providers to an extension.json file. In the CommunityConfigurationExample, a provider FooBar is declared. Some other providers are also declared in GrowthExperiments' extension.json file. To test, you would need to add the "skipDashboardListing": true flag to each provider you do not want to be seen on the dashboard. Like so :

"Providers": {
				"FooBar": {
					"store": {
						"type": "wikipage",
						"args": [
							"MediaWiki:ExampleConfig.json"
						]
					},
					"validator": {
						"type": "jsonschema",
						"args": [
							"CommunityConfigurationExample\\Schemas\\ExampleSchema"
						]
					},
					"type": "mw-config",
					"skipDashboardListing": true
				}
			}

Based on the task description, it sounds like we will want to have an schema for representing NewcomerTopicsOres.json? Is this correct @Urbanecm_WMF ?

Thanks, @Cyndymediawiksim! All works as expected - I added "skipDashboardListing": true to CommunityConfigurationExample - "CCExample background color" is not displayed:

Screen Shot 2024-04-26 at 11.44.10 AM.png (1×3 px, 311 KB)

"skipDashboardListing": false will bring back "CCExample background color"