Page MenuHomePhabricator

Add hooks to MultimediaViewer extension
Closed, InvalidPublic

Description

From an email, from Daniel Schwen (CC'd):

Ideally I'd like to have a

  • pre- and post- opening of the viewer hook
  • a hook that is called when the displayed image in the viewer changes,
  • and a hook [to] feed a list of 'next' and 'prev' images to the viewer.

We've been thinking about a hooking infrastructure, and this seems like a good list to start with. Thanks Daniel!


Version: unspecified
Severity: enhancement

Details

Reference
bz57449

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:37 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz57449.

Note: the lightbox JS code used by the extension already implements the following hooks:

  • closeInterface (when the viewer is closed)
  • imageLoaded (when image is done loading)

This is documented at /MultimediaViewer/resources/multilightbox/hooks.txt

So we can reuse these twos for our own hooks.

Please write coherent bug summaries.

The course has changed on this, we're now using custom jQuery events. They serve the same purpose. But we've decided not to preemptively add hooks that aren't used yet, this was attempted with lightboxHooks and is hard to do well without a real need. I think it's too early in this extension's lifespan to guess ways people will customize it/hook into it. So for now we'll only create events that are being used in mmv itself to communicate events across isolated components.

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:11 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:21 AM