As mentioned in IRC a day or two ago, I've begun reviewing these various patches. You have clearly done yeoman's work here!
One small thing, I am wondering about the naming convention we're using for EventEmitters. In cases I've seen so far, we're using an "onVerb" type name for the emitter itself, e.g. onChange, onRowClick, etc. This feels a little bit against my (rudimentary) understanding of how these are used, as you end up having something like (onClick)="onClick()", which reads (in my brain) as "on onClick, run onClick". That is, it is contrary to the normal DOM events used when a component contains a built-in DOM node, and you would use (click)="onClick()", that is, "on click, run onClick". (It is also more obvious using the "canonical" directive forms, of course, i.e. on-click="onClick()".)
In other words, if we drop the "on" from the emitter name itself, then our custom components can look and act more like the built-ins, which I think is of value. And if we're going to change our practice, better to do so now while the code is still young. Please let me know what you think!
Hello Bill,
As mentioned in IRC a day or two ago, I've begun reviewing these various patches. You have clearly done yeoman's work here!
One small thing, I am wondering about the naming convention we're using for EventEmitters. In cases I've seen so far, we're using an "onVerb" type name for the emitter itself, e.g. onChange, onRowClick, etc. This feels a little bit against my (rudimentary) understanding of how these are used, as you end up having something like (onClick) ="onClick( )", which reads (in my brain) as "on onClick, run onClick". That is, it is contrary to the normal DOM events used when a component contains a built-in DOM node, and you would use (click) ="onClick( )", that is, "on click, run onClick". (It is also more obvious using the "canonical" directive forms, of course, i.e. on-click= "onClick( )".)
In other words, if we drop the "on" from the emitter name itself, then our custom components can look and act more like the built-ins, which I think is of value. And if we're going to change our practice, better to do so now while the code is still young. Please let me know what you think!
Sincerely,
Dan