Page MenuHomePhabricator

Add a easy list for most common templates on VisualEditor
Closed, DuplicatePublic


When we click in the insert template button we get a white pop-up where we must figure out what the correct template is. In Basque wikipedia we are using a reduced automatic templates system, so it would be very useful to have them listed just below, so you can click them and choose.

Event Timeline

Most useful infoboxes:

  • {{biografia infotaula automatikoa}}
  • {{artelan infotaula automatikoa}} < for artworks
  • {{Eraikin infotaula automatikoa}} < buildings
  • {{Hiri orokor infotaula}} < cities
  • {{Probintzia orokor infotaula}} < administrative units up from cities
  • {{taxotaula automatikoa}} < taxobox

I think for a first pass on this we can allow wikis to define a list of most common templates on wiki, e.g.

  "Biografia infotaula automatikoa",

This could then be fetched by the template dialog and show in the space below the search input:

image.png (508×516 px, 32 KB)

In the future we would probably want to make this more flexible, such as by grouping templates together, e.g.

    "group": "Infoboxes",
    "templates": [
      "Biografia infotaula automatikoa",

which would necessitate a slightly more complex UI.

I think the first one would work.

For anyone interested working on this, the code would go in ve.ui.MWTemplatePlaceholderPage, and would need to do the following:

  1. Fetch the JSON data for the local wiki using mw.message, see ve.ui.Citoid.init.js for an example of this.
  2. Get the template descriptions for the listed templates using the API, see the request that the search box uses
  3. Append a list of mw.widgets.TitleOptionWidgets to the page

I'll give my eternal reconnaissance as a community member to whoever achieves that task. This is something we miss since a while on French Wikipedia.

Also, that task is probably a duplicate of T96710: Per-wiki customizable drop down menu for templates.

@Trizek-WMF it is similar, but this would be adding the most usual ones, as we are working with 6 automated templates that are highly used.

I think T96710 is asking for a similar feature, but adding buttons to the toolbar, not the template dialog.

Change 510943 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Allow popular templates to be listed in the template dialog

Just simplified all the artworks templates into one!