The Signpost

Technology report

Gallery improvements launch on Wikipedia

Contribute  —  
Share this
By Adam Cuerden and Kirill Lokshin

Wikipedia's traditional image gallery format, produced by the <gallery> markup, has remained largely unchanged for years. The resulting layout, seen below, does not adapt well to variations in image size, and has been characterized by some critics as aesthetically unappealing.

Now, the gallery markup has been enhanced with the addition of several new display modes. For example, changing <gallery> to <gallery mode=packed> produces a gallery with significantly less wasted space around each image, as shown below.

In addition, the heights parameter becomes very easy to use with the new gallery mode. For example. <gallery mode=packed heights=200px> gives


Five modes are available: "traditional", which reproduces the classic gallery format; "nolines", which behaves identically to "traditional" but removes the box overlays for each image; "packed"; "packed-hover", which is similar to "packed" but with captions that appear when the mouse pointer hovers over the image; and "packed-overlay", in which the captions are placed atop each image. Some examples of these modes can be seen below.

Packed-hover (move your mouse over the images below)
Packed-overlay

It is expected that the "packed" mode will eventually become the preferred layout for article-space galleries on Wikipedia. The "packed-hover" and "packed-overlay" modes are not expected to see significant use in articles, but will probably appear heavily in non-article spaces, such as user pages.

VisualEditor enhancements

In brief

This video (the 1911 film Little Nemo) will expand out when you click on it, for easy viewing.
+ Add a comment

Discuss this story

These comments are automatically transcluded from this article's talk page. To follow comments, add the page to your watchlist. If your comment has not appeared here, you can try purging the cache.
  • The Module namespace has used CodeEditor since launch. The new addition is for CSS and JS pages. Anomie⚔ 14:23, 31 August 2013 (UTC)
  • The packed-hover is a good tech. Nice additions. Benison talk with me 15:10, 31 August 2013 (UTC)
  • Wow, the new gallery is amazing! I quite like it. — -dainomite   16:55, 31 August 2013 (UTC)
  • The new galleries are beautiful - well done to all involved. Andrew Gray (talk) 20:14, 31 August 2013 (UTC)
  • Quite appropriate that Adam should demonstrate it with some of his own restorations, since it's often files like that which don't conform to standard dimensions (like #3, above) and you really notice the difference in galleries with the whitespace.. Grandiose (me, talk, contribs) 12:13, 1 September 2013 (UTC)
    • Heh, well, it's a bit hard to find a really oddly-proportioned gallery on Wikipedia, because they looked so awful with the old gallery style, but I've had a gallery of FPs on my user page for years. Adam Cuerden (talk) 13:15, 1 September 2013 (UTC)
  • See also the galleries on mobile view. "Packed-hover" looks strange. --Atlasowa (talk) 20:30, 1 September 2013 (UTC)
    • I suspect that's an issue with one caption taking up two lines in that example. Mobile view, as I understand it, strips most gallery code. Adam Cuerden (talk) 21:01, 1 September 2013 (UTC)
  • At WikiProject Open Access some of us organize a "file of the day" and put new non-text media into a gallery daily. I just changed this to a packed gallery and the images are slow to load and some do not load at all. This is on Commons, not Wikipedia. See Commons:Commons:Open_Access_File_of_the_Day. Where are conversations about this tag? Nothing is happening at Help_talk:Gallery_tag. Blue Rasberry (talk) 14:07, 5 September 2013 (UTC)
  • Packed-hover behaves like packed-overlay on my iPad. Known issue? - PKM (talk) 01:56, 12 September 2013 (UTC)
    • Should have mentioned: On the mobile site, that's a planned change, since many touchscreens don't have a hover-over option. Adam Cuerden (talk) 05:14, 12 September 2013 (UTC)

"new user-facing features, like the ability to search within a category, are planned"

Great news! :) Now it would be cool to make it even easier to search by crossing many categories, and allowing searching subcategories as well. --NaBUru38 (talk) 18:54, 31 August 2013 (UTC)

From conversations, it sounds like those are planned, but realise this is very early stages: The old search was a mess, so it had to be rewritten into a stable version before any other improvements could be done. We're going to get new search features, but I don't think anyone can promise anything until coding's a lot further on. =) Adam Cuerden (talk) 19:24, 31 August 2013 (UTC)
@Adam Cuerden: How is this any different from incategory:? πr2 (t • c) 20:28, 2 September 2013 (UTC)
That you'd need to ask the developers about. I would presume it would include subcategories, perhaps? Adam Cuerden (talk) 20:04, 4 September 2013 (UTC)
What we are talking about is incategory:, yes. The major difference we've accomplished here (which I think was lost in the blurb) is that we've made it possible to have multiple incategory: terms in a single search, opening the door for category intersections. ^demon[omg plz] 02:17, 5 September 2013 (UTC)



       

The Signpost · written by many · served by Sinepost V0.9 · 🄯 CC-BY-SA 4.0