Working with the Visual Editor within Outreachy

Translate this post

Continuing our work in the wish #3 of the Lusophone Technological Wishlist within the 32nd round of Outreachy…

Over the past weeks, development focused on MediaWiki, Visual Editor and their core extension ecosystem. While the validation logic itself was initially expected to be straightforward, configuring the local ecosystem presented the first major complexity. Setting up VisualEditor, Citoid, and Cite locally required carefully identifying and setting up the exact suite of dependencies needed to replicate Wikipedia’s production environment.

Following mentor recommendations, the setup was built using a Wikimedia dockerized environment. To ensure accurate citation formatting and parsing, the following extensions were required to integrate:

  • Cite, Citoid which are required to search, retrieve, and translate inputs (ISBN, DOI, or URL) into reference nodes.
  • TemplateData, Scribunto, TemplateStyles to support structured citation template rendering.

A key learning in this initial stage was that a mismatch between Citoid’s expected metadata structure and the local template key identifiers causes a parsing failure. After fixing, the end-to-end debugging automation citation flow was ready to use. 

The next phase was development iterations and workflow progressions. The first ‘proof of concept’ successfully captured duplicate reference nodes within the Automatic Tab and displayed a prompt within the dialog. Then a direct redirect button was introduced to transfer users to the Re-Use tab. The initial patch was submitted to Gerrit for review. The feedback from mentors included establishing unit tests, fixing bugs and improving the validation logic. 

In collaboration with project mentors we explored different alternatives to resolve duplicates. One option was to resolve this duplicate in the active dialog instead of redirecting. This first attempt worked but ignored the option to add details in a reference. So, the flow was adjusted back to redirect to the Re-Use tab and enhanced to include the details information when present.

"Add a citation" popup in Visual Editor with new feature of "duplicate reference found".
“Add a citation” popup in Visual Editor modified with new in development feature of “duplicate reference found”.

Wikimedia provides extensive documentation. Covering extension configuration, core file structures and navigating a high volume of technical resources was initially overwhelming. 

As part of the next steps and status at this stage, the patch for the VisualEditor duplicate reference validation is currently under review on Gerrit. While awaiting further feedback to polish this implementation, project efforts are transitioning to new objectives on the Lusophone wishlist, specifically wish #8.

It is expected a transition to work mainly on Python instead of Javascript and focus on reviewing the WikiScore project codebase and updating it to support Wikidata. Further updates on the patch status and the initial findings on WikiScore will be detailed in the next progress report. 

Can you help us translate this article?

In order for this article to reach as many people as possible we would like your help. Can you translate this article to get the message out?