Page MenuHomePhabricator

Use code editor widget in the TemplateData dialog to edit maps
Open, Needs TriagePublic

Description

Following T258820: Allow different maps to be edited separately in the TemplateData dialog, there will be a graphical user interface for adding maps, removing maps and reordering maps in the TemplateData dialog.

The JSON for each map can be edited via a MultilineTextInputWidget. Although this still involves editing JSON, it is an improvement, since the above actions can now be performed without writing JSON. Being able to edit the maps via the dialog is also an improvement on having to find the maps parameter in the wikitext edit area.

There are two different directions we could go in next:

  1. Make separate inputs for each property of each map (recursively, since map properties can also be objects with their own properties)
  2. Improve the support for JSON editing by using a proper code editor (e.g. like Ace Editor, which is currently available in the VisualEditor and CodeEditor extensions)

(1) is more difficult, so even if we decide to do that, it might be helpful to do (2) in the meantime. This work depends on T260790: Make Ace Editor available to TemplateData, to help with editing the maps parameter in the TemplateData dialog