Page MenuHomePhabricator

Show date and reason (if present) in citation needed edit suggestion
Open, In Progress, Needs TriagePublic

Assigned To
Authored By
Esanders
Jul 10 2026, 9:42 PM
Referenced Files
Restricted File
Thu, Aug 6, 11:43 PM
Restricted File
Thu, Aug 6, 11:43 PM
Restricted File
Thu, Aug 6, 11:43 PM
Restricted File
Thu, Aug 6, 11:43 PM
Restricted File
Thu, Aug 6, 11:43 PM
F92849384: image.png
Jul 10 2026, 9:43 PM
F92849266: image.png
Jul 10 2026, 9:42 PM

Description

The citation needed context shows a date and/or reason if they are present:

image.png (434×241 px, 27 KB)

We should show this info in the footer of the citation needed edit suggestion too, although this will require some refactoring to avoid duplicating a lot of logic.

image.png (714×488 px, 126 KB)

Event Timeline

Change #1309791 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/VisualEditor@master] Editcheck: Show date and reason in citation needed edit suggestion

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

Zaidusyy changed the task status from Open to In Progress.Sun, Jul 12, 12:21 AM

Change #1310536 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/Cite@master] VE: Extract description rendering into static method

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

Change #1313946 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/VisualEditor@master] Extract getCanonicalParam into a static method

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

Change #1313946 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Extract getCanonicalParam into a static method

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

Change #1310536 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] VE: Extract description rendering into static method

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

Change #1309791 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Editcheck: Show date and reason in citation needed edit suggestion

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

EAkinloose subscribed.

Works as expected.

Non-blocking comment
One template related bit I found

If required flied is empty and user applies that anyway, template is populated with "({{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}})" in place of an absent date -> {{cn|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}} on source editor. VE screenshots(prod but I successfully reproduced in enbeta) below:
{F97435211}
{F97435433}
{F97435474}
from {F97436286} to {F97436013}

In another case({{ </nowiki>{{echo|}}), I get a suggestion informing me of the missing required fields.

In another case,

Thanks for testing this so thoroughly, @EAkinloose

That empty-date case where it fills in date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}} happens when the template gets inserted, which is a different code path from what this task changed. My patches here only display the existing date and reason in the suggestion footer, so it looks separate rather than something they introduced.

Do you think this is worth tracking in a separate task?