We will remove Hogan from MobileFrontend and make sure of Mustache in core. Mustache is smaller, uses the same syntax and available in MediaWiki. This will make it easier for template users working across mobile and desktop environments.
- A dependency is added to mediawiki.template.hogan to mediawiki.template.mustache
- For compatibility with Minerva which cannot use inline templates (right now) , to avoid loading both Mustache and Hogan and to avoid this being a breaking change the Hogan compiler should remain but look like this:
// register hogan compiler with core mw.template.registerCompiler( 'hogan', mw.template.getCompiler('mustache') );
- Any webpack dependencies relating to Hogan are removed.
- A deprecated flag is added to mediawiki.template.hogan to ensure existing users move to mediawiki.template.mustache
Switching Hogan to Mustache will have implications on Minerva, which will still be using templates for rendering page issues, main menu, notifications and the back to top feature
- In beta ensure the back to top feature is still rendering and matches production when opted into BETA (Android only)
- Make sure the main menu rendering matches production
- Make sure the page issues overlay rendering matches production. Use https://en.m.wikipedia.beta.wmflabs.org/wiki/Pharmacovigilance for testing this.
- Make sure the notification badge (top right corner in LTR mode) is still rendering and matches production.
A general QA of the entire site (either by developer and/or test engineer) will also be needed to check different flows are rendering easily. (This would be much more straightforward if we had a Storybook)
Sign off steps
- Record this on release timeline
- Open a task to update Minerva to use mediawiki.template.mustache (already done)
- Open a task to remove the mediawiki.template.hogan module completely (patch merged 3 weeks after, no task necessary)