Page MenuHomePhabricator

VisualEditor: Transclusions editor should support parser functions and variables
Open, LowPublic

Description

Parser function syntax is generally {{#function_name : expr1 | expr2 | expr3 | ...}}

Currently VE sees this as a template with name "#function_name : expr1" and arguments "1 = expr2", "2 = expr3", etc. This makes it impossible to edit expr1 in VE.

Same for parserfunctions like urlencode and template messages. The transclusions editor should be able to handle them, preferably by invisibly detecting them and failing that with a special, user-selected mode. Until we can, we should show an explanatory message when the user attempts to add one.

See also:
T54607: TemplateData: Implement hook for extensions to document magic words and parser functions

Details

Reference
bz50855

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:51 AM
bzimport set Reference to bz50855.
TheDJ created this task.Jul 6 2013, 9:49 AM

Yes, we need a special form of editing transclusions which aren't templates; I can't recall whether Parsoid gives us sufficient information to recognise these as different except for introspection.

NicoV added a comment.Jul 10 2013, 2:16 PM

Many of the parser functions are rarely used in the main namespace (#if, ...), but some of them are really important even in the main namespace. For example {{formatnum:...}} is probably used a lot there.

Jdforrester-WMF lowered the priority of this task from High to Normal.Jan 9 2015, 10:55 PM

If Parsoid doesn't automatically tell VE whether something is a template or not, could it not be done by looking at the format of the string (e.g. {{# is never a template) or comparing it to a list of parser functions?

Neil_P._Quinn_WMF renamed this task from VisualEditor: Transclusions editor should have a special mode for Parser Function and Magic Word calls to VisualEditor: Transclusions editor should support parser functions and variables.Jul 23 2015, 11:00 PM
Neil_P._Quinn_WMF lowered the priority of this task from Normal to Low.
Neil_P._Quinn_WMF updated the task description. (Show Details)
Neil_P._Quinn_WMF added a project: Epic.
Neil_P._Quinn_WMF set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2015, 11:00 PM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptFeb 7 2016, 9:57 PM
J5lx awarded a token.Dec 15 2016, 8:44 PM
J5lx added a subscriber: J5lx.
Elitre added a subscriber: Elitre.Sep 26 2017, 6:58 PM