This is a spike to identify some of the separation concerns and easily accomplished gains in splitting responsibilities among MobileFrontend's views. The outcomes of this task are more tasks.
[] Visit each Overlay.
[] Does it manage low-level view concern stuff like adding an item to a list or digging deep into a button and binding a listener? Thoroughly review each Overlay module and try to task out a plan for moving just the View code into a new a View-concerns-only file using the existing View patterns. For example, CategoryOverlay's View logic could be moved to CategoryOverlayView that subclasses View (like all other Views do) and then CategoryOverlay just composes it like it composes a gateway.
[] Does the overlay have its own private gateway but then marshal the data to new models? Make a task to move the marshaling to the gateway.
[] Visit each View. Does it have a gateway? Does it do other WEIRD STUFF that doesn't have much to do with views like changing window.location? Make a task to move it somewhere else.
The focus of this task is to document View refactoring that is achievable in the very near term. Don't worry about anything else except separting the Views out so they can be considered and refactored independently of other code. For example, if FooView.js
changed from using Hogan.js to Preact, hopefully after the separation very little outside the View itself would need to change.
== Outcomes
[] Patches shouldn't be needed, but if they help illustrate your write up go for it! Remember to use the WIP tag and mark as abandoned.
[] Write up - ideally on mediawiki.org in your user namespace.
[] Identify common problems/code patterns. Include a table in your write up to give a clear idea of which views have which problems
[] Prepare and arrange to discuss it in super happy dev time
= Sign off steps
[] Reopen/update/close T205592 as necessary.
[] Update and un-stall T207770 as necessary with learnings.
[] Update and un-stall T206335 with any applicable information