Page MenuHomePhabricator

Media Viewer doesn't trigger on Flow-enabled talk pages
Closed, DuplicatePublic

Description

e.g. https://www.mediawiki.org/wiki/Talk:Flow


Version: unspecified
Severity: normal

Details

Reference
bz62594

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:04 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz62594.
bzimport added a subscriber: Unknown Object (MLST).

The markup for the image is

<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid="{&quot;optList&quot;:[{&quot;ck&quot;:&quot;thumbnail&quot;,&quot;ak&quot;:&quot;thumb&quot;}],&quot;dsr&quot;:[0,57,2,2]}"><a href="./File:Flow-echo_notices_need_longer_excerpts.png" data-parsoid="{&quot;a&quot;:{&quot;href&quot;:&quot;./File:Flow-echo_notices_need_longer_excerpts.png&quot;},&quot;dsr&quot;:[2,55,null,null]}"><img resource="./File:Flow-echo_notices_need_longer_excerpts.png" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Flow-echo_notices_need_longer_excerpts.png/220px-Flow-echo_notices_need_longer_excerpts.png" height="185" width="220" data-parsoid="{&quot;a&quot;:{&quot;resource&quot;:&quot;./File:Flow-echo_notices_need_longer_excerpts.png&quot;,&quot;height&quot;:&quot;185&quot;,&quot;width&quot;:&quot;220&quot;},&quot;sa&quot;:{&quot;resource&quot;:&quot;File:Flow-echo notices need longer excerpts.png&quot;}}"></a></figure>

figure[typeof=mw:Image/Thumb] img seems like a good selector to match these. We would need to refactor MultimediaViewerBootstrap.processThumb a bit since too much of the current thumb markup is hardcoded in the logic.

Thanks for the analysis. Parsoid produces the markup. Flow has a bug 61786 to style that HTML better (borders and Enlarge/magnify icon).

More notes from Gergő's on this:

  • MultimediaViewerHooks::getModulesForArticle() - this checks if the image has any articles at all. It uses $out->getFileSearchOptions(), dunno if that works with Flow. If not, you need to add another exception like the one we have for file pages.
  • processThumb() in mmv.bootstrap.js - this is the that selects the actual images from the DOM.
  • MultimediaViewerHooks::thumbnailBeforeProduceHTML() adds size information to images and createNewImage() in mmv.js reads it back. Images without size information will still work, but having that information there makes the viewer more performant.
Restricted Application added subscribers: Matanya, Aklapper. · View Herald Transcript

Mass-removing the Multimedia tag from MediaViewer tasks, as this is now being worked on by the Reading department, not Editing's Multimedia team.

dr0ptp4kt lowered the priority of this task from Medium to Low.Jul 7 2016, 8:50 PM
dr0ptp4kt moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.