During the lead paragraph work we began a refactor of the MobileFormatter class for best testability and readability.
Code coverage of the new transforms is good:
https://doc.wikimedia.org/cover-extensions/MobileFrontend/transforms/index.html
https://doc.wikimedia.org/cover-extensions/MobileFrontend/MobileFormatter.php.html
Work (complete)
- Separate the LazyLoadedImages transform from MobileFormatter (https://gerrit.wikimedia.org/r/448415)
- Separate the LegacyMainPage transform from MobileFormatter (https://gerrit.wikimedia.org/r/#/401786)
- Add tests for AddMobileTocTransform
- Separate out the RemoveImagesTransform from MobileFormatter and mark as @deprecated referencing T186627 (https://gerrit.wikimedia.org/r/620716)
- Separate out the MobileSectionTransform transform from MobileFormatter (https://gerrit.wikimedia.org/r/621981)
- Create the SubHeadingTransform transform that applies the logic inside HeadingsEditable (https://gerrit.wikimedia.org/r/623415)
Sign off steps
- MobileContext contains many methods which should be migrated to the MobileFormatter - for example, [get|set]ContentTransformations. Review and port as appropriate. Create tasks.
- Review remaining transforms and their purpose (are they redundant?) . Create tasks.