Page MenuHomePhabricator

Inline Hogan templates in mobile.startup
Closed, ResolvedPublic5 Estimated Story Points


In preparation for removing Hogan we will slowly move templates out of ResourceLoader and into source code. We will begin by scoping this work to mobile.startup to uncover any issues with this approach.


template: mw.template.get( '', 'SectionAddOverlay.hogan' ),


template: util.templateRender(`
  <div class="overlay-header-container header-container position-fixed">

  <div class="overlay-content"></div>

Acceptance criteria

  • A util wrapper function has been created in mobile.startup/util.js - this in future will allow us to swap all hogan renders for a mustache render. It takes template source code and returns a template with a render function.
  • All the files in mobile.startup have been inlined.
  • Increase in JS bundlesizes should be consistent with the removal of the size of ResourceLoader's mobile.startup module.

Sign off steps

  • Create task(s) for the remaining Hogan templates in MobileFrontend.

Event Timeline

Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-Backlog board.
Jdlrobson set the point value for this task to 5.Apr 2 2019, 4:30 PM

Change 501048 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Templates are inlined in mobile.startup

Change 501048 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Templates are inlined in mobile.startup

Jdlrobson updated the task description. (Show Details)