Thanks for the feedback Scott,
If the generic classes will be removed from *all widgets*, that works
for me, but I'll clarify a few things anyway...
> The widget factory is already smart enough to add widget-specific classes
> for generic states that it handles (currently only disabled).
I didn't realize that. I noticed that the Draggable widget adds it
onLoad...
(this.options.disabled && this.element.addClass("ui-draggable-
disabled"))
...so assumed it used handled it at other times as well. My bad.
> The real problem
> here is just that the base widget shouldn't add the generic disabled
> class, because that behavior doesn't make sense for interactions.
This is clearly true for *some* widgets, like Draggable. But I assumed
the ui-state-disable state *is appropriate* for other widgets (?).
This is why I suggested *let the widget author decide*, and provide a
way to notify the factory of this choice. If en/disabled is the only
state handled by the factory, then a simple boolean option would
suffice, like addGenericClasses. This is consistent with the
addClasses option Draggable already has (which has no effect on any
disabled classes - tried that ;)
IF it is useful for 'some widgets' to have the generic class handled,
then it seems redundant to make the author add enable/disable handling
*only* to add/remove a generic class when the factory is already
handling classes for these events. So I was looking for a way to let
the factory do it all.
IF the widget *does* specify that generic class should be applied,
there could still be edge-case implementations where this is not
desireable. This is why I thought the same option should be exposed so
users could 'override' the widget default. I don't see this as a
support issue, but as a way to handle special needs *without support*.
But I understand about not allowing widget-specific classes to be
altered.
I'm clarifying this just in case there IS a need for 'some widgets' to
utilize the ui-state-disabled class, and any other generic class that
may be handled by the factory, now or in the future.
But if this is the consensus is to eliminate the ui-state-disabled
class completely, do you think this will be done in the next UI
version? It's causing a small issue for me, so my interest here is
selfish :)
/Kevin