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 (incomplete)
- Separate the LazyLoadedImages transform from MobileFormatter (https://gerrit.wikimedia.org/r/448415)
- Separate the LazyLoadedReferences transform from MobileFormatter
- Separate the LegacyMainPage transform from MobileFormatter (https://gerrit.wikimedia.org/r/#/c/401786/)
- Separate out the RemoveImages transform from MobileFormatter
- Separate out the SectionWrapping transform from MobileFormatter
- Review remaining transforms and their purpose (are they redundant?)
- Add tests for AddMobileTocTransform
- MobileContext contains many methods which should be migrated to the MobileFormatter - for example, [get|set]ContentTransformations. Review and port as appropriate