**Supporting the ‘maps’ parameter in TemplateData Editor (GUI)**
Name: Adham Essam Khatean
IRC nick: aekhatean
User Page: https://www.mediawiki.org/wiki/User:AdhamKhatean
Location: Damanhuor, Egypt.
Time Zone: Eastern European Time (EET) / (UTC+2).
Typical working hours: 4 PM to 2 AM (UTC+2).
Since I was a kid I always landed on some Wikipedia page when I am trying to learn about something that I am curious about. It was always my initial point of understanding a lot of concepts that I know now that made me interested in the things I am interested in. And you “the things that interest you define you” So you can say Wikipedia has a role of making me who I am today by making knowledge easily accessible. And now I want to give back to this great community and hopefully be part of it through contributing to its open source. And I think GoSC will be a great beginning as through this program I can have a mentor to help through the codebase and the communication of the MediaWiki community which is the engine of Wikipedia and other Wikimedia projects.
When I decided to contribute to MediaWiki, I installed it on my device and it was fairly normal to do something once you know how to do it. Unlike using it as an editor it was quite challenging to do something and it takes some time to get familiar with it. But when I tried using extensions like TemplateData it became easier for me as a user to modify templates, As it provided me with simple and efficient GUI. But, adding or modifying a map in the template is still complicated for a user and uses JSON syntax. So, I am interested in this project because I want to help make it easier for contributors to Wikimedia projects to share their knowledge with us, especially as this project will substitute manual editing dependent on JSON to a simple GUI.
TeplateData is a MediaWiki extension that was created to improve the template-editing experience for the user. Making it less confusing by providing the user with a list of suggested parameters and a description of every parameter of the template and what values are acceptable which makes it easier and also more time-efficient for the user to modify the template.
However, the TemplateData GUI Editor does not support the “Maps” parameter, yet. which makes it a challenging task to modify this parameter compared to other parameters. So, this project aims to bring the maps parameter with its full functionality to the GUI editor to make it easier for the average non-technical user to modify the “Maps” parameter.
- Adding the ‘maps’ parameter to the GUI editor.
- Detailed documentation of the new parameter.
- Unit Tests.
| **Period** | **Task** |
| May 4, 2020 - June 1, 2020 | -` Community bonding period`**,** `Familiarizing myself with MediaWiki specific tools involved in TemplateData GUI like OO-UI`**, and** `Analyzing TemplateData codebase and its relations with Mediawiki core, other extensions, and the database`. |
| June 2, 2020 - June 17, 2020 | - `Adding ‘map’ to the Type list of parameter types`**,** `Adding custom fields related to the maps parameter. Like: ISSN, DOI, place, etc.`**,** `Styling new fields with OO-UI like the rest of TemplateData GUI`. |
| June 18, 2020 - June 28, 2020 | - `Connecreating the new Fields witha mechanism to parse the Php backend`input information into JSON.`. |
| June 29, 2020 - July 3, 2020 | **- `Evaluation Phase I`**. |
| July 4, 2020 - July 26, 2020 | `Connecting the Php backend with JSON to modify and parse the file with the new data coming from the GUI and vice versanew Fields with the text editor after being parsed into JSON to show them in the text editor. And decoding the information to be shown and editable in the GUI editor`. |
| July 27, 2020 - July 31, 2020 | **- `Evaluation Phase II`** |
| Aug 1, 2020 - Aug 23, 2020 | `Testing the new feature`**,** `Documenting this feature in detail with simplicity in mind`. |
| Aug 24, 2020 - Aug 31, 2020 | **- `Submit Code and Final Evaluations`**. |
Using UX/UI friendly text box input fields to edit the JSON instead of leaving it exposed to the user, and the following figures might clarify the idea:
Instead of letting the user deal with something like that which might be confusing especially when JSON syntax errors occur,
We might make easier to use and more restrict so it does not make as many errors while saving the changes, but in the same time we still provide the user with some kind of flexibility by adding “add field” button so they do less for more, Like this:
1 - Name of the parameter does not have to be “map” which gives the user more freedom of picking their name: Map, Relations, Description, etc.
2 – Map is a type of parameters that has its own specs, and will be shown as text fields instead of JSON syntax. This way it will be easier for the user and also more restrict which can help us to push the best practice of this parameter.
3 – After users choose the “maps” type, a div will appear all the essentials of the map parameter and the ability to expand and add more. Like ISSN and DOI that also might be auto-generated using an API.
Here comes the usage of Php as a back-end that is compatible with HTML, which means it can take the data inserted by the user and parsing it to JSON using a Hook., And also deals with the API(s) used to generate data like serial numberDOI, DOIPublisher, ISSN –will appear for the user but the input field will not be editable- and push it to the user.
And the way that this should work is when the user interacts with extension to make the parameter of type “map” it runs a Hook that is registered in “TemplateDataHooks.php” to add this data to the JSONetc.
- After the user adds the “Map” parameter with and its related information it will be parsed into JSON and added to the text editor (the same mechanism as the rest of GUI editor).
**Contributions to MediaWiki**
- Submitted a Contribution to [[ https://phabricator.wikimedia.org/T217516 | T217516 ]]
- Submitted a Contribution to [[ https://phabricator.wikimedia.org/T200385 | T200385 ]]
- Submitted a Contribution to [[ https://phabricator.wikimedia.org/T248486 | T248486 ]]
- I am from Egypt. So, due to what my country is going through and the educational process being interrupted due to COVID-19 I might not be able to be active more than 20 - 25 hours starting from the 30th of May and for 3 - 4 weeks. As our exams in Egypt were postponed to at least the 30th of May.
- For the rest of the duration of the program, I will be available for 40+ hrs a week.