animated show/hide and UI effects

animated show/hide and UI effects


Hi devs,
I think it was Michael Geary who mentioned how jQuery's animated
show/hide methods are rather creepy. Simultaneous animation of both
height and width leads to the text constantly reflowing - I agree with
Mike that thats hardly a desirable effect.
As we are going for jQuery 1.3 I'd like to get some discussion going on
how this could be improved. The obvious step would be remove the
width-animation, and just animate the height. But that would result in
animated show/hide being equivalent to slideDown/Up, wouldn't it? If we
change it at all, either it should change in a way that slideDown/Up is
still useful, or just remove slideDown/Up, too.
Related to that: The jQuery UI/fx/enchant module provides animation via
a new method, effect(type, settings), while also enhancing show/hide,
eg. show("explode"). This can add quite a big of confusion, considering
that show(500) animates width/height for 500ms, while show("explode")
lets it explode (for whatever duration). Overloading jQuery methods is
fine, overload a single argument and giving it a completely different
meaning is not.
In short: We need to fix animated show/hide and make sure that core and
ui effects have a consistent API.
Ideas?
Jörn