bwinton / whimsy

An addon to add some whimsperiments to your Firefox…
64 stars 59 forks source link

Bottom row of about:newtab gifs frequently cut of #103

Closed luser closed 9 years ago

luser commented 9 years ago

screen shot 2014-12-08 at 2 16 51 pm I've found that on my Mac the bottom row of the about:newtab gifs is frequently cut off. It seems to happen more reliably when I use Cmd+T to create a new tab vs. clicking the + icon.

bwinton commented 9 years ago

@oyiptong Any idea what's going on here? (It looks from my manual dom inspection like the tiles height-calculation code isn't running at the right time, but I'ld love some help figuring out what's actually happening there…)

oyiptong commented 9 years ago

interesting. I'm not sure offhand what may be happening here. I would say your intuition is right, @bwinton .

At least as far as the changes we've been working on, we haven't changed the layout much. The majority of the code we did was a change in the tiles' content, not the presentation.

any ideas @Mardak?

bwinton commented 9 years ago

(This might have been happening as far back as when we switched from 9-tiles to a variable number…)

Mardak commented 9 years ago

This seems to be triggered by setting browser.newtab.preload to false on https://github.com/bwinton/whimsy/blob/master/lib/ponami.js#L87

For me, the tiles resize correctly after letting the page sit for a little bit. I'm guessing the page is waiting on a load event before it resizes the content area. Perhaps something is being loaded that is delaying the event?

bwinton commented 9 years ago

Hmm. Kind of, although removing that code doesn't fix the problem when I hit cmd-R… I would suspect loading 12-ish animated gifs might delay the event, but that's just guesswork. Maybe @mikeconley has some perf-related ideas (or ideas on how to figure out what's delaying the load).

bwinton commented 9 years ago

Delaying the image replacement until after load with something like this seems to work. Can I get a quick code review from someone here before I commit it, just to make sure I'm not crazy? ;)

(Also, let me know if you want to be listed in the "contributors" section!)

bwinton commented 9 years ago

I think this is mostly fixed in 21d7542b46b1cc09a0772f1d7fe27db2b9042361, so I'm going to close it for now.