Page MenuHomePhabricator

Placeholder ticket for Templates investigations: featured templates
Closed, ResolvedPublic8 Estimated Story Points

Description

Following you can find open questions to investigate besides the general investigation on the topics mentioned below. The questions will be further added as UX is moving on with the prototyping.

Investigate on Featured Templates

  • Why is the Template Wizard differently set up in Visual editor and Source Editor?

Event Timeline

thiemowmde set the point value for this task to 13.
thiemowmde changed the point value for this task from 13 to 8.Feb 19 2020, 11:26 AM
TemplateWizard

@Hanna_Petruschat_WMDE, I was not able to find documentation for this, but as far as I remember the MediaWiki-extensions-TemplateWizard and the identical feature in VisualEditor are two entirely independent products. I recall somebody talking about how it was not possible to extract the feature from the VE codebase. Instead, the decision was made to start coding it from scratch, obviously copying what already existed in VE.

I'm surprised to learn that the UX of the two is so different. This raises quite some questions we should ask the responsible WMF team:

  • How are the two products related?
  • Why are they so different?
  • Which of the two is more relevant? Essentially, on which of the two should we focus our efforts?
  • Is there a plan to unify the diverging UX, and when?
Template documentation

Essentially what TemplateData supports, see https://www.mediawiki.org/wiki/Extension:TemplateData#Format. It looks like not all of these possibilities are currently incorporated in the VE UX.

@thiemowmde Thanks for the investigation.

I'm surprised to learn that the UX of the two is so different. This raises quite some questions we should ask the responsible WMF team:

Would you close this at this point and wait for insights from the WMF? I think it would make sense to get a closer look at both features and get familiar with what they are capable of.
The target group for this prototype are more in the VE environment. So if you would need to shosse which one to look in first, I would argue for the VE version. This will also help for the prototype of better labels and help messages, which will be the third one to build.

Could you also take a closer look at the featured articles and/or featured lists pages and see which technical possibilities and restrictions we will find there?
E.G. could we introduce some kind of filters in the pages which only allow to show certain paragraphs/section or could we have a searchfield only searching in the page?

Regarding the template documentation:
Thanks for the link. I will figure out which things relate to which element in the UI and might come back to you with open questions.

Thank you!

TemplateWizard

I checked, and the "template wizard" feature in VisualEditor is not called a "wizard". The literal name in the code is MWTemplateDialog (public name of the main class), or VeUiMWTemplateDialog (internal name), or visualeditor-dialog-transclusion (prefix of all messages). I suggest to use a wording like "the template wizard feature in VE" or "VE's template dialog" to not create to much confusion.

Most of VE's template dialog code is from 2014, while MediaWiki-extensions-TemplateWizard is from 2018.

It appears like we should assume TemplateWizard will replace VE's template dialog, and therefor focus on TemplateWizard. But we don't know if and when this will happen.

Featured articles

These pages are (from the code's perspective) mostly unstructured wikitext pages. One possibility to add features to a page like this (e.g. filters) is by creating a JavaScript Gadget that's enabled by default. However, this is fragile, because it depends on HTML maintained by the community, and any user editing the page can potentially break it. Instead, I have a special page in mind where only the content can be edited by the community, but the HTML can not (or is just in a different place and not so easy to break). The resulting page might look identical to how the "featured" pages look right now.

As of now, the only way to search these pages is by using the browsers "find in page" (Ctrl+F), or by adding something like this at the top of the page:

<inputbox>
type=fulltext
searchbuttonlabel=Search featured articles
break=no
prefix=WP:Featured articles
</inputbox>

This search box will create results like this: https://en.wikipedia.org/wiki/Special:Search?fulltext=1&prefix=WP:Featured_articles&search=nature

Template documentation we (can) have according to the TemplateData specification:

  • Plain text description of a template
  • Machine-readable information which template parameters belong together
  • For each parameter:
    • Label
    • Description
    • A single example for the parameter value
    • Documentation of the default behavior a parameter will have if it's not filled
    • If a UI should suggest the parameter to be filled

Other details that are not really "documentation", but change the behavior of the interface:

  • A type, e.g. "date", "url", or "string"
  • If a parameter is required

@thiemowmde Thanks a lot!

Do we also know things like "technical" category of a template, e.g. if it's an infobox or a navbox or so on?
Do we have an exemplary screenshot of a certain template?
Next to parameter labels, descriptions and aliases, is there anything alike for the template itself? e.g. name, description, tags/aliases?

Answers, in order:

No, no "technical" categories. Only the manually curated [[Category:…]] lines in the template. These are not machine-readable. We would need to manually map these categories, and redo this mapping for every wiki.

No. It might be possible to come up with something that automatically creates screenshot. But no, doesn't exist at the moment.

There is only the literal name of the template, and the description provided via TemplateData. Oh, and the template page itself, but that's a wiki page we can only link to, not reuse. Alias names for templates exist in some wikis. Technically, these are realized as page redirects. The German community dislikes these, so there are typically none.

awight renamed this task from Placeholder ticket for Templates stuff in sprint 2020-02-19 to Placeholder ticket for Templates stuff in sprint 2020-03-04.Mar 4 2020, 10:49 AM
awight subscribed.

Moving to demo as we're iterating on minor refinements to the answers, as far as I see. Feel free to move again!

TODO: the template categorization question would fit into this task.

I wrote a longer mail about template categorization. Summary: I suggest to use the existing category tree for templates that's already maintained by the communities:

These trees might miss a lot of templates, but I believe it's safe to assume that:

  • The good templates we are interested in are already categorized.
  • The community will add more categories the moment they become more visible in a "featured templates" interface.
thiemowmde claimed this task.
thiemowmde moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-03-04 board.

Relevant data collection documents:

Thanks for listing it @thiemowmde . The feature doc can be found here:

Lena_WMDE renamed this task from Placeholder ticket for Templates stuff in sprint 2020-03-04 to Placeholder ticket for Templates investigations: featured templates.Mar 18 2020, 11:09 AM
Lena_WMDE updated the task description. (Show Details)

@thiemowmde @Lena_WMDE

I'm surprised to learn that the UX of the two is so different. This raises quite some questions we should ask the responsible WMF team:

  • How are the two products related?
  • Why are they so different?
  • Which of the two is more relevant? Essentially, on which of the two should we focus our efforts?
  • Is there a plan to unify the diverging UX, and when?

I think before going any further with the current prototype we need clear answers to these questions. In my research so far it is clear that the two are related but the TemplateWizard already has many of the improvements we are proposing (autocomplete for wiki page names, autocomplete for files from Commons, date picker).

Before investing more time in the VE version/dialog, we should get confirmation that this is not being phased out in favor of the TemplateWizard (would this even be possible?).

There are also some WMF backlog tickets addressing other features we planned to add: