Issues about MediaWiki's media gallery feature.
Parent project: MediaWiki-General
Issues about MediaWiki's media gallery feature.
Parent project: MediaWiki-General
Being proposed for Q4 via our quarterly grooming process.
Test wiki on Patch demo by ESanders (WMF) using patch(es) linked to this task was deleted:
This works for me — the caption remains centred, but is centred within the gallery instead of within the whole page width.
In mediawiki.page.gallery.styles/gallery.less
Change:
ul.gallery.gallery.gallery { margin: 2px; padding: 2px; display: block; }
to
ul.gallery.gallery.gallery { margin: 2px; padding: 2px; display: inline-block; }
The laws of nature being what they are, I suspect that is just too simple to be globally valid.
Change #1070554 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] MWGalleryDialog: Highlight item at closest index when removing an image
Change #1079939 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a25
Change #1079939 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a25
Change #1079047 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Allow localized gallery widths
Change #1072822 abandoned by Arlolra:
[mediawiki/services/parsoid@master] WIP: parse gallery specs with localized 'px' suffixes
Reason:
In favour of I38733e08f6cbe10b7ae2e634fc53d7ddd6415599
Change #1079047 had a related patch set uploaded (by Arlolra; author: Arlolra):
[mediawiki/services/parsoid@master] Allow localized gallery widths
In T374311#10186201, @stjn wrote:Currently this is confusing some editors who think that because there is a tracking category added to <gallery> images because of this bug, they need to remove px from the galleries. What is holding back the patch from getting reviewed?
Change #1072211 merged by jenkins-bot:
[mediawiki/core@master] Allow localized gallery widths; avoid spurious "double px" tracking category
Currently this is confusing some editors who think that because there is a tracking category added to <gallery> images because of this bug, they need to remove px from the galleries. What is holding back the patch from getting reviewed?
The gallery tag has a host of issues particularly with . At this point I would personally recommend it gets rebuilt from the bottom up given the amount of associated issues- but this particular issue is covered by T370093
Change #301129 abandoned by Hashar:
[operations/mediawiki-config@master] Change default gallery mode to 'packed' on the English Wikipedia
Change #1072822 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/services/parsoid@master] WIP: parse gallery specs with localized 'px' suffixes
Change #1072211 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/core@master] Allow localized gallery widths; avoid spurious "double px" tracking category
The width *should* be parsed with the "magic word" img_width, which includes the trailing px (localized in many cases, for example in Esperanto it also allows a trailing re). As such, the value which arrives at Parser::parseWidthParam() should /not/ have a trailing px.
It appears that renderImageGallery is not parsing the widths attribute with img_width (which also means the attribute value is not being properly localized). I'll work on a patch.
@Pppery I'll take a look. It's not intended, but gallery *is* somehow triggering the code path where "px has already been parsed and we saw another one". Perhaps that's because gallery itself is adding a hidden px.
In T374311#10131678, @Pppery wrote:@cscott Is this intended to populate the tracking category? I personally think it's reasonable behavior that both <gallery widths=180> (concise) and <gallery widths=180px> (technically redundant but clearer) are accepted and don't populate the category. Both syntaxes are widely used.
This is clearly a bug.
@cscott Is this intended to populate the tracking category? I personally think it's reasonable behavior that both <gallery widths=180> (concise) and <gallery widths=180px> (technically redundant but clearer) are accepted and don't populate the category. Both syntaxes are widely used.