Page MenuHomePhabricator

Overall caption for a gallery in desktop view is centered for the page, which looks odd for a non-centered display mode when there are only a few images
Closed, DuplicatePublic

Description

Steps to reproduce

  1. Insert a gallery with a caption and few (1-4) images into any Wikipedia page and save. You can use the following example:
<gallery caption="Běžné chemické sloučeniny s dvojnou vazbou">
Ethylene-CRC-MW-dimensions-2D.png|[[ethylen]]
Acetone-CRC-MW-ED-dimensions-2D.png|[[aceton]]
DMSO-2D-dimensions.png|[[dimethylsulfoxid]]
</gallery>

Expected behavior
The gallery caption should be above the images, right?

Current behavior

Snímek z 2019-01-17 22-35-16.png (741×1 px, 162 KB)

For 1-2 images, the gallery caption is completely off. For 3-4 images it is only slightly better. It seems the gallery caption is centered towards the whole page instead of the gallery itself. For 1-3 images it looks like the caption does not belong to the gallery at all.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

That's normal if you don't set a mode which centers captions.

That's weird to be honest. It looks like the caption does not belong to the gallery. And which mode sets the caption centered? On the page you linked there is no information about which mode centers the caption and which not. On the next screenshot the caption is even completely off the gallery

Snímek z 2019-01-18 13-22-54.png (741×1 px, 103 KB)

Dvorapa renamed this task from Gallery caption is not centered to Gallery caption is centered incorrectly for few images.Jan 18 2019, 12:24 PM
Dvorapa renamed this task from Gallery caption is centered incorrectly for few images to Gallery caption is centered incorrectly for too few images.
Aklapper changed the task status from Open to Stalled.Jan 18 2019, 12:55 PM

It looks like the caption does not belong to the gallery.

Not here.

And which mode sets the caption centered? On the page you linked there is no information about which mode centers the caption and which not.

You can see it in the examples.

On the next screenshot the caption is even completely off the gallery

Please always provide clear steps to reproduce a problem if you think that something is "centered incorrectly for too few images" somewhere: https://www.mediawiki.org/wiki/How_to_report_a_bug Currently there are no steps at all here.

And which mode sets the caption centered? On the page you linked there is no information about which mode centers the caption and which not.

You can see it in the examples.

I could find only one example for one mode (I think it is traditional mode), but with multiple images. No comparison.

Snímek z 2019-01-18 21-07-02.png (741×1 px, 75 KB)

On the next screenshot the caption is even completely off the gallery

Please always provide clear steps to reproduce a problem if you think that something is "centered incorrectly for too few images" somewhere: https://www.mediawiki.org/wiki/How_to_report_a_bug Currently there are no steps at all here.

Steps to reproduce:
Copy the source code in the description and insert it in any Wikipedia page. Save and see what happens.

This seems to be broken only on traditional and nolines mode

@Aklapper Are we both talking about the same "caption"? Because it seems to me you are talking about image "captions", but I'm talking about gallery "caption". The problem is clearly visible on both my screenshots

Dvorapa updated the task description. (Show Details)
Jdforrester-WMF renamed this task from Gallery caption is centered incorrectly for too few images to Overall caption for a gallery in desktop view is centred for the page, which looks odd for a non-centred display mode when there are only a few images.Jan 18 2019, 8:31 PM
Jdforrester-WMF subscribed.

I've re-titled this, but it's also Yet Another Reason To Never Use Traditional Gallery Mode – this is, sadly, how it's designed. Really, every gallery should just be packed.

Aklapper renamed this task from Overall caption for a gallery in desktop view is centred for the page, which looks odd for a non-centred display mode when there are only a few images to Overall caption for a gallery in desktop view is centered for the page, which looks odd for a non-centered display mode when there are only a few images.Jan 19 2019, 10:47 AM
Aklapper changed the task status from Stalled to Open.
Aklapper triaged this task as Low priority.

As described in the german WP the problem is a question of the default setting. There are several parameters for modifying caption details – what is very useful and not the problem ... but if not using any parameter then the caption should not be as it is now (only title is centered over the entire page but not the pics) ... https://de.wikipedia.org/wiki/Hilfe_Diskussion:Galerie#Zentrierung_von_Titeln_und_Bildern