Page MenuHomePhabricator

Mobile Web and Multimedia viewer should use same hash fragment
Closed, ResolvedPublic1 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:

Details

Related Gerrit Patches:
mediawiki/extensions/MultimediaViewer : masterMake media viewer use the same prefix as mobile
mediawiki/extensions/MobileFrontend : masterSwitch to canonical '/media' prefix

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a project: Multimedia. · View Herald TranscriptJan 28 2015, 3:03 PM
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.

or simply #/media/File:

Tgr added a subscriber: Tgr.EditedJan 28 2015, 7:34 PM

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 triaged this task as Medium priority.Jan 29 2015, 12:51 AM
Gilles moved this task from Untriaged to Next up on the Multimedia board.
Gilles added a subscriber: Gilles.
Jdlrobson claimed this task.Feb 2 2015, 4:25 PM

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

gerritbot added a subscriber: gerritbot.

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

Florian added a subscriber: Florian.

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

Tgr edited a custom field.Feb 18 2015, 1:10 AM
Tgr edited a custom field.Feb 18 2015, 1:12 AM
Gilles removed Jdlrobson as the assignee of this task.Feb 25 2015, 9:02 AM
Gilles claimed this task.Feb 25 2015, 1:49 PM
Gilles edited a custom field.Feb 25 2015, 2:20 PM
Gilles edited a custom field.Feb 25 2015, 2:55 PM

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

Gilles closed this task as Resolved.Mar 2 2015, 8:47 AM