Page MenuHomePhabricator

Make images clickable on image description pages
Closed, ResolvedPublic

Description

Per bug 48901

The current setup where the link is still there but nothing happen how many times you tries to click on the image is frustrating.

For a mobile frontend I would suggest implementing a image viewer that loads a perfect sized image when clicking on the image.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=71485

Details

Reference
bz48996

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:44 AM
bzimport set Reference to bz48996.

The image currently does not look like it can be clicked on the mobile site.

Why don't we place a transparent icon (magnifying glass maybe?) in the top right corner that when clicked opens the image. I don't believe the entire image needs to be clickable I just think we should do a better job at surfacing the image link. Thoughts?

(In reply to comment #1)

Why don't we place a transparent icon (magnifying glass maybe?) in the top
right corner that when clicked opens the image. I don't believe the entire
image needs to be clickable I just think we should do a better job at
surfacing the image link. Thoughts?

If the entire image should not be clickable, please _don't wrap it in an anchor element_. Whether this strange and inexplicable HTML output (<a><img /></a>) is the subject of this bug, bug 48901, or a new bug, this really should be addressed.

Change 135288 had a related patch set uploaded by Florianschmidtwelzow:
Remove clickable link around image instead of abort click event

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

I agree with Jon (in his comment on gerrit:
Ideally this change should be done in core and in the HTML. I'd rather we didn't introduce such a JavaScript hack. The gain is too small and we are introducing code that could potentially damage styling by changing the HTML structure.)

So i will create a POC in next time in core.

Change 135288 abandoned by Florianschmidtwelzow:
Remove clickable link around image instead of abort click event

Reason:
Better to do this in core instead using JavaScript (see comment of Jdlrobson)

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

Change 137690 had a related patch set uploaded by Florianschmidtwelzow:
WIP/POC: Add ability to change file page in last minute

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

Change 137692 had a related patch set uploaded by Florianschmidtwelzow:
Remove clickable link around image on file page

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

Created attachment 15570
Result of gerrit patches

Magnifying glass is clickable and points to the original file, image itself isn't clickable.

Attached:

Result.PNG (392×675 px, 15 KB)

Hmm, this takes time :) Maybe we can think about to use ThumbnailBeforeProduceHtml in a seperate patch, so we can move the removal of the link around the image on file page to remove the filepage.js, which does this atm: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/javascripts/file/filepage.js

???

Maybe we can remove this link removal now the media viewer is here? This will only effect people visiting the File page.

I think this should still be removed in core (let's create a new bug for that) but let's fix this on the mobile side.

Change 163963 had a related patch set uploaded by Florianschmidtwelzow:
Remove link removal on filepages

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

Change 163963 merged by jenkins-bot:
Remove link removal on filepages

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

Change 137692 abandoned by Jdlrobson:
Remove clickable link around image on file page

Reason:
Since this is linked to on the bug report and not relevant to MobileFrontend any more I'm going to abandon it so I can review stuff you want me to review. (Remember abandon != delete :-) so hope that's okay!)

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

Change 137690 abandoned by Florianschmidtwelzow:
Add ability to change file page in last minute

Reason:
per discussion

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