Last modified: 2014-02-13 08:58:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58469, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56469 - Viewer lightbox state can't be bookmarked or cut-n-pasted as a link
Viewer lightbox state can't be bookmarked or cut-n-pasted as a link
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: High enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 56493 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-01 12:29 UTC by Brion Vibber
Modified: 2014-02-13 08:58 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2013-11-01 12:29:35 UTC
Opening the viewer lightbox doesn't affect the URL or browser history, so you can't easily save or share a link to an image you're viewing: if you just bookmark or copy-paste the link from your URL bar, when the link is opened you'll just see an article...

If you're in the know you can copy that "Learn more" link or manually right-click and pull up the raw image, but these are.... not pretty. :)

Could append a hash parameter on the URL (using history.pushState()/popState() when available) specifying the image to show in lightbox, and have a magic handler to open a popup on load if such a hash is specified.

something like https://en.wikipedia.org/wiki/San_Francisco#mediaview=File:SF_From_Marin_Highlands3.jpg ?
Comment 1 Mark Holmquist 2013-11-02 23:57:00 UTC
This sounds like a desirable thing, yes :)

Thanks for the idea!
Comment 2 Tisza Gergő 2013-11-04 22:39:02 UTC
Alternatively, we could push the URL of the image description page, that way sharing the link with others who have javascript/MultimediaViewer disabled would have more consistent behavior. (On the other hand, refreshing the page with the viewer open would behave more surprisingly.)
Comment 3 Mark Holmquist 2013-11-20 01:15:46 UTC
*** Bug 56493 has been marked as a duplicate of this bug. ***
Comment 4 Fabrice Florin 2013-11-23 21:57:56 UTC
I too have been struggling with the lack of direct link to open a file in Media Viewer. It's a serious issue for me, because it makes it hard to share links to large versions of images, which is a very common use case across the Internet.

To address this issue, I am increasing the priority of this ticket, and cross-linking it with this feature request #67 on Mingle:
https://mingle.corp.wikimedia.org/projects/multimedia/cards/67

While it is possible to send people to the file pages on Commons, it's a cumbersome process as Brion points out, and the file pages are too cluttered to be an acceptable destination for sharing files with casual users.
Comment 5 Gerrit Notification Bot 2013-11-26 00:44:21 UTC
Change 97657 had a related patch set uploaded by MarkTraceur:
Push history state to support links to media viewer

https://gerrit.wikimedia.org/r/97657
Comment 6 Mark Holmquist 2013-11-26 01:12:26 UTC
The implementation is:

1. You can load with #mediaviewer/File:Test file.jpg/1 and it will auto-load that file for you IF File:Test file.jpg is the 1th (0-indexed) image on the page. If the page has changed, it will just ignore the hash fragment and load the page normally.

2. Your URL will change when you open the lightbox, and you can use the URL in the location bar to link to your current state.

3. You can press the back button in the lightbox to close the lightbox, and if you've closed the lightbox with the escape button or the close button, you can use the back button to reopen it. Hitting the back button more than once doesn't work currently and I have no idea why.

4. If there are weird characters in the file name, I have no idea what will happen. Yay uncertainty!

For #1, I can stop checking if we prefer to just blindly load the nth image if we're given #mediaviewer/n as the hash fragment (as long as it's a number, of course).
Comment 7 Tisza Gergő 2013-11-26 14:51:26 UTC
- IMO the same link should not point to completely different things at different points in time, so including the file name is a good idea.
- not so sure about the number; this would break the link when an unrelated part of the article or is edited (even worse for categories). I would rather index images of the same name only (if we don't show page-based metadata like the subtitle, even that is unnecessary).
- file names might contain a /, so filename|index or filename[index] would be a better pattern

Do we want to do anything useful for non-JS-enabled browsers? The pushstate API would make it possible to redirect them to the image description page; I'm not sure if that would make sense.
Comment 8 Gerrit Notification Bot 2013-11-26 21:35:23 UTC
Change 97657 merged by jenkins-bot:
Push history state to support links to media viewer

https://gerrit.wikimedia.org/r/97657
Comment 9 Andre Klapper 2014-02-12 16:18:17 UTC
Patch was merged a while ago - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 10 Tisza Gergő 2014-02-13 08:58:40 UTC
The original issue has been addressed. Moved other, loosely related ideas to https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/206

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links