Page MenuHomePhabricator

Improvements for featured templates' CommunityConfiguration form
Closed, ResolvedPublic

Description

A number of small improvements can be made to the CommunityConfiguration form used for featured templates:

Event Timeline

nb. warning:

 [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes. 
  at <ObjectControl uischema= {scope: '#/properties/FeaturedTemplates/0', name: 'FeaturedTemplates', required: false, type: 'Control', label: null, } schema= {type: 'object', properties: {}, required: Array(1)} renderers= (12) [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  ... > 
  at <DispatchRenderer class="ext-communityConfiguration-ArrayControl__item-wrapper__item" schema= {type: 'array', default: Array(0), items: {}} uischema= {scope: '#/properties/FeaturedTemplates/0', name: 'FeaturedTemplates', required: false, type: 'Control', label: null, } > 
  at <CdxField id="FeaturedTemplates" status="default" messages= {}  ... > 
  at <ArrayControl uischema= {scope: '#/properties/FeaturedTemplates', name: 'FeaturedTemplates', required: false, type: 'Control', label: null, } schema= {type: 'array', default: Array(0), items: {}} renderers= (12) [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}] > 
  at <DispatchRenderer key="FeaturedTemplates-0" schema= {$schema: 'https://json-schema.org/draft-04/schema#', $id: 'MediaWiki/Extension/TemplateData/Schemas/FeaturedTemplatesSchema/1.0.0', additionalProperties: false, required: Array(0), type: 'object', } uischema= {scope: '#/properties/FeaturedTemplates', name: 'FeaturedTemplates', required: false, type: 'Control', label: null, } > 
  at <FormLayout schema= {$schema: 'https://json-schema.org/draft-04/schema#', $id: 'MediaWiki/Extension/TemplateData/Schemas/FeaturedTemplatesSchema/1.0.0', additionalProperties: false, required: Array(0), type: 'object', } uischema= {elements: Array(1)} > 
  at <JsonForm config= {i18nPrefix: 'communityconfiguration-templatedata-featuredtemplates', i18nMessages: {}, feedbackURL: null, canEdit: true, namespaceSelectorOptions: {}, } data= {FeaturedTemplates: Array(1)} renderers= (12) [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  ... > 
[...]

Change #1165895 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@master] [WIP] ext.templateData.templateDiscovery: Prevent multiple 'titles' elements

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

KSiebert changed the task status from Open to In Progress.Jul 16 2025, 9:40 AM

I think there are a whole bunch of missing i18n messages for the form:

  • communityconfiguration-summary
  • communityconfiguration-templatedata-featuredtemplates-info-text
  • communityconfiguration-templatedata-featuredtemplates-featuredtemplates-label
  • communityconfiguration-templatedata-featuredtemplates-featuredtemplates-description
  • communityconfiguration-templatedata-featuredtemplates-featuredtemplates-titles-label
  • communityconfiguration-templatedata-featuredtemplates-featuredtemplates-titles-description

See the qqx docs for more, e.g.: https://www.mediawiki.org/wiki/Special:CommunityConfiguration/TemplateData-FeaturedTemplates?uselang=qqx

I also wonder if it mightn't be better to change the schema to be an array of titles, rather than an array of a single object with a titles key, i.e.

"FeaturedTemplates": [
	"Template:Template one",
	"Template:Template two"
]

Rather than the current:

"FeaturedTemplates": [
	{
		"titles": [
			"Template:Template one",
			"Template:Template two"
		]
	}
]

Because then each template would be a separate text field, rather than them all being inside one MultiselectLookup field.

Change #1177983 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Featured templates: add messages, and set max/min field count

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

Samwilson renamed this task from Improvements for CommunityConfig form to Improvements for featured templates' CommunityConfiguration form.Sep 22 2025, 12:29 AM
Samwilson updated the task description. (Show Details)

Change #1177983 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Featured templates: add messages, and set max/min field count

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

Samwilson updated the task description. (Show Details)

I think the changes here will be QA'd as part of other tasks. Resolving this.

Change #1165895 abandoned by Samtar:

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Prevent multiple 'titles' elements

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