Page MenuHomePhabricator

2️⃣ Only create autonames when needed (S)
Open, Needs TriagePublic

Description

Make sure the autoname is only created when needed (see list of checks below). Either as a check before getAutonamePrefixFromTemplate gets called, or in the method itself. This increases performance.

Checks \ Placesve.ui.MWCitationDialog.jsve.ui.MWReferenceDialog.jsve.dm.MWReferenceNode.js (copy paste&reuse dialog)
Name exists?https://gerrit.wikimedia.org/r/c/1359319https://gerrit.wikimedia.org/r/c/1359319✅ if ( ve.dm.MWReferenceKeyGenerator.isLiteralListKey( mainListKey ) )
Editing? ✅ if ( this.isEditing() )✅ if ( action === 'done' )- not needed
Uses template?Always uses template✅ if ( template ) ✅ if ( !template )
Reuse? https://gerrit.wikimedia.org/r/c/1359319https://gerrit.wikimedia.org/r/c/1359319✅ if ( !mainReuses OR mainReuses.length !== 2 ) {return;}
Is not subref content?Not needed always mainhttps://gerrit.wikimedia.org/r/c/1359319✅ Always uses main content via this.getInternalItem()

Event Timeline

gabriel-wmde renamed this task from Only create autonames when needed (S) to 2️⃣ Only create autonames when needed (S).Sep 30 2026, 8:28 AM
lilients_WMDE renamed this task from 2️⃣ Only create autonames when needed (S) to 3️⃣ Only create autonames when needed (S).Oct 6 2026, 9:02 AM
lilients_WMDE claimed this task.
lilients_WMDE renamed this task from 3️⃣ Only create autonames when needed (S) to Only create autonames when needed (S).Tue, Oct 20, 9:29 AM
lilients_WMDE updated the task description. (Show Details)
MareikeHeuerWMDE renamed this task from Only create autonames when needed (S) to Only create autonames when needed (S) 2️⃣.Mon, Oct 26, 8:38 AM
lilients_WMDE renamed this task from Only create autonames when needed (S) 2️⃣ to 2️⃣ Only create autonames when needed (S).Tue, Oct 27, 8:58 AM

Change #1359319 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Cite@master] Add "autoname exists" check to CitationDialog and ReferenceDialog

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

lilients_WMDE moved this task from Doing to Work Backlog on the WMDE-TechWish-Kanban board.
lilients_WMDE subscribed.

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

[mediawiki/extensions/Cite@master] Fix usage of mainListIndex when setting name prefix.

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

WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch moved this task from Doing to Tech Review (Limit 4) on the WMDE-TechWish-Kanban board.
WMDE-Fisch subscribed.

Change #1361933 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Fix usage of mainListIndex when setting name prefix.

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