Page MenuHomePhabricator

Don't load Mustache and Hogan on mobile
Closed, ResolvedPublic

Description

Currently QuickSurveys loads Mustache on mobile which is unacceptable for production given that the mobile site already heavily relies on Hogan and this results in the loading of frontend code for both Hogan and Mustache which do essentially the same job in slightly different languages.

On the long term we'll need to convert Hogan templates to Mustache (see T94086)

In the short term we have several options

  1. Hybrid approach - load the right template language depending on platform - it is possible to write templates that render with both Mustache and Hogan by using a subset of the language.
  2. Don't use templates at all.

I'm keen to go with 1 given it will provide useful information with how existing MobileFrontend code can be ported to oojs ui / used on desktop. 2 seems conterproductive given the investment we've made in templates in MobileFrontend and believe that they allow a controlled way to rapidly prototype ideas and a strong belief that they can fit into the oojs ui ecosytem usefully.

Event Timeline

Jdlrobson raised the priority of this task from to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Jhernandez, Aklapper, Jdlrobson.

Change 235655 had a related patch set uploaded (by Jdlrobson):
Do not load Mustache and Hogan on mobile

https://gerrit.wikimedia.org/r/235655

Jdlrobson moved this task from Needs Analysis to Code Review on the Reading-Web-Sprint-55-π board.

The code looks good, but the tests are failing.

phuedx added a subscriber: phuedx.Sep 3 2015, 2:27 PM

I don't think I understand what the problem is here @Jdlrobson. A little detail why our existing approach is wrong/unacceptable would be greatly appreciated.

Jdlrobson updated the task description. (Show Details)Sep 3 2015, 4:35 PM
Jdlrobson set Security to None.

@phuedx any better? Thanks for pushing me to write better tasks.

Change 235655 merged by jenkins-bot:
Do not load Mustache and Hogan on mobile

https://gerrit.wikimedia.org/r/235655

phuedx closed this task as Resolved.Sep 8 2015, 8:19 AM

This is a technical task.