Provide a neater way to edit transclusions that do not take a pipe (e.g. {{formatnum:…}}, {{lc:…}}, {{int:…}}, {{#dateformat:…}}})
Open, NormalPublic

Description

If I try to edit a number in a {{formatnum:…}}, the VisualEditor displays the template’s edition window, saying it is (for example) the 'formatnum:959719' template, without any parameter. So if I want to change the number, I need to remove the 'template' and then to add a new one, for example 'formatnum:958719'.

The editor should allow changing the number without having to remove the 'template'.

Details

Reference
bz49954
bzimport raised the priority of this task from to Low.
bzimport set Reference to bz49954.
Ltrlg created this task.Jun 21 2013, 12:15 PM

"{{formatnum:…}} is not a template" - true

For this, Parsoid takes wikitext like:

This was {{formatnum:1234567890}} years ago.

… and gives us HTML of:

<p data-parsoid="…">This was <span about="#mwt1" typeof="mw:Transclusion" data-mw="{'target':{'wt':'formatnum:1234567890','function':'formatnum'}" data-parsoid="…">1,234,567,890</span> years ago.</p>

… so maybe we'd want to special-case on 'function':'formatnum' so that they're easier to edit?

Danmichaelo renamed this task from VisualEditor: Provide a neater way to edit transclusions that do not take a pipe (e.g. {{formatnum:…}}) to VisualEditor: {{formatnum:…}}) cannot be edited.Jun 28 2017, 8:06 PM
Danmichaelo raised the priority of this task from Low to Normal.

Was hit by this limitation when I was editing an article now. Couldn't find any way to edit the number except to delete it, so I changed the title to reflect that.

Krinkle removed a subscriber: Krinkle.Jun 28 2017, 8:12 PM

Was hit by this limitation when I was editing an article now. Couldn't find any way to edit the number except to delete it, so I changed the title to reflect that.

Thanks for the input, but please don't make bugs less general. You can add further examples of how they affect you, but that should be as a comment or in the description, not removing other things that are already covered by this task. For instance, this also applies to the #dateformat, lc, and int transclusion objects.

Jdforrester-WMF renamed this task from VisualEditor: {{formatnum:…}}) cannot be edited to Provide a neater way to edit transclusions that do not take a pipe (e.g. {{formatnum:…}}, {{lc:…}}, {{int:…}}, {{#dateformat:…}}}).Jun 29 2017, 2:24 PM
Jdforrester-WMF updated the task description. (Show Details)