mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-28 01:10:04 +00:00
d4caff9774
If the image isn't an SVG then it shouldn't be scaled past its original dimensions. Handle the case where the requested thumbnail can't be generated on the server as the original is too small ( < 320px, currently [0]) in the same way. Moreover, if the image happens to have the exact dimensions that we're requesting (300px or 600px wide, currently [1]), then use the original image to avoid unnecessary work/pressure on caches. Supporting changes: * Update the SVG_RESTBASE_RESPONSE fixture to use the extension returned by RESTBase (and the PageImages extension) for the thumbnail: .svg.png. [0] https://github.com/wikimedia/restbase/blob/master/v1/summary.yaml#L121 [1] https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/src/constants.js#L2 Bug: T156800 Change-Id: I5d0aa161e80869e4b4f5425d906d1e753047a3a3 |
||
---|---|---|
.. | ||
changeListeners | ||
gateway | ||
preview | ||
reducers | ||
actions.test.js | ||
changeListener.test.js | ||
counts.test.js | ||
integration.test.js | ||
isEnabled.test.js | ||
previewBehavior.test.js | ||
schema.test.js | ||
settingsDialog.test.js | ||
stubs.js | ||
userSettings.test.js | ||
wait.test.js |