Page MenuHomePhabricator

1️⃣ Community Configuration: Enable admins to turn on the new Visual Editor auto-generated reference names for their wikis (M)
Open, Needs TriagePublic

Description

This task defines how communities will get the new naming scheme that replaces ':n'.

We will create a community configuration page for this task that holds a simple 'checkbox' or similar to turn on the feature. The setting can only be edited and saved by community admins.

With this approach, communities would be able to turn on the feature themselves as they please and when they are ready. It enables them to decide whether

This means that the old naming pattern :n will continue to live on some wikis as long as this feature has not been enabled.

Design and copy for Community Configuration page

Name of spcecial page to be used in dashboard: Special:CommunityConfiguration/VisualEditor-ReferenceNames

Link for help button (if possible all links should open in a new window/tab):
https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Cite/VisualEditor_reference_names

Designs

Teaser on Community Configuration Page

image.png (1,918×1,480 px, 295 KB)

User not logged-in
image.png (1,468×1,900 px, 339 KB)

Admin logged-in

image.png (1,468×1,716 px, 302 KB)

Copy

Please use the text below for the copy. Do not use the text in the designs. The designs solely demonstratem the UX elements, formatting, and style.

Updated teaser for the Community Configurations dashboard
VisualEditor content-based reference names
Enable VisualEditor’s content-based reference names to replace the :n pattern with your custom style.

Copy (incl. links and wikitext translation strings):

Content-based reference names make it possible for VisualEditor to generate meaningful and human-readable automatic reference names.

When enabled, content-based reference names replace the current default <code>:n</code> pattern. For more information see the [[mw:Special:MyLanguage/Help:Cite/VisualEditor reference names|help page]].

VisualEditor automatically generated reference names can be customized in two different ways.


[Checkbox Copy: Enable this feature and replace the current <code>:n</code> pattern]

Templates

Create a custom naming template that defines the template parameters, such as author and publication year, to generate the reference names (e.g. <code><ref name="Miller-1998-1"></code>).

Citation Type Names
Create a new <code>-autoname</code> message key to replace default names with alternative strings (e.g. replacing <code>{{int:Cite-ve-dialogbutton-reference-title}}-</code> with <code>reference_</code> or <code>reference</code> generates <code><ref name="reference_1"></code> or <code><ref name="reference1"></code> instead of <code><ref name="{{int:Cite-ve-dialogbutton-reference-title}}-1"></code>).

These two options can be configured outside of this page, some character and customization limitations apply. For more information see the [[mw:Special:MyLanguage/Help:Cite/VisualEditor reference names|help page]]. 


Default Behavior
If you choose not to customize your own templates or citation type names, automatic reference names based on the citation type, such as <code>{{int:Visualeditor-cite-tool-name-book}}-1</code>, <code>{{int:Visualeditor-cite-tool-name-web}}-1</code> will be generated.

If no citation type can be determined based on [[MediaWiki:Cite-tool-definition.json]], references are named <code>{{int:Cite-ve-dialogbutton-reference-title}}-1</code>, <code>{{int:Cite-ve-dialogbutton-reference-title}}-2</code> etc. Numbering starts at 1 and increments each time a citation type is reused (e.g. a second book citation would appear as <code><ref name="{{int:Visualeditor-cite-tool-name-book}}-2"></code>).

Figma Mockup
https://www.figma.com/design/Lw4FjvOo02EE5LHJjEvGD7/-TW-26--Visual-Editor----Autonames--Named-References-?node-id=7027-51889&t=Fp4AOkFVZkHFOeIr-1

Open tasks

Outcome

We decided for a shorter version to allow cleaner technical implementation and better maintainability. This leads to less flexibility regarding the help text on the config page. The help text is on now mainly on a wiki page with way more context and flexibility.

Screenshot from 2026-10-08 10-47-40.png (1,880×801 px, 133 KB)

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Some observations:

  1. I'd recommend to drop the "new" from "VisualEditor new content-based reference names" in the community config overview (screenshot). Because right now it's new, but is it still new in 2027? or when we introduce more improvements?
  2. The texts are a mixture of instructions ("Create a custom naming template ...", "Define a separate name") and a description of behavior. I'd recommend a short paragraph (1-2 sentences) outlining the 3 behaviors - autoname from cite template content, autoname prefix from citation template, default autoname prefix - and then adapting the headlines to these behaviors. That will avoid the impression that the admins have to follow *all* instructions and make it more clear that they will get immediate benefit even if they don't create templates or translation overrides.
  3. "Define a separate name" ... doesn't tell how to define, I'd prefer "Use the Mediawiki: namespace to define a separate name ..." or "Use the (Interface Translation feature)(link_to_help_page) to define a separate name".
  4. As long as increment 2 is not fully implemented, we could hide the "autoname from cite template content".

Change #1339028 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Adding i18n texts for the autoname community configuration

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

Change #1339028 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Adding i18n texts for the autoname community configuration

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

Change #1339724 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] [WIP] CommunityConfig page for VisualEditor Reference AutoNames

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

Test wiki created on Patch demo by Christoph Jauera (WMDE) using patch(es) linked to this task:
https://71ba5846f0.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Christoph Jauera (WMDE) using patch(es) linked to this task was deleted by Christoph Jauera (WMDE) via DeleteWikis-SingleDelete:

https://71ba5846f0.catalyst.wmcloud.org/w/

Change #1344602 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] Add feature flag for Visual Editor autonames Community Config

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

Change #1344602 abandoned by Mareike Heuer:

[mediawiki/extensions/Cite@master] Add feature flag for Visual Editor autonames Community Config

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

Change #1345495 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Renaming message keys to fit community conf schema

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

Change #1345495 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Renaming message keys to fit community conf schema

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

Change #1339724 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] CommunityConfiguration page to enable better autonames in Cite VE

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

^ that was reverted because it broke CommunityConfiguration's CI, and thus a bunch of other extensions.

1) ResourcesTest::testMissingMessages
11:56:51 Message 'communityconfiguration-editor-client-data-submission-error' required by 'ext.cite.community-configuration-autoname' must exist

Change #1345853 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] Add a placeholder for missing message

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

Change #1345853 abandoned by Awight:

[mediawiki/extensions/Cite@master] Add a placeholder for missing message

Reason:

not needed

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

lilients_WMDE renamed this task from Community Configuration: Enable admins to turn on the new Visual Editor auto-generated reference names for their wikis to Community Configuration: Enable admins to turn on the new Visual Editor auto-generated reference names for their wikis (M).Tue, Sep 29, 9:34 AM

Change #1346005 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] CommunityConfiguration for better autonames in Cite VE (Resubmit)

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

gabriel-wmde renamed this task from Community Configuration: Enable admins to turn on the new Visual Editor auto-generated reference names for their wikis (M) to 1️⃣ Community Configuration: Enable admins to turn on the new Visual Editor auto-generated reference names for their wikis (M).Wed, Sep 30, 8:36 AM

Change #1346088 had a related patch set uploaded (by Gabriel Birke; author: Gabriel Birke):

[mediawiki/extensions/Cite@master] Refactor RL module loading in CiteHooks

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

Change #1345997 had a related patch set uploaded (by Svantje Lilienthal; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Only load community config module when enabled

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

Stalled because:
Since we have a very detailed help page now, and all other community config pages use the generic editor capability, should we discuss our current approach again? It's unnecessarily complicated. We think the new help page makes the current content on the autonames configuration page obsolete. And this would enable a much easier implementation and follow current standards that all other community config pages follow.

Change #1348716 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] Use generic CommunityCOnfig editor for AutoNames

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

Change #1345997 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Only load community config module when enabled

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

Change #1346088 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Refactor RL module loading in CiteHooks

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

Change #1346005 abandoned by WMDE-Fisch:

[mediawiki/extensions/Cite@master] CommunityConfiguration for better autonames in Cite VE (Resubmit)

Reason:

Replaced by I303fdf12816ae24d15a69b7ff9e7cb04a72bd835

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

Stalled because:
Since we have a very detailed help page now, and all other community config pages use the generic editor capability, should we discuss our current approach again? It's unnecessarily complicated. We think the new help page makes the current content on the autonames configuration page obsolete. And this would enable a much easier implementation and follow current standards that all other community config pages follow.

Responding here, too, for the sake of transparency: yes, agreed! Thank you making this suggestion.

Change #1348716 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Switch to CommunityConfiguration to enable better autonames in Cite VE

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

Change #1353131 had a related patch set uploaded (by WMDE-Fisch; author: Mareike Heuer):

[mediawiki/extensions/Cite@wmf/1.47.0-wmf.23] Switch to CommunityConfiguration to enable better autonames in Cite VE

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

Change #1353131 merged by jenkins-bot:

[mediawiki/extensions/Cite@wmf/1.47.0-wmf.23] Switch to CommunityConfiguration to enable better autonames in Cite VE

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

Mentioned in SAL (#wikimedia-operations) [2026-10-12T07:40:10Z] <wmde-fisch@deploy1003> Started scap sync-world: Backport for [[gerrit:1353131|Switch to CommunityConfiguration to enable better autonames in Cite VE (T436255)]]

Mentioned in SAL (#wikimedia-operations) [2026-10-12T07:59:47Z] <wmde-fisch@deploy1003> wmde-fisch: Backport for [[gerrit:1353131|Switch to CommunityConfiguration to enable better autonames in Cite VE (T436255)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-10-12T08:12:43Z] <wmde-fisch@deploy1003> Finished scap sync-world: Backport for [[gerrit:1353131|Switch to CommunityConfiguration to enable better autonames in Cite VE (T436255)]] (duration: 32m 32s)

Change #1354362 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Remove code tags in CommunityConfig checkbox label

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

Change #1354362 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Remove code tags in CommunityConfig checkbox label

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