Page MenuHomePhabricator

QA: TemplateWizard
Closed, ResolvedPublic

Description

Creating this task for QA for TemplateWizard (TW). I did not (to my own surprise) have a place where how everything worked from the user perspective was listed so I'm putting it down here for everyone, including QA.

Design spec is in T190348

  • TW only works in the standard wikitext editor. The icon is the OOUI puzzle piece icon.
  • Clicking on the puzzle piece gives the user a dialog where the user can either:
    • Choose to click on the help link which takes them to the help page in a new tab.
    • Start typing a template name which prompts a dropdown that contains template names with the template description (which is fetched from TemplateData)
  • Once the user clicks on a template name from the dropdown, they are taken into the editor window.

In the editor window:

  • There is a header with the template name, description, link to the template and an icon to delete the template which takes the user back to the previous screen.
  • On the left, the parameters are divided into Required, Suggested and Optional sections (again, this data comes from TemplateData)
  • The Required parameter fields are automatically added to the right panel.
  • The user can click on fields on the left to add them to the right. The field icon changes from a blue plus sign to a red minus sign.
  • The user can click on the field again to remove them from the right.
  • The user can click the info icon on a field that has a description in templatedata to see the description in a popup
  • The user can add all the parameters to the right by clicking Add all paramters (T194436)
  • The user can remove all the parameters (except for the required ones) by clicking the same button again (T194436)
  • If there are no fields, we give the user a message: T198927
  • Default text from Templatedata is shown as placeholder (Example text if no default): T191268 (and comments)
  • Auto-value text from TemplateData is pre-populated in the field when the user adds it.
  • There are several overlays the user can see:
    • When they try to remove/delete a template that contains data in any field (T190231)
    • When they try to hit cancel with any field in the template (T190231)
    • When they try to enter data in a field that doesn't match the expected data format for that field (also set in templatedata) (T191264)
  • The template (with the fields the user selected to be in the right panel) gets inserted into the editor when the user hits Insert. The template is formatted according to the formatting picked in templatedata (inline, block etc.). The cursor is at the end of the inserted template.

Event Timeline

Niharika triaged this task as Medium priority.Aug 29 2018, 12:10 AM
Niharika created this task.

@Etonkovidova This is all yours to grab. I made a ticket with checkboxes because @Mooeypoo said you liked those! :)
Let me know if anything is missing here. I'm sure I missed somethings. The extension should be available on all beta cluster wikis. The messages may not all be translated yet.
Not many templates on beta have TemplateData so you might wanna add it to some templates for your testing. If you need help with TemplateData, I'd be happy to give you show you some examples and point you to docs.

(Need to re-check) (1) The list of suggestions when 'Cite' search term is entered includes reference to a template page that does not exist in betlabs:

Screen Shot 2018-08-30 at 10.52.28 AM.png (466×757 px, 67 KB)

টেমপ্লেট:উদ্ধৃতি
Screen Shot 2018-08-30 at 11.05.47 AM.png (438×1 px, 118 KB)

(Re-check in testwiki) (2) In production template data (i.e. template description ) is placed on a subpage - e.g. https://en.wikipedia.org/wiki/Template:Cite_book/TemplateData. Since template description comes form Template data, the Template Wizard suggestion list will be fine?
Another example - https://en.wikipedia.org/wiki/Template:Track_listing#TemplateData - the link there will refer to just Wikipedia:TemplateData page.

(the solution will be based on community reaction) 3) When a user enters incorrect data format VE will give a plenty of warning, but with TemplateWizard the template will be just accepted.

Checked for the following requirements:

Default text from Templatedata is shown as placeholder (Example text if no default): T191268 (and comments)
Auto-value text from TemplateData is pre-populated in the field when the user adds it.

There are minor issues that could be specific to TWTest template - @Niharika, please take a look to decide which of them need to be followed-up:
(1) clicking on info icon and when it opens, scrolling down will add some vertical and horizontal scrolling inside the box and eventually a blank box will be displayed:

Screen Shot 2018-09-04 at 3.17.16 PM.png (268×471 px, 21 KB)

Screen Shot 2018-09-04 at 3.16.24 PM.png (391×768 px, 62 KB)

Screen Shot 2018-09-04 at 2.37.12 PM.png (285×725 px, 48 KB)

(2) The last parameter info cannot be viewed:

Screen Shot 2018-09-04 at 2.40.15 PM.png (606×789 px, 106 KB)

(3) Windows Edge17 does not display info icons:

Screen Shot 2018-09-04 at 3.08.21 PM.png (533×615 px, 88 KB)

(4) TWTest 'age' field does not have validation. Is it just for the test?

Screen Shot 2018-09-04 at 3.08.21 PM.png (533×615 px, 88 KB)

@Etonkovidova For #2, which browser do you see this on? I see this:

image.png (250×892 px, 29 KB)

It flips upwards if there isn't any space below but it doesn't flip if it's already open though. I see this on Safari.

For #4, yeah it's only on test. That is a numerical input so it can accept negative numbers. Hopefully users don't use it for fields like age in actual templates. I put it in there only for testing purposes.

I've filed tickets T203559: [BUG] Field info popups get weird if user scrolls while popup is open and T203564: [BUG] Windows Edge 17 and IE11 do not display info icons for the other two issues.

@Etonkovidova For #2, which browser do you see this on? I see this:

image.png (250×892 px, 29 KB)

It flips upwards if there isn't any space below but it doesn't flip if it's already open though. I see this on Safari.

I re-checked it - and yes, the issue seems to be limited only to TWTest template and it happens only to that template only in Chrome, which makes this bug essentially invalid.

I also found a curios case in betalabs when attempting to insert template CURRENTISOYEAR which is listed in suggestions, makes the template popup non-interactive when each click produces the following error in the Console:

Uncaught TypeError: Cannot read property 'focus' of undefined
  at mediaWikiTemplateWizardTemplateForm.mediaWiki.TemplateWizard.TemplateForm.afterAttached
  at mediaWikiTemplateWizardDialog.mediaWiki.TemplateWizard.Dialog.showTemplate
  at mediaWikiTemplateWizardSearchForm.mediaWiki.TemplateWizard.SearchForm.showTemplate
  at mediaWikiTemplateWizardSearchField.mediaWiki.TemplateWizard.SearchField.onLookupMenuItemChoose 
  at OoUiMenuSelectWidget.oo.EventEmitter.emit 
  at OoUiMenuSelectWidget.OO.ui.SelectWidget.chooseItem
  at OoUiMenuSelectWidget.OO.ui.MenuSelectWidget.chooseItem
  at OoUiMenuSelectWidget.OO.ui.SelectWidget.onMouseUp

Screen Shot 2018-09-06 at 2.30.29 PM.png (421×738 px, 47 KB)

Screen Shot 2018-09-06 at 9.27.38 AM.png (567×751 px, 38 KB)

I could not find another example of such template - so, if this issue is an issue specific to betalabs setup - it can be ignored.

Nice catch, @Etonkovidova. I can replicate it on beta labs with other templates without any parameters but I cannot replicate it on testwiki. So it seems like the problem is specific to beta labs.

Whoops, it looks like we may have overlooked the focus when there are no fields. I opened this T203722: TemplateWizard: Only fallback to focus on 'add all' button if it actually exists to follow up.

@Etonkovidova Moriel fixed the bug you found above with TemplateWizard becoming unresponsive with blank templates (T203722). Can you still reproduce it?

Thanks Elena! :) This was super useful.