Page MenuHomePhabricator

TemplateData should use "jquery.textSelection" for interaction with textareas
Closed, ResolvedPublic1 Story Points

Description

This would make the GUI tool for adding TemplateData to templates compatible with gadgets and user scripts such as the popular WikEd. Currently, the data is not saved if the gadget is enabled, as reported at

Details

Reference
bz71363
Related Gerrit Patches:
mediawiki/extensions/TemplateData : masterUse textSelection API to modify textarea

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:43 AM
bzimport added a project: TemplateData.
bzimport set Reference to bz71363.

Gadget bugs aren't tracked in Bugzilla per community request (though it's going to be worth reviewing that in the light of Phabricator). Should we mark as INVALID?

WikEd is not an extension hence this is unfortunately out of scope for Bugzilla.
Closing as INVALID as this is not a bug in MediaWiki software or its extension, but in an on-wiki script/gadget.

[OT]

though it's going to be worth reviewing that in the light of Phabricator

The issue tracking tool feels rather unrelated; a central hosting for gadgets is rather what I consider to be needed first.

He7d3r added a subscriber: He7d3r.Dec 27 2016, 5:43 PM

Part of the problem reported on this task is TemplateData's fault, which should be using the default module "jquery.textSelection" for interaction with the textarea instead of these custom methods:
https://github.com/wikimedia/mediawiki-extensions-TemplateData/blob/9e721d24326a81529ea07739dff1657ed1c677f5/modules/ext.templateDataGenerator.target.js#L343-L353
(this is what is done by CodeEditor, CodeMirror and gadgets/users scripts in general)

I think this task can be re-purposed for implementing that, so I'm reopening it.

Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 27 2016, 5:43 PM
He7d3r renamed this task from WikEd is not compatible with the TemplateData editor: TemplateData is not saved to TemplateData should use "jquery.textSelection" for interaction with textareas.Dec 27 2016, 5:51 PM
He7d3r reopened this task as Open.
He7d3r added a project: JavaScript.
He7d3r updated the task description. (Show Details)
Jdforrester-WMF triaged this task as Lowest priority.Jan 4 2017, 1:27 AM

Compatibility with gadgets is not a priority for us right now, but we'd be happy to review and merge submitted patches to move this forward faster.

Change 405668 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/TemplateData@master] Use textSelection API to modify textarea

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

Deskana set the point value for this task to 1.Jan 22 2018, 8:26 PM
Krinkle removed a subscriber: Krinkle.Jan 23 2018, 1:22 AM

Change 405668 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Use textSelection API to modify textarea

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

Jdforrester-WMF closed this task as Resolved.Jan 30 2018, 5:50 PM
Jdforrester-WMF claimed this task.
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF moved this task from Freezer to TR1: Releases on the VisualEditor board.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptJan 30 2018, 5:50 PM