Last modified: 2011-03-13 18:04:44 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 T10170, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8170 - Left-floated images should stack horizontally
Left-floated images should stack horizontally
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.9.x
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Wikipedi...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-06 06:27 UTC by Robert K S
Modified: 2011-03-13 18:04 UTC (History)
1 user (show)

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


Attachments

Description Robert K S 2006-12-06 06:27:06 UTC
A section of the images tutorial (see link in attached URL) that provides for alignment of images using 
the "CSS method" stopped working recently.  Previously, the images arranged using this method lined up 
in a horizontal row and wrapped on the page.  Now, they are arranged in a single vertical column.
Comment 1 Raimond Spekking 2006-12-06 06:31:36 UTC
This is an effect of r17986: (bug 6016) Left-aligned images should stack
vertically, like right-aligned images, not horizontally.
Comment 2 Robert K S 2006-12-06 10:43:29 UTC
Aha.  I have a feeling that 6016 was misreported as a bug when it was, in fact, a feature, and its expression was critical to that functionality of 
image display in Wikipedia.
Comment 3 Brion Vibber 2006-12-06 19:18:35 UTC
Definitely not a feature. If you want to stack images horizontally, you
shouldn't float them... ?
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-12-07 02:52:38 UTC
Well, let's see.  First of all, this is a question of what the default |left|
should do.  Either way, you can add manual HTML to permit either way of
stacking: to get them to align vertically, add <div style="clear: left;"></div>
in between in each image, and to get them to align horizontally, wrap each image
in <div style="float: left;">...</div>.  (They have to be floated left, Brion,
because they're all wrapped in divs.  Is there some other way to get divs to
stack horizontally?)  The question is, which behavior should be default, and why?

Now, let's look at the issue reported here.  Quite simply, we have a tag for
this: <gallery>.  The CSS method appears to be obsolete as far as I can see. 
<gallery> has the added benefit of adding semantic markup, so galleries can be
styled separately from random left-floated images.  It's also more concise and
readable.

On the other hand, right-floated images do certainly stack vertically.  There's
much to be said for consistency, and the resulting confusion of someone was
probably why bug 6016 was filed in the first place.  I would certainly expect
default behavior for right and left floats to be identical.

So: what, other than slight and temporary ugliness on a few old pages that were
never migrated to <gallery> (Wikipedia isn't famed for its brilliant page design
in any case), is to be gained by going back to the old behavior?  Are there any
other reasons why you'd want to stack images horizontally than to make a
gallery?  Is the <gallery> tag deficient somehow?
Comment 5 Robert K S 2006-12-07 06:18:23 UTC
A vociferous yes to the last question; the gallery tag is deficient in numerous important ways, and many pages specifically opt for thumbnails instead of 
galleries for aesthetic control reasons.  Compare, for example, [http://en.wikipedia.org/w/index.php?title=Jeopardy%21_set_evolution&oldid=92628658 here] 
and [http://en.wikipedia.org/w/index.php?title=Jeopardy%21_set_evolution&oldid=92642725 here].  The first version was an attempt by a user to switch the 
image display to galleries after r17986 damaged the CSS behavior.  The second version has restored the original display method using the HTML hack you have 
kindly provided.  In the gallery version, the thumbnails are too small to make out detail without enlarging the pictures, whereas in the CSS version you 
don't need to enlarge any of the pictures to see detail.  Gallery provides to option for adjusting the size of thumbnails.  Second, the pictures are 
designed to align in a horiztonal row on a 1600 × 1200 monitor display resolution, and align on two rows (i.e., form a 2 × 2 grid) at 1024 × 768.  Galleries 
have no provision for wrapping images to a browser window.

I have a feeling that the CSS "fixed" in r17968 was designed to be--no pun in intended--asymmetrical between the left and right especially for the purpose 
of the CSS method described in this [http://en.wikipedia.org/w/index.php?title=Wikipedia:Picture_tutorial&oldid=92408551#Wiki_markup_and_CSS section] (which 
has since been removed, but perhaps it would be better, if my cries for a reversion of r17968 go unheeded, to rewrite the section to mention the HTML hack 
option?).

PS to Brion above: You and I know each other.  I was the corpse in "Dr. Sexyknickers".  Fancy meeting you here!
Comment 6 Robert K S 2006-12-07 06:20:05 UTC
That should read, "Gallery provides NO option for adjusting the size of the thumbnails"...
Comment 7 Brion Vibber 2006-12-08 00:27:38 UTC
I'm pretty sure the old behavior is not intentional; floats in general
are really fragile and icky, so unexpected side-effects are... frequent.

Probably the sensible thing would be to go ahead and improve gallery...
- add some size override options for the thumbs it uses
- add dynamic resizability (column wrap-around etc)

[Side note on resolutions: pretty much nothing looks good in a browser at
1600 pixels; I usually size my browsers to fit two windows side-by-side
on a monitor this size. Of course then you run into the problem that
everyone designs their sites for 1024-pixel-wide screens and you have
sidebars spilling off the edge...]

PS to Robert: Oh *man* that was bad. ;) I've still got it lying around;
if you like I can burn you a DVD. Drop me a line off-list.
Comment 8 Rob Church 2006-12-08 21:33:22 UTC
*gives Brion a very funny look*
Comment 9 JePe 2006-12-20 23:07:31 UTC
For nl.wikipedia I have made a new class, placed in MediaWiki:Common.css.

div.afbnaastelkaar div.floatleft, 
div.afbnaastelkaar table.floatleft, 
div.afbnaastelkaar div.tleft 
{ clear:none; }

When wrapping left-aligned images in a div with this class, the images are
placed next to each other, like the behaviour before the bug fix.
(afbnaastelkaar = images next to each other)
Comment 10 Jean-Sébastien Girard 2006-12-24 17:13:13 UTC
The problem is that there are about as much pages that break from the "bug"
(because people wants it to work so) as there are that breaks from the "feature"
(because they expected to work it the same way as the right floats.)

Maybe JePe's solution is best.
Comment 11 Ben 2007-01-14 22:04:23 UTC
It seems to me it should be reverted until there are appropriate features in the
gallery.
Comment 12 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-12-16 20:28:34 UTC
There has been no convincing reason given to do this other than backward compatibility, and presumably that's no longer much of an issue after eleven months.  Closing WONTFIX.

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


Navigation
Links