**Supporting the ‘maps’ parameter in TemplateData Editor (GUI)**
Name: Adham Essam Khatean
IRC nick: aekhatean
User Page: https://www.mediawiki.org/wiki/User:AdhamKhatean
Github: https://github.com/aekhatean
Location: Damanhuor, Egypt.
Time Zone: Eastern European Time (EET) / (UTC+2).
Typical working hours: 4 PM to 2 AM (UTC+2).
**Why MediaWiki?**
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.
**Why TemplateData?**
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.
**Synopsis**
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.
**Technologies**
- JavaScript
- Php
- OO-UI
- JSON
**Deliverables**
- Adding the ‘maps’ parameter to the GUI editor.
- Detailed documentation of the new parameter.
- Unit Tests.
**Timeline**
| **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 parameterDisplay text of maps value if present (not editable)`**,** `Adding a button ‘edit maps’ to the main panel of the GUI to access edit maps panel.`**,** `SAdding a multiline text input in the "edit maps" panel. So users can add and remove consumer keys and edit info Like: ISSN, DOI, place, etc.`**,** `Styling new fields with OO-UI like the rest of TemplateData GUI`. |
| June 18, 2020 - June 28, 2020 | - `CreatStyling a mechanism to parsnew fields with OO-UI like the input information into JSONrest of TemplateData GUI.`. |
| June 29, 2020 - July 3, 2020 | **- `Evaluation Phase I`**. |
| July 4, 2020 - July 26, 2020 | `Connecting the new Fields with the text editor after being parsto show them in the text editor as json encoded into JSON toformation to be show themn and editable in the textGUI editor. And decoding the information to be shown and editable in the GUI editor`later decoded`. |
| July 27, 2020 - July 31, 2020 | **- `Evaluation Phase II`** |
| Aug 1, 2020 - Aug 23, 2020 | `Developing a mechanism to parse the input information into JSON.`**,**`Testing the new feature`**,** `Documenting this feature in detail with simplicity in mind`. |
| Aug 24, 2020 - Aug 31, 2020 | **- `Submit Code and Final Evaluations`**. |
> **Description**
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,
{F31702456}
We might make easier to use and more restrict so it does not make as many errors while saving the changes, but at the same time we still provide the user with some kind of flexibility by Creating new panel (Map Panel) which gives users the ability to modify maps object easily through TemplateData GUI instead of the text editor.
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:{F31904743}
{F31702458}904746}
Which means:So, taking a simple map for example, instead of inserting map info like this:
“Maps”: {
“Temp”: {
“Title”: “title”,
“Author”: “name”,
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. “Date”: “date”
}
}
Users can simply use this format:
Title: title
Author: name
Date: date
Which means:
21 – Map is a type of parametersn object that has its own specs, and will be shown as multiline text fieldsinput 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 parameterwith less cryptic symbols and also cause fewer errors.
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, DOI, Publisher2 – After users click the “Edit map” button, etca new panel will appear showing map info that is already inserted and can also append more.
- 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 mechanismway 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 ]]
**Commitment**
- 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.