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)

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

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

The code looks good, but the tests are failing.

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 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

This is a technical task.