short answer: because fallback image stuff is a nightmare in web browsers
2012-04-29 12017, 2012
ocharles
here's how it works, if you have JS enabled:
2012-04-29 12036, 2012
ocharles
you get an empty <img /> element. we then change the src attribute to point to the small thumbnail. if we get an error, then we try the large image
2012-04-29 12052, 2012
ocharles
the reason we can't just do <img src="smallthumbnail" /> is because in some browsers, we won't catch the 404 event
2012-04-29 12004, 2012
ocharles
so we have to have the broken image at the start
2012-04-29 12012, 2012
ocharles
warp might be able to say if i'm write or wrong there
2012-04-29 12035, 2012
ocharles
i'm not sure it's necessary to display the broken image though, but I have a odd feeling that with display: none, we also don't get the onError() to trigger
2012-04-29 12052, 2012
nikki
complicated :/
2012-04-29 12006, 2012
ocharles
yes, horribly :(
2012-04-29 12004, 2012
nikki wonders if <noscript> would be better than trying to keep track of cookies saying whether the user has js or not (i.e. <script>do complicated shit</script><noscript>insert 250 thumbnail and hope it's been generated</noscript>)
2012-04-29 12028, 2012
ocharles
perhaps. you can also use <object>, but that doesn't work in IE8 or something
2012-04-29 12000, 2012
ocharles
i'm going to leave this to warp though, he understand the intricities better than me
2012-04-29 12035, 2012
warp
nikki: yes. we need to bind the javascript error handler before setting the src= attribute on the image.
2012-04-29 12035, 2012
warp
nikki: IMO we should just require javascript period, and not worry about non-javascript users :)
2012-04-29 12055, 2012
ocharles is starting to side with that
2012-04-29 12059, 2012
ocharles
we just don't have the resources to support both
2012-04-29 12001, 2012
warp
such a decision would be a bit easier to justify if we had some statistics on non-javascript usage.
2012-04-29 12005, 2012
nikki
warp: is there any reason we couldn't use <noscript> to display the image when js isn't on? (other than someone having to actually make the change)
2012-04-29 12035, 2012
warp
nikki: I haven't really considered using <noscript> as an alternative to our js detection
2012-04-29 12052, 2012
warp
nikki: (either specifically for this problem or for the site in general)
2012-04-29 12022, 2012
warp
nikki: what problem are you trying to solve which using <noscript> would solve?
2012-04-29 12059, 2012
nikki
I had js on at one point, but then I turned it off and all the images broke because the site thought I had js on
2012-04-29 12012, 2012
nikki
(when <noscript> would obviously handle that fine, since that's exactly what it's for)
2012-04-29 12046, 2012
warp
that's a very specific use case. I already assume the amount of non-js users are tiny.
2012-04-29 12043, 2012
warp
the amount of users switching between js and non-js who don't know they should refresh the page after switching seems absolutely negligable :)
2012-04-29 12048, 2012
nikki
I did refresh the page
2012-04-29 12002, 2012
nikki
you have to clear the cookies if you want to switch
2012-04-29 12017, 2012
warp
ah, then perhaps there is a bug there.
2012-04-29 12023, 2012
ocharles
yea, there is certainly a bug there
2012-04-29 12049, 2012
warp
the intended behaviour is that it sets a no-js cookie on lead, which is overwritten by a yes-js cookie on javascript execution.
2012-04-29 12058, 2012
warp
or something like that.
2012-04-29 12040, 2012
ocharles
warp: do you know where the caa-indexer is running?
2012-04-29 12043, 2012
ocharles
is it on pino?
2012-04-29 12058, 2012
warp
no, ruaok set it all up.
2012-04-29 12027, 2012
ocharles
looks like it's on pino
2012-04-29 12029, 2012
ocharles
nikki: I believe uploading images and reordering images is now working correctly. if you want to try it, I recommend doing it without types, because of the outstanding "bug" (imo) that always forces front to display first on the website
2012-04-29 12058, 2012
nikki reported http://tickets.musicbrainz.org/browse/MBS-4622 and set it to minor
i have no idea where that image has gone, it's not in the old bucket either. nasty
2012-04-29 12029, 2012
nikki goes to put food in the microwave
2012-04-29 12046, 2012
ocharles
oh nice, I'd accidently typed a random 'a' into the merge handler in the caa-indexer, and that random a happened to be slap bang in the middle of a url. that url being the "copy from this url" part
2012-04-29 12049, 2012
ocharles
the delete however, was correct :P
2012-04-29 12037, 2012
kurtjx joined the channel
2012-04-29 12012, 2012
ocharles
It also seems that sometimes there is a delay when you do an upload for it to actually appear in a bucket
2012-04-29 12033, 2012
ocharles
so I think I'm going to have create some batch cleanup jobs
2012-04-29 12014, 2012
ocharles
ruaok: ping
2012-04-29 12020, 2012
ruaok
pong
2012-04-29 12034, 2012
ocharles
my vpn has just given up. can you update caa-indexer on pino and restart it?
2012-04-29 12052, 2012
ruaok
k
2012-04-29 12009, 2012
ruaok
you sure you want me to update the indexer on pino? the indexer for the sandbox is actually running on rika too
2012-04-29 12034, 2012
ocharles
huh?
2012-04-29 12053, 2012
ocharles
maybe i want that one updated then :)
2012-04-29 12000, 2012
ruaok
we currently have 2 instances of CAA-indexer running. which one do you want restarted?
2012-04-29 12010, 2012
ocharles
pino seems to be tracking the database on rika
2012-04-29 12044, 2012
ocharles
i updated pino's coverartarchive.org config to point to the rika database too
2012-04-29 12047, 2012
ruaok
coverart_redirect, running on pino is pointed to rika.
2012-04-29 12000, 2012
ocharles
it was pointing to test earlier
2012-04-29 12005, 2012
ruaok
caa-indexer, running on rika is pointed at rila
2012-04-29 12037, 2012
ruaok
now we have two instances running on the same DB? is that smart?
2012-04-29 12057, 2012
ocharles
well why have we even got 2 instances running at all? we only have one data store
2012-04-29 12013, 2012
ocharles
i haven't changed the caa-indexer configuration on pino
2012-04-29 12018, 2012
ocharles
only caa-redirect
2012-04-29 12055, 2012
ruaok
I'll stop the one on rika. and update the one on pino
2012-04-29 12017, 2012
ocharles
ok, that works
2012-04-29 12054, 2012
ruaok
carton.lock was modified on pino.
2012-04-29 12000, 2012
ruaok
should I comitt that?
2012-04-29 12009, 2012
ocharles
paste a diff
2012-04-29 12022, 2012
ocharles
dhcpcd refuses to get an ip on the vpn
2012-04-29 12044, 2012
ruaok
dont you have a login to carl?
2012-04-29 12052, 2012
ruaok
you can ssh to carl and then to pino.
2012-04-29 12053, 2012
ocharles
oh yea
2012-04-29 12059, 2012
ocharles
i usually go through zaphod, but that's on a weird port