An image click on-wiki should trigger MediaViewer according to user's preferences, if possible.
Description
Related Objects
- Mentioned Here
- T59298: The viewer box should not depend on the current page
Event Timeline
To get this to work, we would probably have to re-initialize MediaViewer after View it!'s carousel has loaded. I've done some investigating, and also got some guidance from @Tgr.
The entire page could be entirely re-initialized using a wikipage.content hook. We may also be able to process individual images using mw.mmv.bootstrap.processThumbs($container).
The real messy part is that MediaViewer only processes images in a thumbnail format. There have been attempts in the past (e.g. this script) to re-initialize MediaViewer after initial page load; in this script, they create dummy thumbnails for use by MediaViewer.
This sounds possible to implement, albeit with messy code and unclear side effects.
Might be easier to go the other way around and add a clean API to MediaViewer. That would be T59298: The viewer box should not depend on the current page.
Resetting task status from "In Progress" to "Open" as this task has not seen updates for two years.
@SuperHamster: Removing task assignee as this open task has been assigned for more than two years - See the email sent on 2025-05-22.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!