Page MenuHomePhabricator

Reuse ClientPreferencesContainer.mustache template in JS version of client preferences
Closed, DeclinedPublicBUG REPORT

Description

In T350417 we built out the client preferences UI using a mustache template.
In T350195 we built out the client preferences UI using vanilla JS DOM manipulation.

In order to maintain consistency across the js & server-rendered versions of the UI, we should unify these implementations.
We can do that by using the Mustache template in the JS implementation.

This work involves:

  • Loading the Mustache.js library on the client
  • Loading the mustache template on the client
  • Parsing the template with the library
  • Attaching the necessary event handlers to the template and appending it to the DOM

Open questions

  • The mustache.js library is about 8kb of JS (not insignificant). Does this need a specialized loading strategy, e.g. loading this on dropdown click?
  • If we load this on click, do we need an intermittent dropdown state before the library & template loads?

Event Timeline

I don't think there's strong motivation or time to do this. If we still want to do it, we should create a new ticket with the new phabricator template to capture motivation.