Page MenuHomePhabricator

[Story] Use MediaViewer on commonsMedia properties on Wikibase repo
Closed, ResolvedPublic

Description

We currently have a default gadget that displays the image inline using jquery.ui (https://www.wikidata.org/wiki/MediaWiki:Gadget-CommonsMedia.js) but it would be much much cooler/better to use MediaViewer for this.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:42 AM
bzimport set Reference to bz69456.
bzimport added a subscriber: Unknown Object (MLST).
Legoktm created this task.Aug 13 2014, 5:10 AM
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher renamed this task from Use MediaViewer on commonsMedia properties on Wikibase repo to [Story] Use MediaViewer on commonsMedia properties on Wikibase repo.Aug 13 2015, 7:12 PM
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher set Security to None.
Lydia_Pintscher removed a subscriber: Wikidata-bugs.
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald TranscriptAug 13 2015, 7:12 PM
Tgr added a subscriber: Tgr.Aug 13 2015, 7:29 PM

See second and third points in T108778#1530558.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 5:54 PM

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

Tgr added a comment.Jun 25 2016, 9:01 PM

Related MV tasks: T59298: The viewer box should not depend on the current page, T77152: Support Developer Plugins/Gadgets in Media Viewer. @hoo if you have thoughts on what kind of hooks would be helpful please add it to that task!

@hoo: Can you add a link to the user script you wrote? Then I'll get it to editors and ask what they think.

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptAug 7 2017, 5:47 PM
hoo added a comment.Apr 13 2018, 9:27 PM

If T46727: [Story] Statement should show a thumbnail for image/video/audio properties is resolved, we will get this for free :)

(Someone needs to disable the gadget in that case, though)

hoo closed this task as Resolved.Apr 14 2018, 9:33 AM
hoo claimed this task.

Once the thumbnails appear (that might need a page purge), MediaViewer will automatically pick them up.

hoo reopened this task as Open.Apr 18 2018, 12:20 AM

Actually I was (slightly) wrong here, while MMV is going to pick up the images automatically, it does not automatically load.
This is because the loading of the required RL modules is not (automatically) triggered.

This is because MMV loads [ 'mmv.head', 'mmv.bootstrap.autostart' ] (for non-file pages) only if OutputPage::getFileSearchOptions is non-empty. But for Wikibase entities, getFileSearchOptions is empty, as we register images without sha1 or timestamp in ParserOutput::addImage. I'm not sure how to proceed here… I don't see how MMV would be able to find out whether images exist on a page. Maybe Wikibase should actually also set the sha1 and timestamp?

As a TEMPORARY workaround the following JavaScript could be added site-wide mw.loader.using( 'mmv.bootstrap.autostart' );.

Change 427285 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Properly add images via ParserOutput::addImage

https://gerrit.wikimedia.org/r/427285

Change 427285 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Properly add images via ParserOutput::addImage

https://gerrit.wikimedia.org/r/427285

hoo closed this task as Resolved.Apr 18 2018, 1:58 PM
hoo removed a project: Patch-For-Review.

Mentioned on wiki that the workaround can be removed on (or after) June 1st (when the change has been deployed long enough for all caches to be expired for sure).