Make comment count images specify size
Title:
Make comment count images specify size
Area:
Crossposting
Summary:
The cross post comment count images should specify what size they are in the HTML.
Description:
Because LJ allows people to use image placeholders for images over a certain size, and because the comment count images have no size specified, a placeholder ends up being used for them. However, because different numbers of comments have different image sizes, it becomes tricky to implement since the HTML specifying the size will have be fixed.
This could be fixed by making the image big enough to accommodate the largest possible number of comments and using those numbers.
Pros:
* people using placeholders on LiveJournal will be able to see the comment count without clicking through
Cons:
* The comment count image will always have to be as big as the largest number of comments possible. This makes it bigger and clunkier for more common smaller numbers.
* Easily breakable if we change the image further down the road.
(I am on the fence about this one myself, but want to see what other people think.)
This suggestion:
Should be implemented as-is.
16 (45.7%)
Should be implemented with changes. (please comment)
4 (11.4%)
Shouldn't be implemented.
1 (2.9%)
(I have no opinion)
13 (37.1%)
(Other: please comment)
1 (2.9%)

no subject
I am probably in favour of this, unless we're talking a six- or seven-digit image when normally it's just one or two digits of comments.
Also, I've never actually seen the images - is there a preview anywhere?Just found one on your LJ, thanks.no subject
no subject
Why? I haven't looked at how it works and haven't seen it in action yet, so I could be horribly wrong, but isn't the image URL different depending on how many comments an entry has? If so, the width and height attributes could also be made to vary.
no subject
no subject
commentcount?user=username&ditemid=12345 returns the generated image
commentcount?user=username&ditemid=12345&info=detailed returns the generated image's dimensions as a hash, which we can use to put the width and height into the image tag text
(but this means two calls each time you try to generate an image tag for a crossposted image -- I'm not sure it's a good idea)
no subject
We could probably reasonably make the width the size for 4 digits (I think that I used a variable-width font, so probably '9999' or something) and then right-align the number. The rectangle of white will be larger than it was before, but it will still look ok.
no subject
no subject
no subject
This could be facilitated by changing the image numbers to a fixed width font, so that there would be only five image sizes to account for.
no subject
no subject
no subject
no subject
no subject
no subject
no subject
Maybe something to consider instead is giving people who want to have placeholder images the option to whitelist comment-count images from other DW-codebase sites (and also perhaps the ones from wordpress sites and so on).
no subject
Well, except the chances of LJ implementing something like that, even if we gave them the code for it, are minimal. And it was LJ's placeholders that inspired this whole thing for me.
no subject
no subject
no subject