hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
722 stars 215 forks source link

Avatar timeout #722

Closed carols10cents closed 11 years ago

carols10cents commented 11 years ago

This fixes a bunch of little things having to do with avatars that dont load, none of which we have issues for that I could find.

One issue is that some avatars don't error right away but instead take >30s to time out. An example of this is thelastgherkin@rainbowdash.net. What you end up seeing is the alt text that says "avatar" where an avatar image should be, which is strange.

I made this slightly less ugly, I think, by setting a background image on the img of the default avatar and by removing the alt text. This way, in firefox at least, you'll see an outline of the broken image on top of the default avatar while it's waiting and then that outline will go away, leaving only the default avatar when the request times out. Chrome just shows the default avatar the whole time. I think this is better than the alt text "avatar" there, and I don't think "avatar" really adds meaning for screenreaders anyway.

The other fix in here is to scope the script that replaces errored images to only do that for avatars-- it doesn't make sense to do that for any other image on the site if some configuration is broken.

wilkie commented 11 years ago

Good. You fixed a bug someone noticed in irc the other day. :)

This is a creative fix, for certain. It doesn't... fix the underlying problem, but it doesn't hurt what happens already any further. I'm going to merge it. Let's see what happens. We might have to later on do an optional thing where we somehow store the images in the database, but that's haaaaard.