TemplateData: Create an editor for template data (in the wikitext editor)
Closed, ResolvedPublic

Description

GUI for the existing TemplateDataEditor

Not the same as bug 50964: it would be really nice to provide a tool for editing TemplateData also outside VisualEditor (I even think it's better than inside VisualEditor because VE doesn't work on Template namespace right now).

The existing TemplateDataEditor script (created by Ltrlg on frwiki, translated for enwiki by me), can be a good start. Benefits for including some equivalent in TemplateData extensions are important :

  • Available to all wikis
  • Translations can be done like they are done for TemplateData

Links :


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50169

Attached:

bzimport added a project: TemplateData.Via ConduitNov 22 2014, 1:53 AM
bzimport set Reference to bz51734.
NicoV created this task.Via LegacyJul 20 2013, 8:21 AM
Aklapper added a comment.Via ConduitJul 22 2013, 9:56 AM

Could you please define what that "tool" would exactly do?
Otherwise it will be extremely hard to define when this bug report could be considered "fixed" at some point. :)

He7d3r added a comment.Via ConduitJul 22 2013, 10:37 AM

Tool = something at least as good as the TemplateDataEditor linked above.

He7d3r added a comment.Via ConduitJul 22 2013, 10:40 AM

(In reply to comment #0)
...

editing TemplateData also outside VisualEditor (I even think it's better than
inside VisualEditor because VE doesn't work on Template namespace right now).

BTW: depending on the resolution of bug 50512, the data might be migrated from Template namespace to a specific one.

NicoV added a comment.Via ConduitJul 22 2013, 12:23 PM

(In reply to comment #1)

Could you please define what that "tool" would exactly do?
Otherwise it will be extremely hard to define when this bug report could be
considered "fixed" at some point. :)

Being able to edit a <templatedata> tag in a user frienly way, much like what TemplateDataEditor allows (see the attached screenshot in my first comment). JSON is not very friendly for human editors.
Basically, a window showing all the informations in the <templatedata/> and allowing a human editor to modify them easily.

Extra advantage of including this in the TemplateData extension :

  • Users don't have to modify their common.js to have access to an editor
Jdforrester-WMF added a comment.Via ConduitJul 22 2013, 4:20 PM

This is, indeed, not a duplicate of bug 50169, though it might as well be done in one go. Relabelling as such.

Krinkle added a comment.Via ConduitJul 25 2013, 6:07 PM

Created attachment 12957
Screenshot of http://tools.wikimedia.pl/~mlazowik/templatedata/

Attached:

Krinkle added a comment.Via ConduitJul 25 2013, 6:17 PM

(In reply to comment #0)

Created attachment 12900 [details]
GUI for the existing TemplateDataEditor

Not the same as bug 50964

Indeed, bug 50964 is not the same, but also (apparently) completely unrelated. I assume you meant bug 50169.

If this should not (also) be inside VisualEditor, can we be specific in what we want it to be then?

e.g. WikiEditor, legacy toolbar, ...

The referenced gadget 'parses' the wikitext textarea and adds a link in the sidebar toolbox that opens a dialog. I don't think the sidebar would be an acceptable entry point to edit the wikitext. Should be something in the toolbar.

I agree we should re-use the data logic between these 2 or 3 different things. At least we can expose the data logic separately from the plugin we make for VisualEditor so that other ones can be created as gadget (until (if) we make one of the WikiEditor and/or legacy toolbar).

Attached:

NicoV added a comment.Via ConduitJul 25 2013, 6:45 PM

I don't know how I messed up with the bug number (probably several bugzilla windows opened and I paste the wrong one) ;-) Sorry, bug 50169 of course.

I also think having a button in the toolbar would be a better place than the sidebar.

Other possible optimization: combine it with the "Skeleton generator" so that parameter names are automatically retrieved from the template source code for initializing the templatedata the first time. Care must be taken since the templatedata will often be on the documentation page.

http://singsurf.org/things/TemplateData.php?Source=true

SalixAlba added a comment.Via ConduitJul 29 2013, 11:17 PM

Skeleton generator now in javascript and at http://en.wikipedia.org/wiki/User:Salix_alba/TDSkell
its quite handy for getting a complete list of parameters. The human written documentation is not always upto date.

gerritbot added a comment.Via ConduitDec 11 2013, 5:49 PM

Change 85400 had a related patch set uploaded by Jforrester:
TemplateData Generator GUI

https://gerrit.wikimedia.org/r/85400

Jdforrester-WMF added a comment.Via ConduitJan 15 2014, 5:26 PM

This is done in I863a8199c0b08cc52b320ed00dcba912dd2aeefc (though it's not yet deployed, as it is currently hidden behind a feature flag). Closing for now. If a particular wiki is happy to be a guinea pig we can switch it on there for a little for some real-world testing.

Qgil added a comment.Via ConduitJan 21 2014, 8:28 PM

(In reply to comment #11)

If
a particular wiki is happy to be a guinea pig we can switch it on there for a
little for some real-world testing.

Sound interesting, but I'm missing a bit of background...

Do you mean "switch on" https://en.wikipedia.org/wiki/User:Salix_alba/TDSkell ? Would it be enabled to all users of a wiki or can it be restricted to a certain user group in order limit the experiment a bit?

There is clear interest in improving template data coverage in Catalan Wikipedia but, guess what, nobody really enjoys editing JSON syntax. :)

Jdforrester-WMF added a comment.Via ConduitJan 22 2014, 11:00 PM

No, this is the GUI we developed hidden behind $wgTemplateDataUseGUI.

bzimport added a comment.Via ConduitJan 27 2014, 11:50 AM

M8R-0p6s0d wrote:

Hi, we would like to try the TempalteDataEditor on NL wiki, see https://nl.wikipedia.org/wiki/Wikipedia:De_kroeg#Aanzetten_TemplateData-editor_op_nl-wiki

Ltrlg added a comment.Via ConduitJan 31 2014, 4:34 PM

$wgTemplateDataUseGUI activates neither TemplateDataEditor nor TDSkell but TemplateDataGenerator. The two screenshots attached to this bug are for 'TemplateDataEditor' and 'TemplateData Editor', so the one you gave on cawiki is not correct.

Qgil added a comment.Via ConduitJan 31 2014, 5:38 PM

As I said, the current information (or lack of) is confusing. Is there any wiki page or screenshot or anything we can link to?

In any case, ca.wiki wants to try it. :)

Ltrlg added a comment.Via ConduitJan 31 2014, 8:01 PM

Created attachment 14428
TemplateDataGenertor screenshot

I made a screenshot. I’ve cropped it to show only TemplateDataGenerator: it is a jQuery UI dialog centered on the screen.

Attached:

Jdforrester-WMF added a comment.Via ConduitFeb 7 2014, 5:47 PM

Follow-up in 60158.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.