Page MenuHomePhabricator

Links to files in Media Viewer
Closed, ResolvedPublic

Description

Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/67

Narrative

As a user, I can easily share a link to a file with others, so theycan view that file in Media Viewer.

Acceptance Criteria

Right now, there is no way to share a link that opens a file inside the Media Viewer. You have to first go to the article or media file page, then click on its thumbnail or image to see a large view of the image. This makes it difficult to share images with others, which is an important use case that most users now expect on the Internet.

One possible solution could be to add a parameter after the URL of a Commons file page to immediately display it in the Media Viewer (e.g.:https://commons.wikimedia.org/wiki/File:Goldfish.jpg#mediaviewer )

We would then add a 'Share this file' option in the "Use this file" panel, which would contain this special URL, to make it easier for people to share their favorite images so others can view them as they were meant to be seen.

Related Bugs

https://bugzilla.wikimedia.org/show_bug.cgi?id=56469

Related Stories

#8 - Media Viewer Front-end

Event Timeline

MingleTerminator raised the priority of this task from to High.
In mingle on 2013-11-25 at 16:55:37, @MarkTraceur wrote:

So, there are a few concerns I have about implementation:

  1. history.pushState, suggested in the bug, is a Good Idea.

1a. But we need to store the title of the file in the hash fragment, which could get Mildly Unwieldy.

1b. Also, we might need to store the index of the image being viewed, in case there are multiple instances of one file on the page (and for the future where order matters). This could get Even More Unwieldy.

  1. Sending people to the file page with MediaViewer is a Bad Idea because A) we don't load MMV on file pages, B) we should use query params to specify an action, C) we would lose the state of the viewer (e.g. with previous and next buttons)
  1. Using history.popState events is also a Bad Idea because it gives us information not stored in the hash fragment. We should make that information our primary source.
In mingle on 2013-11-25 at 16:58:17, @MarkTraceur wrote:

As for "share this file" option, that's not necessary, the URL will be in the location bar of the browser.