Closed
Bug 664889
Opened 14 years ago
Closed 14 years ago
Include image dimensions for <preview> images
Categories
(addons.mozilla.org Graveyard :: API, defect, P3)
addons.mozilla.org Graveyard
API
Tracking
(Not tracked)
VERIFIED
FIXED
6.1.3
People
(Reporter: Unfocused, Assigned: andy+bugzilla)
References
Details
In the detail view of the addons manager, we show one of the images we get from the AMO API. At the moment, we don't know before-hand what size that image is. So when the image loads, it suddenly takes up space - making most of the UI element jump in a not-very-nice kind of way. We can fix this if we know the image dimensions.
Comment 1•14 years ago
|
||
Should be no need to increment the API for this, just add to 1.5.
Assignee: nobody → amckay
Priority: -- → P3
Target Milestone: --- → 6.1.3
Assignee | ||
Comment 2•14 years ago
|
||
We resize all preview images, but we don't scale them, we resize to largest bounding x or y. So we get image sizes that vary, but will always be max of one of x or y.
https://static-cdn.addons.mozilla.net/img/uploads/previews/thumbs/55/55569.png?src=api&modified=1306911147 is width 200px
https://static-cdn.addons.mozilla.net/img/uploads/previews/thumbs/55/55570.png?src=api&modified=1306911147 is width 150px
Those dimensions we resize to are 200px wide, 150px high and 700px wide and 525px high.
Would it make sense to just use those dimensions, then your layout will be easy to do as they are consistent? This is what we do on the site in our layout.
I can add those resize dimensions to the API, or the actual image dimensions (something we currently don't store), but I don't think the actual image dimensions will be a great deal more useful.
Comment 3•14 years ago
|
||
We display the thing in the <thumbnail> tag, so the sizes of that would be what we're after. By my reckoning a width= and height= attribute on the tag would make sense. At some point in the future we might allow showing the full images so having those dimensions might be useful if they are easy to do right now, but it sounds like they aren't so probably not worth thinking on it much.
Assignee | ||
Comment 4•14 years ago
|
||
Do you want the max-width and max-height or the actual width and height? We pretty much only use the max-width and max-height in our designs.
Comment 5•14 years ago
|
||
I think the max would be enough and allow us to give a consistent look between add-ons details, what do you think Blair?
Comment 6•14 years ago
|
||
Unless we put the image in a fixed-size containing box (which would look odd for images that aren't roughly square), I think we'd need the actual dimensions to lay it out properly.
Reporter | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> Unless we put the image in a fixed-size containing box (which would look odd
> for images that aren't roughly square), I think we'd need the actual
> dimensions to lay it out properly.
^ This. Max width/height would be better than what we have now, but it's not ideal.
Ideally, I want to reserve the exact amount of space the image will take up when it's loaded - which requires the actual dimensions.
Assignee | ||
Comment 8•14 years ago
|
||
Alright, will do.
Assignee | ||
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 10•14 years ago
|
||
verified fixed at https://addons-next.allizom.org/en-us/firefox/api/1.5/addon/324018
Status: RESOLVED → VERIFIED
Comment 11•13 years ago
|
||
Why does this addon have no dimensions (or a modified time, apparently)?
https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/inspectthis
Comment 12•13 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #11)
> Why does this addon have no dimensions (or a modified time, apparently)?
> https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/inspectthis
It's older than when we started doing modified hashes? just a guess
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•