MinervaTemplate::getTemplateData sets data that is indirectly setting data already set in SkinMinerva.
For example SkinMinerva::prepareBanners sets the bannersfield.
All these keys should be set inside SkinMinerva::getTemplateData.
For example the banners key could be set by making prepareBanners return a string and updating SkinMinerva::getTemplateData like so:
'banners' => $this->prepareBanners(),
All remaining code inside MinervaTemplate is in the scope of this task:
'banners' => $data['banners'], 'isAnon' => $data['username'] === null, 'userNotificationsHTML' => $data['userNotificationsHTML'] ?? '', 'data-main-menu' => $this->getMainMenuData( $data ), 'hasheadingholder' => $hasHeadingHolder, 'taglinehtml' => $data['taglinehtml'], 'headinghtml' => $data['headinghtml'] ?? '', 'postheadinghtml' => $data['postheadinghtml'] ?? '', 'userMenuHTML' => $data['userMenuHTML'],
TODO
- At the end of this task MinervaTemplate should cease to exist.
- When handling isAnon make sure the data field is replaced with the existing is-anon field rather than creating a new one.
- There should be no calls to $tpl->set inside SkinMinerva
- There should be no creation of MinervaTemplate inside SkinMinerva
QA steps
- Make sure an article page in Minerva looks the same between beta cluster and production
- Test for anonymous users
- Test for logged in users with AMC disabled
- Test for logged in users with AMC enabled
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T293815#7524254 |
2 | ✅ | T293815#7524254 |
3 | ✅ | T293815#7524254 |