This is awesome.
Rather than MMV depending on MobileFrontend, if we want to make this
work on mobile I imagine a better thing to do would be to make it
dependent on Extension:Mantle [1] since Mantle currently provides the
templates that this would need and is a much more lightweight
extension to add as a dependency.
This could be a great opportunity to move Overlay.js from
MobileFrontend to extension Mantle and try and begin consolidating
MediaViewer, MobileFrontend, VE and Flow's Overlay/Modal JS and css
code here. We already successfully began porting MobileFrontend's
class system to OOJS so this would give us an opportunity to reduce
some of MediaWiki's code debt relating to overlays and move closer to
a unified OOUI modal/overlay thing. I'd be interested in looking at
how OOUI's Modals and MobileFrontend's Overlay differ.