Jump to content

Talk:Community Tech/Template wizard

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 5 years ago by George Ho in topic Available as a beta feature

Social concern

[edit]

This problem pertains specifically to english Wikipedia, but we've had a number of disputes in the past and still have in the present about which articles receive an infobox and which ones don't. There are very vocal people on both sides of the discussion and we've had long edit wars and disputes about infoboxes. I am concerned that enabling such a wizard on enwiki will aggravate the problem by facilitating unilateral insertions of infoboxes in places or amounts that will be controversial. Jo-Jo Eumerus (talk, contributions) 10:28, 7 January 2018 (UTC)Reply

One vision for this feature is that it'll be pretty much like the existing template-insertion feature of Visual Editor, and so shouldn't really introduce any extra infobox spam (this won't make it any easier than it already is). I guess that depends on whether people inserting unwanted infoboxes are using VE or the standard editor. Sam Wilson 02:27, 9 January 2018 (UTC)Reply
Based on the edit histories, most of them don't use VE so yes it would introduce extra potentially problematic infoboxes. Jo-Jo Eumerus (talk, contributions) 10:08, 9 January 2018 (UTC)Reply

Search feature

[edit]

The proposed solution in wishlist survey says "This search will allow you to browse the infoboxes (search by title or category) ...". The search feature in Visual Editor ("Insert Template" function) allows only the search by title. Many users doesn't know the exact name of the template to insert (possible synonyms, abbreviations, etc...) so, in my opinion, a search by category feature is very useful. For example possibly categories can be style‎, task or topic; after the first choise the user can be navigate in subcategories, in a tree model, until he find the wanted template. The main problem, I think, is how every wiki can be defines the own top categories. I hope I was clear enough, otherwise ping me :) --β16 - (talk) 09:10, 25 January 2018 (UTC)Reply

Perhaps we can find common ground for these categories, e.g. 'style' is d:Q8095468 and is present on quite a few Wikipedias (and some other projects, which sounds a bit peculiar!). I'm not sure what the best 'general' solution for this is though; or is it enough to have pre-defined categories? Sam Wilson 06:05, 26 January 2018 (UTC)Reply
What would also help, is if it searched not only by title, but also by TemplateData description. —TheDJ (talkcontribs) 09:10, 10 April 2018 (UTC)Reply
At least there would have to be a link to w:Category:Wikipedia templates below the "Select a template" line (in the englisch wikipedia, in other wikipedias the link would have to be adapted to the equivalent page of the wiki). --X black X (talk) 23:42, 29 April 2018 (UTC)Reply

Comment

[edit]

You might want to note somewhere on the page that the script works in the visual editor, but not in the wikicode editor. But after I realised that, I tested it with a Wikidata-driven infobox, and it seemed to work well. Thanks. Mike Peel (talk) 02:17, 17 March 2018 (UTC)Reply

I think you are mistaken. This specific templatewizard works with WikiEditor, not VE. VE has its own inbuilt TemplateWizard. The wish on the survey was to bring that functionality to WikiEditor.
It's a user-script currently so you'd have to follow the instruction here to enable it. Once you do that, you will see an icon in the toolbar which will open the wizard. Let me know if it doesn't work. Thanks. -- NKohli (WMF) (talk) 20:09, 17 March 2018 (UTC)Reply
@NKohli (WMF): Aah, I see, thanks! Sorry for misunderstanding. I've now found it in the wikitext editor. It might be useful to have a screenshot here pointing to where the icon is located. Trying my test again, I see that it adds a new line before the closing }}'s, it would be good if that could be avoided if there are no required parameters for the template. Thanks. Mike Peel (talk) 22:50, 18 March 2018 (UTC)Reply
@Mike Peel: What template did you test with? The formatting of the inserted template text is left up to individual templates to define in their TemplateData: they can either be 'inline' (no new lines), 'block' (all parameters on their own lines), or a custom format. The one you're testing may well be adding its own new line at the end. Sam Wilson 22:46, 19 March 2018 (UTC)Reply
@Samwilson: That may well be it. I don't use TemplateData since it doesn't support Wikidata mapping. The template I tried it with is en:Template:Infobox telescope, where the formatting is 'unspecified'. Thanks. Mike Peel (talk) 22:56, 19 March 2018 (UTC)Reply

Tracked in Phabricator:
Task T190123 @Mike Peel: It looks like wikipedia:Template:Infobox_telescope/doc#Template_Data uses 'block' formatting, which adds a newline after every parameter value and puts the closing }} on its own line, even if there are no parameters. This is also how the template inserter in VisualEditor does it. I reckon it'd make sense for TemplateWizard to revert to 'inline' formatting when there are no parameters; @NKohli (WMF): what do you think? Sam Wilson 00:20, 20 March 2018 (UTC)Reply

Enabled or disabled by default?

[edit]

Can the wizard feature be enabled or disabled by default? I've been wiki-coding instead for anything, like template transcluding (if not writing). I don't know how many people would enable or disable the feature, but I would predict 5,000+ or 10,000+ enabling the feature, compared to other gadgets/features. The change from "Infobox wizard" to "Template wizard" seems to make itself more like a successor to ProveIt, isn't it? --George Ho (talk) 19:30, 17 March 2018 (UTC)Reply

I don't have a lot of experience with ProveIt but that's for reference templates only, correct? This will work for all templates which have TemplateData tags, which most templates on major projects do. We were planning to enable it by default for everyone because there's not much of a cost to doing that, in terms of JavaScript being added. It will live as an icon on WikiEditor toolbar. How does that sound? Is there a case for not making it enabled by default? Note that VE has its own inbuilt version of this which you might have seen under the "Insert" menu. -- NKohli (WMF) (talk) 20:17, 17 March 2018 (UTC)Reply
Not related to the Template wizard, but I have disabled Enhanced Toolbox for months because I've never used any buttons other than the signature button. Since I disabled Enhanced Toolbox in many wiki projects, I have instead used the other signature button containing ~~~~ (tildes). Back to the subject, I've never experienced Infobox/Template wizard; I've never used VisualEditor for it's too buggy and in still the beta/experiment version. Even when the consensus favors adding the feature, they didn't say enable it by default. However, being technically and/or financially inexpensive is an inadequate reason for enabling it by default.

I have a case for not enabling it by default. Doing so without knowing how many would enable the wizard is too soon and contrary to what the community wants and/or needs. Does the consensus/community want the wizard enabled by default? That's something that you should ask the communities first, including English Wikipedia community, before enabling it by default. Otherwise, first, once implemented, we should figure out the statistics of enabling it if disabled by default. If the numbers are good enough, then enabling the wizard by default can be considered.

Furthermore, the infobox debates have been subject to ArbCom cases, like one ongoing. This proves that communities are divided over infoboxes for years.

As for ProveIt, 15,000+ currently enable the gadget; in addition, 1000+ users enable the classic version of ProveIt. On the contrary, there are 1.4 million+ autoconfirmed users and almost 40,000+ extended-confirmed users, including active and very active editors. Well, ProveIt gadget is undoubtedly useful, but not everyone else uses and/or enables it. Same could be said for the wizard, especially if it can include other templates, like reference templates.

By the way, the change from "Infobox wizard" to "Template wizard" was a surprise (to me). I'm unsure whether the community approves the recent change, but I don't mind the scope expansion. --George Ho (talk) 21:11, 17 March 2018 (UTC)Reply

Almost forgot another case to not enabling the wizard by default: the wizard can be prone to vandalism and other unproductive edits, especially by IP users. Even reverts won't disregard this case; rather they enhance this reason to not enable it. --George Ho (talk) 21:34, 17 March 2018 (UTC)Reply

Thanks for your input, George Ho. We will put out a call for feedback next week on village pumps for major projects and I can include a question about whether the feature should be default. If we don't get a lot of feedback, we can consider making it a preference or a beta feature. The feature is an extension (not a gadget), hence it's possible to do that. The gadget version is just to let people try it out. Technically speaking, it did not take any extra work to expand scope to all templates instead of just infoboxes. If people don't want to use it for other templates, they can choose not to. I will make sure to clarify that and invite feedback on that as well. Did you get a chance to try it out yet? I'd like your feedback on the feature too, if possible. Thanks! -- NKohli (WMF) (talk) 22:06, 17 March 2018 (UTC)Reply
I haven't tried the feature yet; to enable the feature, I must enable the Toolbar first because it's a technical requirement to use the feature. Because I disabled the Toolbars, id est switching back to 2003 WikiEditor, I may not be able to use the wizard or ProveIt. Nevertheless, I saw the screenshots and would conclude that the wizard has a decent graphical user interface and may have usefulness but (to me) is no substitute to improve human skill of source wiki-writing. In my opinion, having some experience with ProveIt, filling in the bars in the ProveIt gadget to complete one reference consumes more time (i.e. seconds or minutes) than writing a source code of references. Id est writing a code is faster than a wizard. --George Ho (talk) 22:37, 17 March 2018 (UTC); unstruck, 23:20, 18 March 2018 (UTC); self-corrected, 02:49, 19 March 2018 (UTC)Reply
Oh, wait. That's when it would be used as part of (non-Beta) Preferences. User script I haven't used yet. I think screenshots are adequate enough for me to judge. But forgot to say "you're welcome" for thanking me :). And thanks for planning a feedback. --George Ho (talk) 22:47, 17 March 2018 (UTC); edited, 22:51, 17 March 2018 (UTC)Reply
Now I'm unsure whether it'll work in the 2003 WikiEditor. --George Ho (talk) 23:20, 18 March 2018 (UTC) As confirmed, it doesn't work in the 2003 WikiEditor. This is my proof (I hope). --George Ho (talk) 23:43, 18 March 2018 (UTC)Reply
I re-enabled the Toolbar, reinserted the javascript code, and tested the gadget out with the 2010 WikiEditor. Here's my experience with the gadget: Whenever I hover around the "info" ("i") icon, the content blinks; whenever I move the cursor out of the icon, the content blinks again. That could be a bug issue. Moreover, the wizard says that it doesn't collect information of templates that lack TemplateData, like w:Template:Infobox character; therefore, a user would have to add a template manually. Oh, by the way, any version of ProveIt still works in the 2003 WikiEditor without needing the toolbar. --George Ho (talk) 02:49, 19 March 2018 (UTC)Reply
Thanks for giving it a try, George Ho. I appreciate you taking out the time to do that. About the content blinking - can you tell me which browser are you using (with the browser version, if possible)? TemplateData is absolutely essentially for the software to understand the template. It is very simple to add the templatedata tags to an existing template. I see this feature as an opportunity to let people know about it so they can help add those tags.
About using it without the toolbar - can you explain a bit more about how you think it will work without the icon to bring it up? The icon in the toolbar is used for "activating" the wizard. Thanks -- NKohli (WMF) (talk) 20:22, 19 March 2018 (UTC)Reply
For the content blinking, the icons I mentioned are the ones seen at File:TemplateWizard extension 02.png. I used Google Chrome v65 on Windows 7 and experienced blinking (haven't tried Opera and Firefox yet). However, I didn't have similar experience when using Windows 10 in both Google Chrome v65 and Firefox v59, both latest versions. Indeed, no blinking (yet). I'll try this at Windows 8 soon. --George Ho (talk) 20:39, 19 March 2018 (UTC)Reply
Update: I tested the feature out at Windows 8, and I've not seen content blinking in Google Chrome 65, Firefox 59, and IE11. Nevertheless, at IE11, when I tried to insert the template, the response is too slow, but the wizard works at Chrome and Firefox. Unsure about Microsoft Edge as the public computers still have the older versions and as I don't have Windows 10 yet. --George Ho (talk) 21:00, 19 March 2018 (UTC)Reply
Hmm... I don't know whether using it w/o a toolbar is possible. However, putting it in the toolbar would mean letting the wizard be possibly misused and/or abused. Moreover, that would mean enabling the toolbar to enable the feature before disabling the toolbar without disabling the feature. Moreover, the 2006 editor doesn't have that "template wizard" button because probably technically its toolbar is less advanced than the 2010 editor. --George Ho (talk) 20:39, 19 March 2018 (UTC); partially struck, 23:50, 19 March 2018 (UTC)Reply
Further comment: Enabling the feature without the toolbar would be possible; however, if so, the feature would be visually distracting when enabled, like the ProveIt gadget has been when seen at the lower-right corner. --George Ho (talk) 21:00, 19 March 2018 (UTC)Reply
On second thought, even with or without the toolbar, the feature would be potentially misused, especially if given to IP users by default. --George Ho (talk) 23:50, 19 March 2018 (UTC)Reply

┌────────────────┘
I was curious about 2017 WikiEditor and then gave it a shot. I think I was either amazed or amused by it; indeed, I didn't need to enable a Toolbar to switch between the 2003 WikiEditor and the 2017 WikiEditor. By the way, I retried the Template wizard on 2017 WikiEditor at both Google Chrome and IE11 on Windows 7. The wizard works at both browsers when using 2017 WikiEditor. I may not say the same for the wizard at 2010 WikiEditor; I figured it could be buggy at 2010 WE in IE11, but I'm not yet 100% sure. --George Ho (talk) 05:30, 22 March 2018 (UTC)Reply

I got a message on my talk page "The Wishlist Team would love it if you could take a few minutes to try the Template Wizard prototype script out and give us feedback on whether it lives up to your expectations. This feedback will help build the script into an extension. To get started, add the following to your Special:MyPage/common.js -" I don't know where my Special:MyPage is and don't want to even try. I think I represent a high-level, native English user who is not an IT specialist. I wouldn't know where to start with the Template Wizard. I think only people who know what they are doing should have access to it. So many people can't even categorize their images correctly. Downtowngal (talk) 21:01, 2 April 2018 (UTC)Reply
@Downtowngal: The message on your talk page linked to your common.js page. You'll find it here: Special:MyPage/common.js. But that is alright. This is only a prototype. The final version will be much more easily accessible. -- NKohli (WMF) (talk) 21:47, 4 April 2018 (UTC)Reply
  • @George Ho: the 2003 editor is being phased out anyway, so I don’t really understand why are you seem to be so interested in getting developers to support it. It is not developed anymore, it is not supported anymore, so it is not a blocker for potentially useful tool to be enabled by default without it working in a legacy editor that is planned to be removed sooner or later. If this gadget can replace ProveIt and provide VE-like experience in adding filled references in the future, then more power to the developers of this feature. stjn[ru] 19:42, 4 April 2018 (UTC)Reply
I didn't use the Toolbar very much except for signing my posts and all that. Moreover, I hadn't used toolbar buttons to add tables, bold text, or anything else. Therefore, I disabled it for months. Personally, I found the toolbar to be visually distracting, but... I guess it's commonly used. --George Ho (talk) 19:47, 4 April 2018 (UTC)Reply
I really hope that the 2003 editor will never be phased out. It’s the only editor which works without JavaScript; in fact, this editor loads instead of WikiEditor when no JavaScript is available. You’re speaking about the 2006 editor. I think, however, that this gadget (or whatever it is) doesn’t have to support the 2003 editor. I only use the search & replace feature of the WikiEditor toolbar—should I complain about that not being available without the toolbar enabled? No, I think if someone wants an editing feature button to be available, they should enable a toolbar. I did so. If you really hate it, I believe that you belong to a minority, and you need a user script that places the button wherever you want. —Tacsipacsi (talk) 18:08, 5 April 2018 (UTC)Reply

Weeks later, I have decided to re-blank my Common.js page. IMHO, it should be disabled by default, especially to IP users. I either don't use it very often or seldom use it. Personally, I am more efficient on manually adding templates by wikicoding and prefer it that way; I find myself consuming less time on correct wikicoding than TemplateWizard. Also, I still hold a view that the Wizard is prone to misuse. Nevertheless, I would like it featured for older, pre-2010 wikitext editors (but disabled by default) because either I don't find the toolbar necessary or the button is currently not working well in IE11 (phab:T191194). --George Ho (talk) 20:18, 19 April 2018 (UTC)Reply

@Ms. Kohli: What happened to the planned discussion as you planned two months ago? --George Ho (talk) 19:26, 15 May 2018 (UTC)Reply

Hi George Ho. We reached out to everyone who participated in the wishlist survey and invited them to provide their thoughts on this feature. We haven't heard anyone's opinion about whether this should be enabled or disabled by default, however. We got some responses as a result of that outreach (as you can see further down on this page). We will ask for another round of feedback once the redesign is complete and available for people to see on the test wikis. Is there something I missed? Thanks. -- NKohli (WMF) (talk) 21:48, 15 May 2018 (UTC)Reply

Infoboxes

[edit]

I have just tested the “Template wizard” on the Polish Wikipedia, and it seems to be working fine (and it is really useful!). The only (minor) problem is that it is customary in the Polish Wikipedia to insert the full infobox, including all parameters even those which remain unfilled (this way they can be filled during later editions, and everyone can see which parameters are still to be filled). Now, when I use the “Template wizard”, only the filled parameters are inserted into the article, which shortens considerably the infobox. I have realised that putting a space into every parameter of the infobox will give the expected result (the whole infobox is inserted into the article), but this is somewhat wearisome. Can this be solved easily? Maitake (talk) 05:23, 29 March 2018 (UTC)Reply

Hi, Maitake. You can also try to report errors or bugs at the Phabricator. --George Ho (talk) 15:03, 29 March 2018 (UTC)Reply
  • @George Ho: Thank you for your advice, but I am afraid this is neither an error nor a bug, but the intended behaviour. That is why I preferred to report it here. (Not to mention that I have absolutely no idea how the Phabricator works and how to report anything there, and I don’t think I would like to know, I’m too lazy for that.) Maitake (talk) 15:23, 29 March 2018 (UTC)Reply
Oh... I re-read the whole OP and realized that I must have misread it. I believe that inserting short template codes may be intended as filling in empty parameters without intending to fill them in would be annoying... methinks? I sometimes put some empty parameters in... just relevant ones. The rest of parameters I think may be unnecessary for any certain topic. But the wizard is no substitute for advanced human skill. I prefer writing codes. :) --George Ho (talk) 15:42, 29 March 2018 (UTC) Oh, and I neither work for nor am affiliated with WMF. --George Ho (talk) 15:43, 29 March 2018 (UTC)Reply
@Maitake: you're right, this is the intended functionality so far. Firstly, that is a great custom (to insert the entire infobox). We have had a similar concern from Wikisource and are thinking about a good way to do this. We can potentially have a checkbox in front of fields to let user pick the fields they want insert along with a checkbox to select all fields. Does that sound like something that will work? Do you have any other ideas? -- NKohli (WMF) (talk) 17:34, 29 March 2018 (UTC)Reply
  • @NKohli (WMF): thank you very much for your answer. Yes, I think a checkbox, especially one for selecting all fields, would solve the question. Of course, a checkbox that would remember the previous selection (i.e. a checkbox that would stay checked or unchecked permanently) would be even better. Or, if this is supposed to be a gadget turned on and off in the Preferences, then perhaps an extra checkbox there, with the same functioning. I hope I explained it clearly enough. Maitake (talk) 22:14, 29 March 2018 (UTC)Reply
    • I was wondering about this too. I think an extra checkbox and then a select-all one at the top might make the form a bit crowded and hard for people to follow who don't know what that's about. But it totally makes sense, and would be great to have a way to insert blank parameter values. I did wonder about maybe using the common /preload> subpage that lots of templates have (although it's not a standard, it is pretty widely used I think, and could easily be localized), and having a button in TemplateWizard that lets you insert just the template preload without filling any of its parameters. Sam Wilson 22:22, 29 March 2018 (UTC)Reply
Maitake, Samwilson, what about this -

TemplateWizard with checkboxes to pick and choose fields wanted -- NKohli (WMF) (talk) 00:16, 3 April 2018 (UTC)Reply

  • I don’t know about the conditions in Polish Wikipedia, but the simpler solution would be to insert full template with parameters with block model and insert only used parameters with inline model. That would be more than enough to cover absolute majority of cases for most projects without bringing additional complexity to the interface. stjn[ru] 19:42, 4 April 2018 (UTC)Reply
@Saint Johann: while that seems to be true for all cases I have seen, I don't want to assume that it holds true for all projects. It's possible that certain language wikis follow a different model and doing this might not work for them. -- NKohli (WMF) (talk) 18:21, 11 April 2018 (UTC)Reply
I very much like NKohlis idea to make it possible to insert empty parameters by clicking a checkbox beneath the parameter. It wold be great if something like this could be realized. One would be able to select those parameters one can't fill, but one would like to be filled, and could leave out those parameters which are irrelevant or would be false in the particular case. --X black X (talk) 23:42, 29 April 2018 (UTC)Reply

Confused

[edit]

I added the appropriate to code to me en.wiki common.js, however, the visual editor looks and operates the exact same. Teh puzzle icon with the search for templates still exists and doesn't appear to be different. Thanks, enL3X1 ¡‹delayed reaction›¡ 13:14, 29 March 2018 (UTC)Reply

@L3X1: the Template Wizard script is built for the 2010 Wikitext editor. To use it on the English Wikipedia, you'll need to disable the 2017 Wikitext editor if you have it enabled, and use source editing. Keegan (WMF) (talk) 16:46, 29 March 2018 (UTC)Reply
Keegan (WMF) Ah, I found it now, silly me. It works ok and will make source editing a bit easier for me. Thanks, enL3X1 ¡‹delayed reaction›¡ 17:13, 29 March 2018 (UTC)Reply
Thanks for the feedback, L3X1. -- NKohli (WMF) (talk) 17:35, 29 March 2018 (UTC)Reply

Malformed parameters and editing already-inserted templates

[edit]

I just gave the gadget a quick try, and I have two comments:

  • Malformed parameters are discarded. No question, no chance to fix them, just a little red border around the input field while editing. I actually found this (IMO) bug because a reference template’s ISBN parameter was marked as a number. To worsen the case, the book had an ISBN-10 with an X check digit, so there was no way to format it as a number. So I left it as it was, clicked “Insert” – and it disappeared! VisualEditor silently inserts the bad parameter (no surprise for the number, because it doesn’t check number format, but also for example a URL). That is not ideal either, I think there should be a popup asking if I want to fix it or insert as it is.
  • Templates cannot be edited once inserted. If I forgot a parameter, I can rewrite the whole template or look up the template documentation and find the parameter’s name, format etc., as if there were no gadget. TemplateMaster can handle this situation.

Tacsipacsi (talk) 15:05, 30 March 2018 (UTC)Reply

Hi Tacsipacsi. Thanks for your feedback. For the first issue you mention, I have filed task T191264 for it. For the second one, I don't think there's a straightforward way for us to handle that, unfortunately. Parsing wikitext is a big problem and it gets maginified when things like wikEd and CodeMirror modify the DOM. I will look into TemplateMaster and see if we can replicate its solution. Thanks for bringing it up. -- NKohli (WMF) (talk) 23:52, 2 April 2018 (UTC)Reply
Perhaps you could also find some ideas for editing already inserted templates in the w:de:Wikipedia_Diskussion:Technik/Skin/Gadgets/Vorlagenmeister. If you put the cursor into a inserted template and then click on the Vorlagenmeister button, it loads the values of this template (works only for one template per edit). (If one uses the w:User:Cacycle/wikEd, only the first template in the text can be worked on.) --X black X (talk) 23:42, 29 April 2018 (UTC)Reply

Possibility edit for template already inserted

[edit]

Hello,

Primary, very thanks for this functionality.

I tested the script on frwiki, is correct functionally.

3 improvements :

  • Possibility for edit template already inserted, very important.
  • This data "example" provided in TemplateData are not displayed (tested with template fr:Modèle:Infobox Aéroport).
  • Unfilled parameters, but marked as "suggested" are not automatically inserted into the code, unlike the Visual Editor. It would be nice to insert them automatically for later completion.

Thanks for this work.

(sorry for my bad english)

--Tractopelle-jaune (talk) 20:22, 2 April 2018 (UTC)Reply

Thanks for your feedback, Tractopelle-jaune. About the three improvements you suggest:
  • For editing already inserted template - it is a little difficult. We will try to implement this.
  • For showing example, great point! I filed ticket for doing this - task T191968.
  • For inserting parameters which may not be filled, see discussion above. I will be happy to hear your thoughts on the solution proposed there. Thank you. -- NKohli (WMF) (talk) 00:43, 3 April 2018 (UTC)Reply

Vorlagenmeister

[edit]

Seems very similar to Vorlagenmeister, just wondering whether those efforts are coordinated. --Tgr (talk) 11:46, 3 April 2018 (UTC)Reply

I was not aware of the existence of TemplateMaster until Tacsipacsi pointed it out above. Looking at the code, it seems like most of it is from 2009. We'll be looking at it some more to see if we can incorporate some of the features it has in TemplateWizard. -- NKohli (WMF) (talk) 20:28, 3 April 2018 (UTC)Reply

Inserting dates

[edit]

Should the calendar system/method/tool be the only method to insert dates? Why not allow users to manually insert dates with a "pencil" icon selected? It's been used for Commons's c:Special:UploadWizard as alternative to the calendar tool. Also, a nonexistent undefined=YYYY-MM-DD is inserted while using the calendar tool. --George Ho (talk) 05:46, 16 April 2018 (UTC)Reply

@George Ho: I think this bug has been fixed in the extension version of TemplateWizard. Could you please try to reproduce it on the CommTech wiki? That's got the most up to date code. As for date-formatting, I think you're right and it should allow freeform date entry as well. I can't find anything saying that the date type should always and only be in the system format (don't know if I'm looking wrongly though). I guess templates who want other sorts of dates just don't define those parameters as dates, but perhaps they could. Sam Wilson 10:00, 16 April 2018 (UTC)Reply
Isn't the website for just WMF CommTech team? Also, it's not been edited within the last seven days. But thanks for letting me know about the extension version. --George Ho (talk) 18:23, 16 April 2018 (UTC)Reply
It seems to work for me. (Registration is not needed for editing, so I could test it with the preview.) The TemplateData documentation states, though, that date values should use the ISO date/time format, so if the templates needs another format, it should not use the date data type. —Tacsipacsi (talk) 18:27, 16 April 2018 (UTC)Reply


Design update

[edit]

Hi all. We decided to update the design to allow for users to pick and choose which fields they want to add. This came up in the feedback we got above by Tractopelle-jaune and Maitake. You can read about it and see some mocks we made: on the project page. Keen to hear what you all think Tacsipacsi, Mike Peel, George Ho, L3X1, Saint Johann, TheDJ. Does it make the UI more intuitive? Anything you'd like to see changed? Thanks so much. -- NKohli (WMF) (talk) 22:44, 23 April 2018 (UTC)Reply

Here's an Invision mockup for what the feature will look like. You can cycle through it by using the left and right arrow keys on your keyboard or click on the objects it prompts you to click on. It's been made to show what clicking on different actions will result into but it's not a fully functioning mockup so you won't be able to search for new templates or click on everything. I hope you'll take a look and give your feedback. Thanks! -- NKohli (WMF) (talk) 20:00, 26 April 2018 (UTC)Reply
  • Yes, that’s better than initial mockup that was on this talk page. I would probably guess though that template wizard on the mockups looks a little too small. stjn[ru] 16:21, 27 April 2018 (UTC)Reply
  • It looks nice, although there are quite a few icons there now, maybe try to minimise those if possible as they add to the clutter. In particular, consider only having one dustbin icon per value, and consider using a minus symbol instead to match the plus symbol, and maybe have the info display when hovering over the name rather than with a separate (i). Thanks. Mike Peel (talk) 23:40, 27 April 2018 (UTC)Reply
Good points. We did reduce the icons and changed the plus to minus symbols (see the interactive mockups). I didn't get time to update the screenshots yet. Having the info icon appear on hover is problematic for mobile phone users where there's no gesture for hovering. That's why we try to avoid actions on hover as much as possible. The information will appear in a popup when the info icon is clicked on. Like it does with the user script prototype we put out earlier. Thanks for your feedback. Much appreciated. -- NKohli (WMF) (talk) 03:40, 28 April 2018 (UTC)Reply

Integration with Wikidata?

[edit]

The Wikidata team has been working on d:Wikidata:Client editing prototype (pinging @Lea Lacroix (WMDE) and Charlie Kritschmar (WMDE)). There's a lot of overlap between these two tools, how will they interact? Thanks. Mike Peel (talk) 23:44, 27 April 2018 (UTC)Reply

Wow, they do indeed look similar. I wonder if we can integrate them into one. I will ping Lea and Charlie over email to see where they are at development-wise and if there's scope to combine the two tools. Thanks for bringing it up, Mike Peel. -- NKohli (WMF) (talk)
I think this is great idea. AFAIK, the client editing is a UI prototype. As a first step towards integration with Wikidata, I added in the Wikimania hackathon (phab:T199892) option to link to Wikidata from the wizard. eranroz (talk) 07:05, 28 July 2018 (UTC)Reply

In combination with the Beta feature "syntax highlighting", using Template wizard breaks the preview and the show-changes-feature

[edit]

If I have activated the Beta feature "syntax highlighting" (metawiki:Community Tech/Wikitext editor syntax highlighting, phab:T101246, mediawikiwiki:Extension talk:CodeMirror) and use w:User:Samwilson/TemplateWizard.js to insert a template, afterwards a click on the button "preview" or the button "show changes" has no effect, so the preview and the show-changes-feature don't work any more. --X black X (talk) 00:30, 30 April 2018 (UTC)Reply

I was using both Meta and en.WP at Google Chrome v66 on Windows 7. Both features work fine together for me, X black X. Which browser, OS, and wiki please? What are other specifics? IE11 has issues with the newer CodeMirror feature (phab:T190983); I wonder whether you were using IE11. Thanks. George Ho (talk) 05:58, 30 April 2018 (UTC); edited, 06:00, 30 April 2018 (UTC)Reply
The problem doesn't appear any more. Last night it was replicable, today it is not. Perhaps it was due to some maintenance operations. If I notice the problem again, I'll write again. --X black X (talk) 09:57, 30 April 2018 (UTC), updated 13:06, 30 April 2018 (UTC)Reply

When and how to release the wizard? How about Beta?

[edit]

The "content page" says that the wizard would be shipped in July. Right now it's August. I think that releasing the feature as a Beta would be for the best as we're uncertain how much impact the feedback on the feature does. Thoughts? George Ho (talk) 06:01, 3 August 2018 (UTC)Reply

@George Ho: We're waiting on getting a security clearance from the Security team (task T198666) before we can launch this feature in beta. The plan is to put it on the beta wikis and testwiki for users to try it and provide feedback. As soon we get the security clearance, I will update the project page and invite everyone to take a look at the wizard and provide their opinions. My hope is that this can happen by next week. Thanks. -- NKohli (WMF) (talk) 18:40, 3 August 2018 (UTC)Reply
I have now added an update to the project page as well. -- NKohli (WMF) (talk) 18:43, 3 August 2018 (UTC)Reply
Thanks. I hope you meant releasing it as a beta feature, right? --George Ho (talk) 20:38, 3 August 2018 (UTC)Reply
Ah, no. The plan is to put it on Beta wikis (like this one) where people can test the feature in multiple languages. I expect the feature to have a low-impact because a lot more users use the 2017 Wikitext editor now, which this feature is not built for. We will make it available to everyone after the feedback phase on test wikis. -- NKohli (WMF) (talk) 20:50, 3 August 2018 (UTC)Reply
You mean making it available to logged-out users? If so, I'm still against this. George Ho (talk) 00:16, 4 August 2018 (UTC)Reply
I'm also against enabling the feature by default. --George Ho (talk) 00:17, 4 August 2018 (UTC)Reply
George Ho I'm interested in hearing why you feel making this feature available to logged-out users is a bad idea. About enabling by default, we don't expect this feature to get a lot of usage. We will be collecting data about how many times it is used per day and after a month, we can re-evaluate if this feature is being used for more harm than good. What do you think of that? -- NKohli (WMF) (talk) 17:28, 6 August 2018 (UTC)Reply
For the question you asked, sounds like you've taken some precautions, such as releasing it to beta and test wikis first and collecting statistical data and analyses.

Still, I don't feel certain or confident yet on trusting logged-out users enough to properly use the wizard. Some (if not many) logged-out users have been doing unconstructive edits, like adding unverifiable information and vandalism (including edits with distasteful humor), and/or using IP addresses to evade blocks (i.e. sockpuppetry). Potentially, if given to logged-out users, well... some of those users may use the wizard properly, while some other users would use it to make test (if not joke) edits, some others would get themselves into edit-warring situations (especially in contentious areas), etc. I might or might not say the same thing for logged-in users, but I've rarely (if not "never") seen a long-time, experienced editor making an obviously bad edit. (No offenses to many newcomers.) I can provide links of diffs if that's necessary.

BTW, besides adding a template, does the feature also modify an already used template? --George Ho (talk) 18:38, 6 August 2018 (UTC)Reply

@George Ho: In my opinion, if someone is looking to vandalise a page, they would be able to do it much more easily without the wizard. The wizard adds extra steps. We both don't know the outcome but I feel we should assume a little good faith while we run the trial. After a month of data, I will publish how many times it's been used by logged-in and logged-out users and we can collectively decide if we think it should be restricted to logged-in users only. As to your other question, the wizard does not allow modification of already inserted templates. -- NKohli (WMF) (talk) 18:56, 6 August 2018 (UTC)Reply
Can the data also count reverts of additions via the wizard? --George Ho (talk) 00:12, 7 August 2018 (UTC)Reply
That's a very good point, George Ho. I have updated the task T200970 to include that as a data point to capture when saving data. Thanks! -- NKohli (WMF) (talk) 16:58, 7 August 2018 (UTC)Reply
You're welcome, and thanks for the update. If the wizard is used, will the edit summary include "via TemplateWizard" or something like that? --George Ho (talk) 17:41, 7 August 2018 (UTC)Reply
No, the edit summary will be filled manually by the user. The wizard will only insert the template into the editor. It will not auto-save the edit. The editor will be able to make changes to the inserted template and add other things before saving it. -- NKohli (WMF) (talk) 17:51, 7 August 2018 (UTC)Reply

Available for testing on testwikis and beta cluster wikis

[edit]

I'm excited to say that TemplateWizard is finally available for you all to look at on testwikis. Here's how you can see it:

  1. If in the past you have used the gadget that was created for this project, please disable it from your global.js file.
  2. Go to this page and open it in edit source mode with the standard editor (not the 2017 Wikitext editor)
  3. Click on the puzzle piece icon in the toolbar to activate TemplateWizard
  4. Search for a template to use it. It works best with templates that have TemplateData so you can use the Cite web or TemplateWizardTest templates which already have TemplateData. For templates without TemplateData, it will attempt to guess the parameters but it might not always be correct.

If you want to try it out in another language, you can change the URL to append a uselang=langcode parameter to it. Example.

@Jo-Jo Eumerus, Beta16, TheDJ, Mike Peel, George Ho, X black X, Tacsipacsi, L3X1, Downtowngal, Saint Johann, Maitake, Tractopelle-jaune, ערן, and Tgr: Your feedback would be very helpful. There will of course be features that can make this more useful. At the moment, I am most interested in hearing if you all think that this in its current state can start being useful to editors or if there are features that must be added to it before it is made available on wikis. Thank you. -- NKohli (WMF) (talk) 14:06, 5 September 2018 (UTC)Reply

@קיפודנחש: Note it nicely guess the parameters as you suggested :) eranroz (talk) 14:38, 5 September 2018 (UTC)Reply
@Eranroz: Note that it still can't consume existing template already in page, so it's not really usable. working without TD is cute (this was your idea in the first place, even if you don't remember it...), but not being able to edit, and only create from scratch every time, means it's not even a prototype - at best it's "proof of concept". peace - קיפודנחש (talk) 15:58, 5 September 2018 (UTC)Reply

Feedback

[edit]
    1. The dialog reuses the link icon for a purpose that doesn't match it's purpose in the toolbars. That's confusing.
    2. The link icon and the delete icon do not have labels that are usable by screenreader users.
    3. The the +/- state of the param buttons are not accessible to screenreader users
    4. When you try inserting the template "Infobox officeholder", you'll note that the parser trips over interpreting the parameter names due to parserfunctions. It results in fields names like: "minority{{#if:{{{minorityleader2"
    Hope that this is useful feedback for you. —TheDJ (talkcontribs) 15:02, 5 September 2018 (UTC)Reply
Hi TheDJ. Thanks for the feedback. It's very helpful, as always. Good point about the link icon being ambiguous there. Perhaps linking the template title to the template directly is better? For the labels, I have created task T203600. I'll file issues about the other points you raised as well. Thanks! -- NKohli (WMF) (talk) 20:05, 5 September 2018 (UTC)Reply
NKohli (WMF) I created a screencapture of me using VoiceOver to try and use the dialog, pretending i'm blind (yet still cheating). I added some annotations in the youtube description trying to express my thought patterns. I wasn't able to capture the audio that voiceover generated, without jumping through more hoops, so you need to follow along the on screen output of VoiceOver. Figured it might be interesting to capture how I evaluated stuff like this. —TheDJ (talkcontribs) 09:09, 7 September 2018 (UTC)Reply
This is very interesting to see. Thanks TheDJ. I will play around with VoiceOver on my local system to get a better handle on how it works. If you have a moment, your thoughts on task T203604 would be helpful. -- NKohli (WMF) (talk) 15:36, 10 September 2018 (UTC)Reply
  • I wonder if there is a way to create a blacklist of templates that do not appear in the autosuggestions. I am thinking mostly of the "*/doc" subpages which are otherwise clutter. enWiki might consider also blacklisting "infobox*" to prevent infoboxes from being overused where they are not wanted. Jo-Jo Eumerus (talk, contributions) 15:14, 5 September 2018 (UTC)Reply
That is an interesting idea. We are fetching the list of templates from TemplateData which does weed out a lot of subpage templates pretty smartly. I am not entirely sure how it does that though and we can look into improving its algorithm. I would say that it might help to wait a bit and see if the wizard is being excessively used for infobox templates or any other before we decide to implement a blacklist. George Ho and I discussed above about gathering some usage data and seeing if there is any misuse before taking any actionable steps to prevent it. Does that sound like a good idea? Thank you. -- NKohli (WMF) (talk) 20:30, 5 September 2018 (UTC)Reply
I don't know if "data" is the correct term to use here. One has to be somewhat familiar with the history of infobox disputes on enwiki to really gauge and I am not sure if numerical data would capture this. OTOH, it's rather hard to tell for a third party... Jo-Jo Eumerus (talk, contributions) 07:18, 12 September 2018 (UTC)Reply
@Jo-Jo Eumerus: I admit that I'm not very familiar with infobox disputes on enwiki. I've seen some conversations here and there about it. The data that we will be recording will include how often the wizard is being used and how many edits made using the wizard are being reverted. If the rate of edit reverts is high, that will tell us that we need some throttling mechanism (blacklist/usage limit etc) to prevent abuse using this tool. Does this sound like it can be helpful? -- NKohli (WMF) (talk) 13:14, 12 September 2018 (UTC)Reply
Maybe. Jo-Jo Eumerus (talk, contributions) 13:47, 12 September 2018 (UTC)Reply
  • As noted above, being able to edit a template already on the page, with some parameters, by populating the corresponding fields in the wizard is not "nice to have". it's a must. without this ability, this gadget is close to useless (think of a wiki where one can create new pages, but can't edit an existing one...).
    our simple down-to-earth wizard in hewiki can't do everything this one does (it could do more before the introduction of templatedata, using a "proprietary" way of describing template metadata in a subpage of the template, but we lost these feature when the wizard was converted to use templatedata), but it _can_ consume existing template on the page, and populate the appropriate fields. user:NKohli (WMF) commented in april "it's a little difficult, i'll try to implement it". forgive my french, but this is hogwash. the hewiki wizard does this with a ~45 lines function[1], and if you don't like my style, the visual editor wizard also does it - find out how, and copy it. it's not "difficult", and there's no excuse for not implementing a feature without which the tool is not usable (i believe this is not the first time i made this comment). peace - קיפודנחש (talk) 16:23, 5 September 2018 (UTC)Reply
    Hi קיפודנחש, thanks for the feedback. I'd like to pitch in with the technical details to try and explain the challenges that exist in editing a template in wikitext. Unfortunately, it's not a simple matter of copying behavior from VisualEditor. VisualEditor has Parsoid to back it. Parsoid is the one that handles parsing the Wikitext into rich HTML that contains metadata about templates and their details, so they can be rendered and edited correctly. Templates are not as straight forward to parse as they may look, and we need to account for generalizing the behavior to multiple wikis with different languages and behaviors. Things like "required fields", or special formatting and default values are virtually impossible to get when using wikitext directly, and would require a few extra steps querying APIs to figure out what the technical structure is like for editing.
    Moreover, both VisualEditor and the "2017 wikitext editor" use ContentEditable as the editing surface, while the old editor uses a 'simple' textarea, which makes it extremely difficult to recognize, adjust, and account for the location of the text inside the editing space.
    That said, we've been collaborating with eranroz on some features to share between the hewiki template wizard and this one. I'm super excited to see his idea for supporting Wikidata labels in TemplateWizard come to fruition as we've discussed it in the tickets.
    Copying the algorithm from the gadget to the new TemplateWizard is not impossible, but it's very much not straight forward or trivial, and we would have to account for a couple of challenges it doesn't quite deal with right now, as it doesn't work with CodeMirror or WikiEd (both transform the textareas to be able to present properly) and the parsing may not be the same for some languages.
    I understand the frustration, and the desire to have all the features available, but everything has to do with calculation of effort and cost of implementation. TemplateWizard makes it extremely easy to add a template to an otherwise text-only interface. To make it possible to edit templates already in the text will be a significant challenge with significant time commitment that we don't currently have.
    If anyone wants to tackle this technical problem, we'd be very happy to help consult, give guidance, and provide code-review to a technical solution that can be generalized for all the projects that TemplateWizard is active on. Please feel free to open a Phabricator ticket and flesh out the requirements and technical difficulties further. Cheers, MSchottlender-WMF (talk) 19:28, 5 September 2018 (UTC)Reply
That would be really awesome, ערן. Thank you. And happy new year in advance! -- NKohli (WMF) (talk) 21:10, 5 September 2018 (UTC)Reply

When I tested out "infobox album", "infobox song", and "infobox film", the parameters line up in one line (or a little more), just like "cite web". However, when I tested out "infobox person", the parameters separate each other by lines. Is that a default for many templates (like "cite web") with some others having exceptions? Also, when I wanted to remove a parameter, I have to use the left side to delete it. The right side doesn't have either a trash can icon or a "minus" icon to remove the unneeded parameter. --George Ho (talk) 19:33, 5 September 2018 (UTC)Reply

One-line format is the default if nothing else is specified in TemplateData, there’s no magic guessing the format. Now it’s multiline for me (only the album infobox, of course). —Tacsipacsi (talk) 19:51, 5 September 2018 (UTC)Reply
That's correct. It goes by what's in the TemplateData if provided. Trash icons on the right side were considered but they made the UI more distracting and crowded with lots of red trashcans. We wanted to first try having them only on the left and seeing if that works better. What do you think, George Ho? -- NKohli (WMF) (talk) 20:41, 5 September 2018 (UTC)Reply
If horizontal lining is provided for templates not using TemplateData, then how about one space between the parameters, like example |example1= |example2= instead of example|example1=|example2=? As for adding/removing parameters, left side would be a decent start, but sometimes I would get frustrated by scrolling up and down to add/delete a parameter. If left side is the only choice, then how about adding a "Sort by" function to provide options, like "Alphabetically" "Default" and "Used", or something like that? --George Ho (talk) 21:30, 5 September 2018 (UTC)Reply
About the spacing, I think that is a personal preference and some people might not like the spaces while some would. I'll wait to hear more feedback on that for a while. For the ordering of fields, the current order is what is in TemplateData clustered by Required, Suggested and Optional. Would it be helpful to scroll the left side to focus on the field that user clicks on the right? -- NKohli (WMF) (talk) 21:48, 5 September 2018 (UTC)Reply
Sorry for belated reply. Anyway, I don't know what the question means. Can you please elaborate? Thanks. BTW, what about social impact? Is it a lesser priority than technical impact? --George Ho (talk) 21:19, 12 September 2018 (UTC)Reply

Looking for wikis willing to adopt TemplateWizard

[edit]

Hi all, from my earlier post I received some good feedback. The team is going to evaluate and estimate the feature requests we have received before working on them. In the meantime, I am looking for wikis which are willing to adopt TemplateWizard. Getting TemplateWizard out in the hands of users will be incredibly helpful for us to see if there are use cases we have missed (besides the ones we got feedback on) or if the wizard is being misused and we should include blacklist measures. If you are willing to give it a try on your wiki, please reach out to us below. Thank you. -- NKohli (WMF) (talk) 20:55, 10 September 2018 (UTC)Reply

Is it possible to enable this as a beta feature on all wikis (and make it default on wikis which decide so)? It would be great if I could use it on all wikis (and I would also more likely find any bugs in day-by-day use), while I think it’s not likely to be misused if the user has to manually enable it. (Speaking of opt-in, I would welcome if it could be opted out in production—non-beta—version. It loads a bit after other WikiEditor buttons, so the buttons and links after it move to the right a few pixels, which is the most annoying side effect of JavaScript run on page load.) —Tacsipacsi (talk) 19:06, 11 September 2018 (UTC)Reply
Beta features are typically used for features which are automatically applied once they are turned on. Like 2017 Wikitext editor, new UI for Recent Changes, Advanced search interface etc. This feature is different because it would need to be manually activated it after being turned on as the beta feature. Features such as this one typically simply get enabled if they are non-controversial and unlikely to cause harm. For this reason, I am looking to enable this on a few wikis to get more feedback before enabling this everywhere. -- NKohli (WMF) (talk) 13:07, 12 September 2018 (UTC)Reply
But as far as I understand, there is a fear that it will be controversial. On the other hand, the JavaScript is loaded unconditionally on all edit pages, independent of whether there’s any chance it will be used—maybe a user doesn’t want to use it ever, maybe they have even turned WikiEditor off; in this case, the only reason it doesn’t throw a TypeError because of calling a non-existent function is that the call is in an event handler for an event never fired. It’s hundreds of kilobytes that I don’t want to download if I won’t (or can’t) use it. So please implement a way to disable it permanently and on server side, and also load it only if WikiEditor is enabled. —Tacsipacsi (talk) 20:05, 12 September 2018 (UTC)Reply

Available as a beta feature

[edit]

Hello. TemplateWizard has now been enabled as a beta feature across all projects. We are going to be collecting data on usage and monitoring for any strangeness we encounter. You can enable it by going to the Beta features tab in Special:Preferences. Your help in spreading the word about this tool on your respective projects would be very welcome. I will keep making updates to this page as we add or change any features. I want to thank Eran for his help in working on editing existing templates and Wikidata integration. Both of those features are under development and I hope we can make them available very soon. Thank you. -- NKohli (WMF) (talk) 20:12, 22 October 2018 (UTC)Reply

I think that's the wise decision, and I thank you for that. Curiously, Niharika, what prompted you to convert the feature into beta? Was it my request, or why else? --George Ho (talk) 19:44, 28 October 2018 (UTC)Reply
It was indeed your request in addition to the fact that I did not get many responses when I asked for pilot wikis to launch this feature on. :) -- NKohli (WMF) (talk) 19:22, 2 November 2018 (UTC)Reply
@George Ho: Hello. I have now published an update with some stats about the usage of the feature. The numbers look positive. We will soon be converting this feature to be available to everyone without the beta. Thanks. -- NKohli (WMF) (talk) 23:42, 25 February 2019 (UTC)Reply
Available to everyone, including IP users? If the usage is low, then why bother making it available to everyone? If it's soon to be graduated out of beta, why not make it an option as part of "Editing" preference settings? Are the number of options too high or something? George Ho (talk) 05:53, 26 February 2019 (UTC)Reply
Even when the stats showed no abuse, I still don't see why IP users are trusted to use the feature. George Ho (talk) 05:55, 26 February 2019 (UTC)Reply
@George Ho: I think the usage is low because the feature has been restricted to few users. I think it's good to assume good faith and make it available to more users. We will still be collecting data and if we see that IPs cannot be trusted to use it, we will make it a preference. The number of preferences are indeed very high and we try to refrain from adding one unless absolutely necessary. -- NKohli (WMF) (talk) 20:45, 27 February 2019 (UTC)Reply
I do wonder how many times templates were inserted via the newer (beta) wikieditor's TemplateWizard feature. George Ho (talk) 22:35, 2 March 2019 (UTC)Reply

Footnotes

[edit]
  1. see function paramsFromSelection() in he:Mediawiki:Gadget-TemplateParamWizard.js