Page MenuHomePhabricator

behavior change of galleries when gallery type is mode=packed
Closed, ResolvedPublic

Description

galleries in mode=packed used to be centered, now they suddenly changed to be right aligned. this broke some page layouts in hebrew wiki.

Might be related to T141349
Might be related to change:

https://gerrit.wikimedia.org/r/#/c/318223/

Compare:

My sandbox in hebrew wiki
To

My sandbox in English wiki

Event Timeline

Jdforrester-WMF added a project: Regression.

We should fix this, and probably backport to REL1_28.

The behavior change is also on LTR wikis but there it is now left aligned instead of centered.

I think now the behavior is consistent. With and without mode="packed" the images are left/right aligned. When you want to have centered images you can add style="margin:auto".

this broke some page layouts in hebrew wiki.

Out of curiosity, could you give any examples of affected pages?

After some testing I'm inclined to revert e6dd624baeca16efe462e3938969a72c9ef4ed1e and rethink T29540, it's causing the 'packed' gallery JS resizing to not work entirely correctly for small galleries (they don't grow to fit the page width, because their width is now limited). Same issue affects 'slideshow' galleries.

this broke some page layouts in hebrew wiki.

Out of curiosity, could you give any examples of affected pages?

for example:
https://he.wikipedia.org/wiki/%D7%90%D7%A8%D7%A6%D7%95%D7%AA_%D7%94%D7%91%D7%A8%D7%99%D7%AA#.D7.A4.D7.90.D7.95.D7.A0.D7.94_.D7.95.D7.A4.D7.9C.D7.95.D7.A8.D7.94

this was nicely centered 3 over 3.

After some testing I'm inclined to revert e6dd624baeca16efe462e3938969a72c9ef4ed1e and rethink T29540, it's causing the 'packed' gallery JS resizing to not work entirely correctly for small galleries (they don't grow to fit the page width, because their width is now limited). Same issue affects 'slideshow' galleries.

I can confirm. packed galleries with one line of images with a width between 66% to 100% of the whole width get not resized anymore. I think this can be solved and should be solved in the packed gallery JavaScript code. The JavaScript code should use the whole width instead of the intrinsic width.

matmarex renamed this task from behavior change of galleries when gallery type is mode=packed on RTL wikis to behavior change of galleries when gallery type is mode=packed.Nov 2 2016, 11:40 AM
matmarex removed projects: RTL, I18n.

Change 319302 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319302

Change 319303 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319303

Change 319304 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319304

Reverted, and backporting to:

  • MW 1.28 (soon to be released)
  • MW 1.29.0-wmf.1 (being deployed to Wikimedia wikis this week)

Change 319302 merged by jenkins-bot:
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319302

Change 319303 merged by jenkins-bot:
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319303

Change 319304 merged by jenkins-bot:
Revert "Gallery: Use intrinsic width for gallery to center caption"

https://gerrit.wikimedia.org/r/319304

matmarex claimed this task.
matmarex removed a project: Patch-For-Review.

This issue has been fixed and the fix will be deployed to Wikimedia wikis this week, 01-03 November, per https://www.mediawiki.org/wiki/MediaWiki_1.29/Roadmap. (It'll be deployed to Hebrew Wikipedia later today.)

I reopened T29540.