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

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 1 2019, 10:50 PM
Jdlrobson triaged this task as High priority.Apr 1 2019, 10:50 PM
Jdlrobson moved this task from Incoming to Upcoming on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)Apr 1 2019, 10:54 PM
pmiazga updated the task description. (Show Details)Apr 2 2019, 4:19 PM
Jdlrobson set the point value for this task to 5.Apr 2 2019, 4:30 PM
Krinkle removed a subscriber: Krinkle.Apr 3 2019, 4:47 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 closed this task as Resolved.Apr 10 2019, 4:03 PM
Jdlrobson updated the task description. (Show Details)