[Kss-devel] change parameter names on toggleClass etc. actions

Godefroid Chapelle gotcha at bubblenet.be
Fri Jun 8 11:28:58 CEST 2007


Balazs Ree wrote:
> Currently we have three actions that change the "class" of a given node, 
> but they accept different parameter names. It was Martin who was so kind 
> to draw my attention to this inconsistency.
> 
> toggleClass                      requires "className"
> addClassName, removeClassName    require  "name"
> 
> This is disturbing. They should all require the same parameter name, 
> either of the two.
> 
> I would suggest using className for all the three.
> 
> In addition we could consider replacing the name of the action 
> toggleClass with toggleClassName as well. But this I feel is less 
> important then the fixing the parameter names.
> 
> In case this meets an agreement, I would volunteer to do these changes, 
> including javascript, commandsets, demos, and selenium tests, all with 
> proper BBB naturally.
> 
> Any opinions?
> 

I think 'name' is not correct. Those actions actually change the class 
'value'.

If you work on changing and getting coherence, I think we should go to

toggleClassValue, addClassValue, removeClassValue

with a single 'value' parameter.

My 2 cents

-- 
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be



More information about the Kss-devel mailing list