User:AdhamKhatean/Blogs/GSoC 2020 work submission, Wikimedia: Support 'maps' parameter in TemplateData Editor (GUI)

From mediawiki.org

As suggested in Support 'maps' parameter in TemplateData Editor (GUI), maps object needed to be part of TemplateData GUI to make it easier for non-technical users to use it.

You should be able to see a live version of the new maps panel in the GUI from this URL: https://simple.wikipedia.org/w/index.php?title=Template:Cite_web/doc&action=edit

And you can start using by:


1 - Click the “Manage TemplateData” button that you will find above the text editor.


2 - Click the “Edit maps” button.


But, if it was not deployed yet when visit this page here is how it looks:


1 - If your maps object is populated, and in this case, it contains one map consumer:


2 - If it is empty


3 - while adding new maps consumer


4 - If the user inserted invalid JSON


To make this happen we needed to divide this task into 4 steps:

1 - To create an initial maps panel in the GUI whether it is functional or not to start working, and that is what we did in the first phase in the project, and also created the basis to edit maps object through this panel, but still keeping it disabled for now

Task on Phabricator: Create the initial UI of Maps panel in TemplateData GUI

Task code on Gerrit: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TemplateData/+/602382/


2 - Making this panel functional, so users can start editing maps through it, this way maps object is isolated from the rest of the objects and a little bit easier to edit.

Task on Phabricator: Make the maps object editable from the TempateData dialog

Task code on Gerrit: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TemplateData/+/611903/


3 - Now that maps object is editable as a whole, it needs to be divided into separate maps to make the consumer -an object within maps object represents an app using the template- itself isolated. With the ability to add, remove, and modify different maps through the GUI.

Task on Phabricator: Allow different maps to be edited separately in the TemplateData dialog

Task code on Gerrit: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TemplateData/+/617702/


4 - After that finally, the consumer itself should be divided into its content objects, so users should be able to modify the internal of the consumer itself through the GUI without the need to Type any JSON.

Task on Phabricator: Divide maps consumer info to be edited separately

Task code on Gerrit: Not yet provided


Till now, we managed to get the first 3 steps out of 4 done.