[PATCH v2] web: Made elapsed time calculation dynamic (javascript).

Adrian Buehlmann adrian at cadifra.com
Wed Apr 27 12:48:36 CDT 2011


On 2011-04-27 11:21, Benoît Allard wrote:
> My second take on this.
> 
> Both graph.js and timeago.js have been put to mercurial.js.
> 
> mercurial.js uses exclusively tabs for indentation, the (ex-)graph.js 
> part has been left untouched. Thanks Adrian for pointing out the 
> indentation inconsistency in my previous take.
> 
> The testsuite is now updated, which make the patch way bigger than the 
> first take. For convenience, and because I don't trust my mail program, 
> I also enclose a bundle of it.
> 
> About the flickering, you are right Adrian that it occurs. I doubt I can 
> do something about it, patch are welcome to fix this. I've been pointed 
> on IRC toward using a DOM-ready event instead of the `window.onload`. 
> This would replace the text in an earlier stage, even before rendering. 
> Unfortunately, there is no portable way to use it. There are solutions 
> involving jQuery, or domready [1] (a subset of jQuery). I'd be delighted 
> to see patches that involve one of these accepted.
> 
> There are no remaining issue that I know of.
> 
> Regards
> Benoit
> 
> [1]http://code.google.com/p/domready/

While I like the idea of calculating the ages on the client side, I fear
the flickering is pretty much a show stopper on this.

So I think this flickering problem needs to be solved before this patch
should be taken.

domready.js sounds really interesting. Why do you think it isn't portable?

IIUC, the goal of domready.js is to have a subset of jQuery, which is
supposed to be portable?

(disclaimer: I'm not really a web page design person)


More information about the Mercurial-devel mailing list