Page MenuHomePhabricator

Add TemplateData means to appropiate namespaces for using a template (Don't suggest "meta" templates on articles)
Open, LowPublic

Description

Intention:
I wanted to help a new user to find a template to add a reference to an article.

Steps to Reproduce:

  1. The user was already using Visual Editor. So, suppose we clicked in the link

https://pt.wikipedia.org/wiki/Special:Random?veaction=edit&uselang=en

  1. I instructed the user to open the transclusion interface (More > Transclusion)
  2. Since I knew the name of our citation templates, I suggested the user to type "citar livro" in the "New template" field

Actual Results:
Visual Editor displayed a list of possible matches, containing the following templates:

  • Citar livro
  • Citar livro/doc
  • Citar livro/autor
  • Citar livro/coautores
  • Citar livro/dados
  • Citar livro/coautores/doc
  • Citar livro/ref

Of these, only the first one is supposed to be used in the articles. The others are just auxiliary templates (meta-templates), used by the main one. But new users do not know that, and get confused by this!

Expected Results:
Visual Editor should provide only the options which are useful.

Reproducible: Didn't try

A possible solution for this would be the addition of a new property to the template data, to allow template authors to document certain templates with "auxiliary: true". Then Visual Editor could filter its current search results to show only templates satisfying "auxiliary: false".


Version: unspecified
Severity: enhancement

Details

Reference
bz56516

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:32 AM
bzimport set Reference to bz56516.
He7d3r created this task.Nov 2 2013, 4:55 PM
Krinkle removed a subscriber: Krinkle.Oct 9 2017, 9:20 PM
Deskana lowered the priority of this task from Medium to Low.May 3 2018, 8:15 AM

Not exactly. If we were to have a way to mark a template as "meta" (e.g. "only use inside another template, not on articles"), we could not use that technique to hide "/doc" from the list of templates because the "/doc" page is transcluded to the actual template, and thus would always have the same TemplateData properties.

Krinkle renamed this task from VisualEditor: In transclusion dialog, only suggest templates intended for use in that namespace (e.g. suppress meta-templates from content namespaces) to Add TemplateData means to appropiate namespaces for using a template (Don't suggest "meta" templates on articles).Jul 14 2018, 11:03 PM
Krinkle added a project: TemplateData.
Krinkle added subscribers: TheDJ, Wostr, Whatamidoing-WMF and 5 others.
stjn added a subscriber: stjn.Jul 14 2018, 11:59 PM