Re: coding style: this.field



On Fri, 2005-04-29 at 12:55 -0400, Jonathan Blandford wrote:
> Colin Walters <walters redhat com> writes:
> 
> > However as far as coding style is concerned, I think we have a much
> > bigger problem on the web client side.  Particularly for CSS class
> > names.  topic.css is a terrible mess; there's no consistent mechanism
> > for figuring out which classes and ids correspond to which elements in
> > the UI.  This is something we'll want to change often I think.
> > 
> > My suggestion here is: If the element is generated by a JavaScript
> > class, prefix the element with <classname>, so we might have:
> > ClosedCommentCloserPerson.
> 
> Yeah, the .js/css is an inconsistent mess.  topic.css is a mess, but
> topic.js is even worse.  There are a mismatch of classes and naming
> schemes.  Some of it uses innerHTML, while others use dom.  We would
> also probably benefit from moving some of the classes out of topic.js
> into their own file just to make that file more managable.
> 

Please don't go cleaning up usage of innerHTML into DOM in whiteboard.js
without testing everything very carefully first; the code is very
sensitive to this.  The drawing code requires certain parts of the tree
to be created via assignments to innerHTML (possible Firefox bug, or bad
interaction with the div drawing layer).  Yes, it was painful to track
down.

Dave




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]