Page MenuHomePhabricator

VisualEditor doesn't filter out deprecated template parameters
Closed, ResolvedPublic


Minor inconsistency between TemplateWizard and VE: VE shows and allows to use all parameters, even marked as deprecated in TemplateData, TemplateWizard doesn't do this. Ideally, they should have the same behavior, in my opinion, so this should be fixed.

Steps to reproduce:

  1. Go toИнкубатор:Песочница
  2. Edit with visual editor and try to insert a template called Iw
  3. Check if nocat and status parameters are available to use
  4. Do the same in TemplateWizard in Russian Wikipedia and see that deprecated parameters are unavailable to insert from the interface.


Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterExclude deprecated params from search list

Event Timeline

stjn created this task.Oct 24 2018, 9:42 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptOct 24 2018, 9:42 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
stjn updated the task description. (Show Details)Oct 24 2018, 9:44 PM

@stjn The question here is, is it a good idea to allow people to use deprecated parameters in the template knowing that they will be removed soon?

stjn added a comment.EditedOct 25 2018, 6:46 PM

I’m not sure of semantics of deprecated in TemplateData (AFAIK, there’s no concrete front-facing documentation on how these should be used, so no one on the projects really follows it), but it should at least be consistent across the platforms. If you think that TemplateWizard does a better job here then we need to ask VE team why they aren’t filtering deprecated parameters.

(I personally use deprecated for parameters that aren’t really OK to suggest in articles, but can’t be removed from template’s code since they can be used somewhere else.)

@stjn I found some documentation for deprecated here:

@Deskana Maybe you can provide information on why VE chooses to allow users to insert deprecated params and if TemplateWizard should follow suit? Thanks.

According to the documentation, "This is a status for parameters which should not be used any more." So the best thing to do would be to have VE filter them out, IMO.

kaldari renamed this task from TemplateWizard fails to show deprecated parameters, like VE does to VisualEditor doesn't filter out deprecated template parameters.Nov 16 2018, 6:46 PM
kaldari updated the task description. (Show Details)
Restricted Application added a project: VisualEditor. · View Herald TranscriptNov 16 2018, 6:46 PM
matmarex added a subscriber: matmarex.EditedNov 27 2018, 3:13 AM

Note that VE is aware of deprecated parameters, but all it does is display a little message about it in the help menu:

(In English, it says "Field is deprecated.", followed by the message defined in the TemplateData)

So it would probably be an easy change to not suggest display (when they are not already set) deprecated parameters. (Note that we would still allow adding deprecated parameters, as VE's template dialog allows adding any parameter, even if it's not defined in TemplateData.)

Deskana removed a subscriber: Deskana.Nov 27 2018, 12:33 PM
Esanders claimed this task.Dec 11 2018, 3:04 PM
Esanders moved this task from Incoming to In progress on the VisualEditor (Current work) board.

Change 478954 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Exclude deprecated params from search list

Change 478954 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Exclude deprecated params from search list

Esanders moved this task from Inbox to Low Priority on the Editing QA board.Dec 13 2018, 4:05 PM
Ryasmeen edited projects, added Verified; removed Editing QA.Jan 8 2019, 9:25 PM
Ryasmeen moved this task from QA to Product owner review on the VisualEditor (Current work) board.
marcella closed this task as Resolved.Jan 15 2019, 2:27 PM