Page MenuHomePhabricator

Community configuration: Avoid registering multiple special pages
Closed, ResolvedPublic

Description

Problem description

As of now, Special:CommunityConfiguration consists of two separate special pages: SpecialCommunityConfigurationDashboard (which takes care of the dashboard) and SpecialCommunityConfigurationEditor (which renders the editor itself). This is not ideal, because even though the two special pages are registered as unlisted, they still appear in search results:

image.png (962�1 px, 123 KB)

Accessing Special:CommuityConfigurationDashboard directly might produce unexpected results, as it is not how the dashboard is meant to be accessed.

Solution

This approach was selected, as the Special:CommunityConfiguration page has several functions. Depending on how it is accessed, it might function either as the dashboard, or as an editor for a given configuration provider. Moreover, different configuration providers have different needs, and some might need more complex interfaces than others (see T358663). This means we need a solution that allows us to delegate nearly-complete control over the user interface to a different class.

I suggest introducing a concept of "editor capabilities", which would be classes that handle various capabilities Special:CommunityConfiguration might have. As of now, we'd have two: DashboardEditorCapability for the dashboard and GenericFormEditorCapability for the form itself.

Event Timeline

Restricted Application added a subscriber: Aklapper. View Herald Transcript

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

[mediawiki/extensions/CommunityConfiguration@master] Introduce editor capabilities

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

Change 1011916 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Introduce editor capabilities

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

Etonkovidova subscribed.

Checked in eswiki betalabs - works as expected (the test cases are added to

  • Special:CommuityConfigurationDashboard and other invalid pages - not listed in the search suggestions and No such special page is displayed
  • Special:EditGrowthConfig - redirects to Special:CommuityConfiguration
  • eswiki beta Special:SpecialPages does not list Special:EditGrowthConfigpage, but Special:CommunityConfiguration is not listed either

Added the above cases to T360971: [QA task] Community configuration test cases