Page MenuHomePhabricator

MediaTransformError default width in gallery is incorrect
Closed, ResolvedPublic

Description

The default width of a MediaTransformError seems to be 180px, but in a gallery that is too wide. The better question might be, why is this in a table in the first place, and not simply in the thumb frame...


Version: unspecified
Severity: minor

Details

Reference
bz23075

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:10 PM
bzimport set Reference to bz23075.
bzimport added a subscriber: Unknown Object (MLST).

It seems the smallest possible thumbs with this error are 180 atm. I'm not sure if we want to keep that, because it looks rather ugly http://commons.wikimedia.org/wiki/Category:Animations_of_geometry

from: includes/media/MediaTransformOutput.php
max( isset( $params['width'] ) ? $params['width'] : 0, 180 )
max( isset( $params['height'] ) ? $params['height'] : 0, 180 )

Created attachment 7273
Proposed changes to MediaTransformError

This patch changes the minimum size of a MediaTransformError to 120px, which makes sure it will at least fit galleries. Any smaller and likely it would become unreadable, so keep the ugly in those cases.

The patch also changes the message from a table to a div, because there is no real need to use a table here. I have added "display:inline-block" to the css to make it behave almost exactly as an img or table element would (This might be important for [[File:image.gif|180px]], where no other framing is provided.)

I have no strong opinion on the usage of inline-block, I'll leave it up for debate.

Attached: