Page MenuHomePhabricator

Mobile Web and Multimedia viewer should use same hash fragment
Closed, ResolvedPublic1 Estimated Story Points

Description

https://twitter.com/jleedev/status/560162919993073667

He's right. This sucks.
So let's standardise on MediaViewer/File: or #/image/File:

Personally I would recommend the latter for 2 reasons:

  1. It's good not to mention the name of the technology in the URL.
  2. In mobile we need the / prefix as we have urls such as #/editor - the initial '/' prefix helps distinguish it from any anchor element in the DOM since '/' is an invalid character.

If you are strongly attached to MediaViewer/File: please make a case. I am open to #/mediaviewer/File:

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

#/mediaviewer/File may be better because the overlay contain a video or something else, not just an image.

If we are going to bikeshed about it, I would prefer #file/File:... or #media/File:... :)

Not sure I get the point of the initial /:

  1. there is already a / character there to separate the application prefix and the page title so adding another one does not make it any more or less invalid
  2. / is valid in HTML5 (spec)
  3. even on 3rd-party wikis which disable $wgHtml5, you can still put anything in an id attribute; browsers don't care that it's technically invalid

Anyway, the more important question is whether the title encoding matches. MediaViewer uses UTF-8 percent encoding (see T70372 for the motivation).

We also had plans for just #mediaviewer to automatically select an image from the page (T77338), and /2 at the end to select the right one when the same image is present multiple times on the page. Those did not get implemented, but I would still like to go back to them in my free time.

The initial '/' is a requirement for mobile. We have many hash fragments that do not have parameters e.g. #/editor, #/talk
Without the initial '/' prefix talk and editor can get confused with the ids talk and editor.

Gilles moved this task from Untriaged to Next up on the Multimedia board.
Gilles subscribed.

@Tgr I will submit a patch today to change it to media on our side.

gerritbot subscribed.

Change 188059 had a related patch set uploaded (by Jdlrobson):
Switch to canonical '/media' prefix

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

Patch-For-Review

Change 188059 merged by jenkins-bot:
Switch to canonical '/media' prefix

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

@Tgr I'm removing Web-Team-Backlog tag as we are done on our end.

Change 192806 had a related patch set uploaded (by Gilles):
Make media viewer use the same prefix as mobile

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

Change 192806 merged by jenkins-bot:
Make media viewer use the same prefix as mobile

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