Fourth and Fifth Week into the Coding Period
Summary of the third report
In the previous report, I had provided a detailed walkthrough of implementation of Mission 1 of The Userscript Tour. Since then, I have been working on Mission 2: Developing with ResourceLoader along with fine tuning Mission 1. As my GSoC project is more design-oriented, it certainly requires amendments at various stages. I consult with my mentors every week to bring some changes to already created features.
In these two weeks, I have completely implemented Mission 2. With that, 50% of the project is done (Phew!).
Mission 2 is all about making the new developers familiar with ResourceLoader, which is MediaWiki’s delivery mechanism for assets (JavaScript, Styles, and Localisation text). After going through this mission, the users will gain insights on ResourceLoader and hands-on experience of using RL core modules in userscripts.
Pages created on MediaWiki
- TUT/2/Start
- TUT/2/Question1
- TUT/2/Question1/1
- TUT/2/Question1/2
- TUT/2/Question1/3
- TUT/2/ResourceLoader/CoreModules
- TUT/Badge/2
- TUT/Badge/2template
- TUT/Badge/2template1
- TUT/2/End
Userscript created
-
toggleFontColor.js: Adds a button to the p-personal portlet area, which when clicked toggles the font-color of the content. It’s created to show the use of mediawiki.util module.
-
quickChangeLog.js: Adds a link to the Toolbox portlet area, which when clicked shows 25 most recent changes on MediaWiki in the form of a OOUI message dialog.
Sequence of steps in Mission 2
- Developing with ResourceLoader
- ResourceLoader
- Are these resources requested separately
- Module
- Do I have to request all modules?
- Hands-On
- Edit common.js
- mw.notify()
- Edit summary and Save Changes
- Good work!
- Challenge yourself above
- mw.loader.using()
- Toggle font color
- Play around
- Sneak Peek
- All the core modules!
- Your subpage
- Check it out
- The Rationale
- Load Quick ChangeLog
- Edit summary and Save Changes
- Play around
- Congrats!
- Mission 2 complete!
Moreover, I have deployed these two missions on test.wikipedia.org which is highly convenient as I can ascertain its behaviour when it would be deployed on mediawiki.org.