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

Benoît Allard benoit at aeteurope.nl
Thu Apr 28 03:03:57 CDT 2011



Adrian Buehlmann wrote:
> On 2011-04-27 19:54, Kevin Gessner wrote:
>> 2011/4/27 Adrian Buehlmann <adrian at cadifra.com>:
>>> On 2011-04-27 11:21, Benoît Allard wrote:
>>>> 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.
>>> 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.
>> Another way to solve the flickering is to call `process_dates` at the
>> bottom of the page (below all the elements that have a date). At this
>> point the necessary DOM elements will be available to JS, so you
>> wouldn't need to wait for either dom-ready or window.load.
> 
> I offer to test that claim on Windows 7 with IE9, Google chrome and
> Firefox 4 if Benoît provides a testpatch for this. It doesn't need to be
> a fully polished patch yet.
> 

Thanks a lot Kevin ! Looks like it does it, I have to say that I'm 
myself impressed. See enclosed bundle.

If it fits the bill, I'll update the testsuite again and resubmit. 
Please let me know your degree of satisfaction Adrian (others are of 
course also invited to look at it !).

Regards
Benoît
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamicago3a.hg
Type: application/octet-stream
Size: 8856 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110428/c7a5e6a8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6370 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110428/c7a5e6a8/attachment.bin>


More information about the Mercurial-devel mailing list