Page MenuHomePhabricator

[GOAL] Build Minerva the way we build Vector (adoption of SkinMustache)
Closed, ResolvedPublic


Specific: What do we want to achieve?

The Minerva skin operates in a hybrid mode using the new SkinMustache class we created for desktop improvements and a legacy MinervaTemplate which uses BaseTemplate. We'd like to remove the MinervaTemplate code from Minerva. Doing this will require moving functions/data from MinervaTemplate into SkinMinerva and/or SkinMustache in core.

Measurable: How will we know when we've reached our goal?

  • MinervaTemplate should no longer exist
  • When reviewing SkinMinerva::getTemplateData and SkinMustache::getTemplateData we should confirm that no duplicate template data gets generated. Any duplicate information if too difficult to migrate should be documented for a future time.
  • SkinMinerva will not contain any calls to $tpl->set

Achievable: What support will we need to achieve our goal?

No support from outside the team should be necessary.

Relevant: Is this goal worthwhile?

Doing this will:

  • Improve performance - the hybrid mode means a lot of template data is generated twice
  • Improve the template data in core that's available for Vector and other skins
  • Reduce the overall amount of code the team maintains.

Time-bound: What is the time frame? Can we achieve this goal in the timeframe I've set?

Scoping this to the MinervaTemplate should make it possible to complete this within a month

More background

Now SkinMinerva is using SkinMustache (T256083) slowly migrate the contents of MinervaTemplate piece by piece to the new SkinMinerva class. Wherever possible refer and use the core SkinMustache template variables or use names/data structures that mirror the template variables used in SkinVector

  • Unused template variables are removed
  • Replace subtitle with data provided by SkinMinerva
  • Replace all message keys variables defined inside getTemplateData e.g. main-menu-tooltip with definitions inside SkinMinerva::$options['message']


  • When MinervaTemplate has been reduced to a getTemplateData function and private functions, move these functions to SkinMinerva and remove the MinervaTemplate class
  • Review all triple brace template variables e.g. {{{search}}} and replace with templates and data where possible
  • Make sure all template keys provided by Minerva have "minerva-" in their title so they can be distinguished from values coming from core.

Related Objects

Event Timeline

Jdlrobson renamed this task from Simplify Minerva through further adoption of SkinMustache to [GOAL] Simplify Minerva through further adoption of SkinMustache.Jun 2 2021, 8:19 PM
Jdlrobson moved this task from Triaged but Future to Epics/Goals on the Readers-Web-Backlog board.
Jdlrobson renamed this task from [GOAL] Simplify Minerva through further adoption of SkinMustache to [GOAL] Build Minerva the way we build Vector (adoption of SkinMustache).Jun 22 2021, 8:26 PM
This comment was removed by Jdlrobson.
nray removed nray as the assignee of this task.
nray updated the task description. (Show Details)
nray added a subscriber: nray.