New more slick gallery display
authorBrian Wolff <bawolff+wn@gmail.com>
Sat, 8 Jun 2013 04:47:07 +0000 (01:47 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Wed, 14 Aug 2013 23:56:05 +0000 (20:56 -0300)
commit14b3f8767bdcfe7f5d346f4b4b3e55cc2d32044a
tree491157b0bc29dff128c2fce3900af7d6fb4ede84
parent7005d46ba1a1cc19ab843eac52ce43e34dea2811
New more slick gallery display

This extension adds a "mode" parameter to the gallery
tag, allowing different formats for the gallery tag
(galleries in the ui can be controlled by a global)
The added modes are:
*traditional - The original gallery
*nolines - Like the original, no borders, less padding
*packed - All images aligned by having same height.
  JS also justifies the images.
  (I think this one is the one that will go over best
  with users.)
*packed-overlay - like packed, but caption goes over
  top the image in a transloucent box.
*packed-hover - like packed-overlay, but caption only
  visible on hover. Degrades gracefully on screen
  readers, and falls back to packed-overlay if
  you are using a touch screen. I kind of like
  this mode when the caption is not that important
  (ex a category where its just the file name).

This also adds a hook to allow people to make their
own gallery version. I believe there would be interest
in this, as different people have done different
experiments. For example:
* Wikia: http://community.wikia.com/wiki/Help:Galleries,_Slideshows,_and_Sliders/wikitext
* Wikinews: https://en.wikinews.org/wiki/Template:Picture_select

What I would like to see for this patch, is first it gets
enabled, with the default still "traditional". After
about a month or two we consult with users. If feedback
is positive, we change the default mode to one of the
others (probably "packed").

Adds a "mode" parameter to gallery for different
mode, including one 'height-constrained-overlay'
which looks much more like other modern websites.

Note: This makes one change to the old gallery format.
It makes Nonexistent files be rendered like thumbnails
(i.e. they are rendered with a little grey border).

One thing I'm slightly worried about with this patch,
is that I added an option to MediaTransformOutput::toHtml
to override the width attribute. I'm not sure if that
is the best approach, and would appreciate thoughts
on that.

This should be merged at the same time as Ie82c1548

Change-Id: I33462a8b52502ed76aeb163b66e3704c8618ba23
21 files changed:
RELEASE-NOTES-1.22
docs/hooks.txt
includes/AutoLoader.php
includes/CategoryViewer.php
includes/DefaultSettings.php
includes/ImageGallery.php [deleted file]
includes/ImageQueryPage.php
includes/filerepo/file/ForeignAPIFile.php
includes/gallery/ImageGalleryBase.php [new file with mode: 0644]
includes/gallery/NolinesImageGallery.php [new file with mode: 0644]
includes/gallery/PackedImageGallery.php [new file with mode: 0644]
includes/gallery/PackedOverlayImageGallery.php [new file with mode: 0644]
includes/gallery/TraditionalImageGallery.php [new file with mode: 0644]
includes/media/MediaTransformOutput.php
includes/parser/Parser.php
includes/specials/SpecialNewimages.php
includes/specials/SpecialUpload.php
resources/Resources.php
resources/mediawiki.page/mediawiki.page.gallery.js [new file with mode: 0644]
skins/common/shared.css
tests/parser/parserTests.txt