Skip to main content

Search and Top Navigation

#7103 closed enhancement (fixed)

Opened March 11, 2011 02:28PM UTC

Closed March 15, 2011 01:02PM UTC

Last modified March 15, 2011 01:02PM UTC

Effects: Move effects to $.effects.effect[]

Reported by: gnarf Owned by: gnarf
Priority: major Milestone: 1.9.0
Component: ui.effects.core Version: 1.8.10
Keywords: Cc:
Blocked by: Blocking:
Description

Part 2 of http://bugs.jqueryui.com/ticket/7060#comment:4 as its own ticket:

In thinking about how to handle the BC shim for this API change, and other ways we might clean up the internal API - I thought we could move the actual effect implementation functions out of the

 $.effects[] 
and into
 $.effects.effect[] 
. It gives us a discreet namespace where we are sure that the function is an effect API function. Currently, other functions exist out on
 $.effects[] 
that aren't effects, allowing you to get interesting results for
 $("div").toggle("animateClass") 
- Letting that namespace hold utility functions, while pushing the actual effects into a new namespace could show some minor improvements.

Attachments (0)
Change History (6)

Changed March 11, 2011 03:03PM UTC by gnarf comment:1

description: Part 2 of http://bugs.jqueryui.com/ticket/7060#comment:4 as its own ticket: \ \ In thinking about how to handle the BC shim for this API change, and other ways we might clean up the internal API - I thought we could move the actual effect implementation functions out of the {{{ $.effects[] }}} and into {{{ $.effects.effect[] }}}. It gives us a discreet namespace where we are sure that the function is an effect API function. Currently, other functions exist out on {{{ $.effects[] }}} that aren't effects, allowing you to get interesting results for {{{ $("div").toggle("animateClass") }}} - Letting that namespace hold utility functions, while pushing the actual effects into a new namespace could show some minor improvements. \ \ Also - We could potentially leverage {{{ $.effects.$ = jQuery.sub() }}} and extend its {{{fn}}} to serve up the setMode, save, restore, createWrapper, removeWrapper, and a few other helper functions that all take {{{ el }}} as a first parameter. Each of the effect functions can then use {{{ $.effects.$( this ) }}} and have all the helper functions available in a nice chain. \ \ Got most of these changes in and you can look at the branch here: https://github.com/gnarf37/jquery-ui/compare/effects-api...effects-sub -- it seems github is mistakenly showing some of the whitespace changes that were in the effects-api branch on the effects-sub branch, but you should get the idea...Part 2 of http://bugs.jqueryui.com/ticket/7060#comment:4 as its own ticket: \ \ In thinking about how to handle the BC shim for this API change, and other ways we might clean up the internal API - I thought we could move the actual effect implementation functions out of the {{{ $.effects[] }}} and into {{{ $.effects.effect[] }}}. It gives us a discreet namespace where we are sure that the function is an effect API function. Currently, other functions exist out on {{{ $.effects[] }}} that aren't effects, allowing you to get interesting results for {{{ $("div").toggle("animateClass") }}} - Letting that namespace hold utility functions, while pushing the actual effects into a new namespace could show some minor improvements. \
priority: minormajor

Moving

 jQuery.sub() 
to another ticket per scotts request - leaving only
 $.effects.effect[] 
on this ticket: http://bugs.jqueryui.com/ticket/7105 contains the other part...

Changed March 11, 2011 03:32PM UTC by gnarf comment:2

owner: → gnarf
status: newassigned

Changed March 11, 2011 08:02PM UTC by gnarf comment:3

blocking: → 7105

Changed March 15, 2011 12:42PM UTC by scottgonzalez comment:4

summary: Improving Internal Effects API - Part 2Effects: Move effects to $.effects.effect[]

Changed March 15, 2011 01:02PM UTC by gnarf comment:5

resolution: → fixed
status: assignedclosed

Effects: Moved effects to $.effects.effect[] and deprecated use of $.effects[]. Fixes #7103 - Effects: Move effects to $.effects.effect[].

Changeset: d64c9efda53f6e56feacf5f39940cd7719a2cb61

Changed March 15, 2011 01:02PM UTC by gnarf comment:6

Datepicker: Updated to check for new or old style effects (see #7103).

Changeset: ac0cc2fac5c0be1be599e35524476718be1650e3