User talk:Rillke/galleryZoomHover.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Due to a limited amount of spare time, I am currently not able to maintain or support this script. Feel free to fork it. If you fork it, please let us know here.
Note. To test, add

/* Popup preview of a thumbnail image when you hover over it */

mw.loader.using(['mediawiki.util', 'mediawiki.api'], function() { importScript('User:Rillke/galleryZoomHover.js'); });

to Special:MyPage/common.js.

Discussion[edit]

From Special:PermaLink/70064432#galleryZoomHover.js / User talk:Rillke/Discuss/2012#galleryZoomHover.js

I finally got round to testing User:Rillke/galleryZoomHover.js - and it's exactly what I had in mind. Playing with it, the only thing I can think of as a small improvement is to (i) provide back/forward controls to make it easier to step through a category and (ii) provide a "play slideshow" button which links to MediaWiki:GallerySlideshow.js. Rd232 (talk) 19:21, 22 March 2012 (UTC)[reply]

Did you test mw:User:Magnus_Manske/wikipic? -- RE rillke questions? 19:42, 22 March 2012 (UTC)[reply]
I did now. They can actually co-exist fairly well as is, but it would be better if they were integrated, so that your zoomed window popup provided the icons linking into Magnus' script (not sure how possible that is without integrating the scripts). Overall, Magnus' script is nice, but I think the basic zoom function your script provides is much more useful (I would have it as a default gadget, actually). As I said above, forward/backward links and a link to a slideshow function would be nice. The information display in Magnus' slideshow is slightly prettier, but I do really like the image selection bar across the top of MediaWiki:GallerySlideshow.js. Long-term it probably doesn't make sense to maintain two different slideshow scripts... so again, maybe some sort of merge? Rd232 (talk) 22:19, 23 March 2012 (UTC)[reply]
I also miss touch&swipe in our slideshow. Merging... This would require that Magnus will loose the possibility to re-license his script under different licenses.
Concerning the forward/back controls: Please google for jquery slideshow plugin and tell me which buttons you like most (there are sooo many variants) so I don't have to reinvent the wheel. -- RE rillke questions? 22:37, 23 March 2012 (UTC)[reply]
OK, I don't know about such licensing issues. From here: for sheer simplicity, and avoiding any need for il8n, and fitting well with your simple popup design, look at Slides. (Slideshow link(s) can be added at the bottom right below the image.) For something a bit more ambitious (from the same link): AD Gallery (adding a few thumbnails from the category at the bottom, so you can jump more than just forward/backwards). By the way, the controls at MediaWiki:GallerySlideshow.js are actually wrong: the |<< and >>| symbols mean "jump to the beginning/end", not "backward/forward". A simple arrow would be better. Rd232 (talk) 23:06, 23 March 2012 (UTC)[reply]

bump. I'm really getting used to this script; it's simple but brilliant. With those tweaks, I'd like to make it a gadget, and later a default gadget. BTW, are default gadgets loaded for users not logged in? Rd232 (talk) 22:21, 29 March 2012 (UTC)[reply]

Yes, by default. Simply add rights=upload and only logged-in users get it. -- RE rillke questions? 10:12, 30 March 2012 (UTC)[reply]
BTW, if while testing slideshow, some time ago, I made User:Rillke/SlideRotator.js. You can test it on User:Rillke/Sandbox. It also needs a lot of work but I think it is a good for making advert and possibly more. (navigation is missing, ...) -- RE rillke questions? 16:28, 30 March 2012 (UTC)[reply]
That's nice. But I don't immediately see a use for it. Rd232 (talk) 17:19, 31 March 2012 (UTC)[reply]
Tutorials, announcing events, .... -- RE rillke questions? 17:27, 31 March 2012 (UTC)[reply]
Great, thanks. Now, if adding the forward/back buttons is too much work, I'll take it as a gadget without. They would be useful though (as would a close button, and a "send to new tab" button which simultaneously closes the popup and opens the file description page in a new tab). Rd232 (talk) 17:19, 31 March 2012 (UTC)[reply]
It is not difficult. If you look at my contribs, you just see where I am busy. E.g. User:Filbot/Report and User:Rotatebot/Log was previously checked by Saibo. -- RE rillke questions? 17:27, 31 March 2012 (UTC)[reply]
That's why I said "too much work" (relative to what else you're doing and time available), not "difficult". I didn't think it would be difficult for you. Rd232 (talk) 17:45, 31 March 2012 (UTC)[reply]

Do you mind if I make it into a gadget? I think it's just too useful to keep to myself. :) Rd232 (talk) 22:23, 7 April 2012 (UTC)[reply]

I will work on it, now. -- RE rillke questions? 21:43, 10 April 2012 (UTC)[reply]
Do you miss information on the popup? E.g. for File:Cherimoya seeds.jpg seeds.jpg these are available. -- RE rillke questions? 23:54, 10 April 2012 (UTC)[reply]
I added some slideshow-buttons now, if the slideshow is available (a gallery is present). I know, it's not what you expect (not starting with actually the file shown ..., could be nicer). -- RE rillke questions? 19:33, 23 April 2012 (UTC)[reply]

Text and links covered at bottom of image[edit]

Thanks for this gadget! The zoomed image needs to be moved up a line. Many times I can't see the text at the bottom of the image. This is because in Firefox the image URL also pops up at the bottom of the screen. So the image URL will cover over the title of the image, and sometimes the gallery and slideshow links, too. --Timeshifter (talk) 00:22, 28 June 2012 (UTC)[reply]

✓ Done -- Rillke(q?) 13:51, 27 July 2012 (UTC)[reply]

Progressive zooming may slow down image presentation too much at times[edit]

If one is scanning a bunch of thumbnail images in a category, or search result list, in order to pick out the best ones, then one may be in a hurry and want to see the expanded images more rapidly. I suggest a way to turn off the progressive zoom, so that the image pops up to size immediately. --Timeshifter (talk) 00:27, 28 June 2012 (UTC)[reply]

There may be an option in future. But this needs to be written. -- Rillke(q?) 13:51, 27 July 2012 (UTC)[reply]

Click away from image to close it[edit]

Would it be possible to make the zoomed image disappear immediately when one clicks away from the zoomed image?

Currently, the image stays up for a certain period of time no matter what I do. That slows me down sometimes, and makes me think of removing the JS from User:Timeshifter/common.js --Timeshifter (talk) 06:32, 25 July 2012 (UTC)[reply]

Hi Timeshifter, feel free to do so. I am currently too busy to ensure stable support. In theory you can now click into white space of the window to close it but there are other issues (sometimes it refuses to open, ...). Regards -- Rillke(q?) 13:41, 27 July 2012 (UTC)[reply]
I know nothing about JavaScript. Maybe Rd232 can help. Is there a list of JS coders anywhere on the Commons?
I have noticed a few times now, including today after your latest updates, that the more images I look at on the page, the more likely it is that clicking away from the image does not close the image. In other words it works the first few images I look at in a category but it sometimes does not work right away or at all for later images. I have to put my cursor over a different image in order to close the last image. I purged the old JS before my latest tests. --Timeshifter (talk) 16:04, 27 July 2012 (UTC)[reply]

Gadget ?[edit]

Any objection to making this a gadget? I totally understand that Rillke is really busy and has no time for active support, but I have been using this for quite a while now and it is awesome as it is. Maybe not for making it default for everyone, but definitely good enough to be a gadget!

Jean-Fred (talk) 13:58, 13 September 2012 (UTC)[reply]

Currently it behaves completely FooBar for me ;-) -- Rillke(q?) 14:05, 13 September 2012 (UTC)[reply]

Is anyone working on this?[edit]

I know you may be too busy to work on this, Rillke. Maybe we can put out the word that others can take this tool, and work on it. This tool is so useful when it is working right.

I would really like an "x" added to the images so I can close them. Many times the enlarged image refuses to close no matter what I do on the page. I have to reload the page to get rid of the enlarged image. Sometimes if I wait long enough the image will close. But I frequently do not want to wait. --Timeshifter (talk) 19:20, 20 December 2012 (UTC)[reply]

Hover modal is sometimes smaller than the picture it purports to enlarge[edit]

The size of the modal is calculated relative to the viewport, and with a small enough browser window the enlargement is actually smaller than the picture itself. This is almost certainly affecting users of netbooks, among others. — Preceding unsigned comment added by Ori.livneh (talk • contribs) 01:33, 11 October 2013‎ (UTC)[reply]

This is not the only issue … -- Rillke(q?) 08:17, 11 October 2013 (UTC)[reply]