Page MenuHomePhabricator

Swap Hogan for Mustache
Closed, DuplicatePublic

Description

Hogan.js is used in MobileFrontend and non-standard given Mustache's existence in core. By removing Hogan, we get a smaller and maintained library, a consistent way to render server and client templates and we unblock teams like performance (see T127268).

Precursors:

  • All templates are generated by a util wrapper function
  • All templatePartials are gone.
  • RelatedArticles no longer uses templates and/or mediawiki.template.hogan

Developer notes

renderTemplate: function ( templateSourceCode ) {
  return mw.template.compile( templateSourceCode, 'hogan' );
}

will be swapped with

renderTemplate: function ( templateSourceCode ) {
  return mw.template.compile( templateSourceCode, 'mustache' );
}

Acceptance criteria

  • We have QAed all features prior to merge.
  • It is possible to revert the patch if we hit any problems
  • The mediawiki.template.hogan module is kept but marked as deprecated for any pages that continue to use it (for cached HTML) to allow us to revert if necessary.

Event Timeline

Jdlrobson changed the task status from Open to Stalled.Apr 2 2019, 12:00 AM
Jdlrobson triaged this task as Medium priority.
Jdlrobson updated the task description. (Show Details)