Page MenuHomePhabricator

MultimediaViewer should use a delegate handler on the content area
Open, LowPublic

Description

Regardless, if not already, MMV should probably use a delegate handler on the content area. That way, it doesn't need to be informed about every single image. It also wouldn't need to select as many elements, looping through etc, and register so many event handlers. - Which can be fairly slow on a large page.

At that point the public interface from MMV becomes reasonable for slideshow: Just ensure an element with the appropiate class exists in the content area, which is easy to satisfy in javascript if for some reason the image can't have that class already from the PHP output.

Event Timeline

Prtksxna renamed this task from MultimediaViewer should use a delegate handler on the content area. to MultimediaViewer should use a delegate handler on the content area.Jan 24 2017, 5:54 AM
Jdlrobson subscribed.

Can you have a go at rewriting the description @Prtksxna with if/then/that syntax it's not completely clear to me what this task is about at first glance...

MediaViewer was envisioned to handle image collections (T77156: Show Navigation Strip for Collections in Media Viewer); delegating is more tricky to get right with that. Given that there is no prospect of anyone working on that soon (or ever), probably not worth holding out for that.

Related: T59298: The viewer box should not depend on the current page, T141901: MultimediaViewer processes all thumbnails on the page even when it's supposedly disabled

but what does this mean? The mobile media viewer allows you to scroll through all images in a page - is that what you are calling a collection?

Yes, but collections never got fully implemented, we ran out of time. You can page through the images, but there is very little navigation aid. The original design included a navigation strip (F19808). That would mean knowing about all images on the page (or maybe not all but several).

The best approach is probably to combine a delegating click handler with some sort of generator (an object that can give you the current/prev/next images). Right now MV just puts all the images on the page in an array and navigates in that, but that's inflexible. For example, when the user clicks on the big image of the gallery slideshow and then presses right/left, you'd probably want to advance the slideshow while keeping MV open and loading the next/prev slideshow image in it.

For example, when the user clicks on the big image of the gallery slideshow and then presses right/left, you'd probably want to advance the slideshow while keeping MV open and loading the next/prev slideshow image in it.

Yes, that would be ideal.

Yes, but collections never got fully implemented, we ran out of time.

I don't think I fully understand what you mean by collections, is there a task that has details?

Is it just the navigation strip at the bottom (F19808)? Or is it a self-contained collection of images that would keep repeating when one views them in MMV, even if there are more images on the page.

As a user it might be more intuitive to have galleries be self contained, not sure if that was the idea to begin with.

I'm not sure if there was anything more concrete than what's in T77156. @Pginer-WMF would probably know.

I'm not sure if there was anything more concrete than what's in T77156. @Pginer-WMF would probably know.

The ideas for media collections was part of exploring how to support different kinds of content in the media viewer. the linked document has examples for video and audio, but also others related to collections.

I don't think I fully understand what you mean by collections, is there a task that has details?

The concept of "collection" was flexible, representing any grouping of individual media that you want to be able to explore its individual items. The images contained in an article can be a collection where you want to go through them, but a PDF document (e.g., a slide deck) can be also a collection where you want to go to a specific page.

With the above definition it was possible to have collections within collections: you can navigate all media in an article which include a PDF for which you go through all the pages by default. The bottom strip was designed to expand/collapse the content of collections allowing the user to move in/out of them as required.

An slideshow option is provided to move through collections automatically, with an option to repeat once the end of the main collection is reached.

Is it just the navigation strip at the bottom (F19808)? Or is it a self-contained collection of images that would keep repeating when one views them in MMV, even if there are more images on the page.

As a user it might be more intuitive to have galleries be self contained, not sure if that was the idea to begin with.

the exploration was more about media formats, but galleries present an interesting case on whether those should be represented grouped as a collection or flattened just as more images in the page. Depending on that, the controls for repetition can work in one way or another.

dr0ptp4kt moved this task from Backlog to Needs Analysis on the MediaViewer board.
dr0ptp4kt subscribed.

As this hinges on a product manager's analysis, setting priority to Low and moving to Needs Analysis.