Sunday, November 10, 13 We launched a major redesign of Fantasy Football this year (2013), so here are some of the lessons learned on that project, and some of the ways we used YUI. I know my last talk was about rebuilding Fantasy Football for touch devices, but I promise it’s all new content, though it’s fair to say...
did. Sunday, November 10, 13 We wanted to make Fantasy Football work on all three screens: Desktop, tablet and phones... But didn’t we do that already. Well not really, we got was...
finger doesn’t pause while moving (“doesn’t pause” means a touchmove event within 25ms of touchstart. You have to allow for a tiny bit of pausing. 25ms isn’t set in stone, but it seemed to work the best in informal testing).
13 We only allow the drag to start if you pause for at least 25ms. So we’re using tiny, subtle variances in user action to determine user intent, which is pretty close to mind reading. Actually, technically it’s a variation on “cold-reading”. But it’s imperfect at best...
great UI. Sunday, November 10, 13 ... much better is to have a UI that doesn’t require psychic powers, by clearly indicating to the user what areas they can expect drag interactions to occur, and what areas they can expect scroll interactions to occur.
Sunday, November 10, 13 For performance, we delegated nearly everything. The result is a roster that initializes practically instantly. When cached, it can initialize in under 100ms, below the threshold of perceptibility.
Sunday, November 10, 13 But notice the “click”? That’s not good for touch devices, it forces a 500ms delay between the user’s action and the result, way too long.
way better! Sunday, November 10, 13 So use “tap” instead of “click” wherever you can (basically wherever you don’t need to worry about users double-tapping to zoom in).
use the tab key, or the up and down arrows to select rows, the enter key to activate it, arrows or tabs to select destinations, and you can esc out of the interaction.
); Sunday, November 10, 13 Adding key support is easy: Just declare the keys you’re listening for (note: like everything else, you can delegate keyboard support)
=== 27) { if(self.isEditing()) { if(self.get("swapmethod") === "place") { self.exitPlaceEditMode(); } else { self.exitEditMode(); } } return; } Sunday, November 10, 13 And here’s an example of using them in action. In this case, this is using the esc key to exit the interaction.
I figured I knew the issue, it’s the fixed position backgrounds. That’s a guideline, right? Well, wrong, but before we get into that, time for a quiz. Oh, and I’m going to sound insane asking you this question:
Repainting Frame Profiling Secret Firefox FPS Meter! Sunday, November 10, 13 Tools such as these. BTW, the secret Firefox FPS meter is layers.acceleration.draw-fps in about:config.
So those rules of thumb about how to optimize page speed? Throw a lot of them out, and use the browser’s tools to find out where your page might be having problems.