Last modified: 2014-04-18 23:52:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64594, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62594 - Media Viewer doesn't trigger on Flow-enabled talk pages
Media Viewer doesn't trigger on Flow-enabled talk pages
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-13 02:13 UTC by Erik Moeller
Modified: 2014-04-18 23:52 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Erik Moeller 2014-03-13 02:13:00 UTC
e.g. https://www.mediawiki.org/wiki/Talk:Flow
Comment 1 Tisza Gergő 2014-03-19 18:32:37 UTC
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.
Comment 2 spage 2014-04-18 23:52:14 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links