- Create an ArticleCoordinator, that can only push on a single ArticleViewController. We won’t mess with child coordinators yet. ArticleCoordinator should also take the new articleSource enum that Article needs for metrics.
- Create a MysteryLinkCoordinator. It takes in a URL in its init (also maybe articleSource?). In start, it will inspect the URL, determine if it’s an article URL, if so then create an ArticleCoordinator and start it. We may want some callback (somehow) from this start that informs the caller whether this was successful or not (fail if URL indicates a non-article).
- In ArticleVC, when a link is tapped, spin up MysteryLinkCoordinator and tell it to start. If this start method failed (i.e. is a non-article link), fall back to the the old navigate() UIViewController extension method that already exists in this place.
- In other areas that push to ArticleVC using the old navigate() method, repeat logic in step 3 (talk pages comes to mind).
- In areas that call ArticleViewController() directly to push, instead call ArticleCoordinator and push (WMFContentGroup+DetailViewControllers comes to mind).
- Watch out for retain cycles, and figure out how Article peek/pop would work with the Article coordinator.
QA Notes
Starting in TestFlight 7.7.3 (5024), can also test in later versions/builds.
- Regression on all article navigation. Any area in the app that could navigate to an article, ensure it navigates as expected.
- Regression on article deep links (both when app is backgrounded and when app is terminated).
- Regression test article link long presses (peek and pop)
- Regression test T382032 and ensure it's still logging the correct source values.