Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21692 closed enhancement (fixed)

jQuery Color 2.1.0 (update)

Reported by: ramoonus's profile ramoonus Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: has-patch
Focuses: Cc:

Description

jQuery script Color has just been updated to version 2.1.0 as described on http://blog.jquery.com/2012/08/24/jquery-color-2-1-0/

Attachments (1)

21692.diff (1.2 KB) - added by scribu 12 years ago.

Download all attachments as: .zip

Change History (13)

#1 @scribu
12 years ago

  • Type changed from defect (bug) to enhancement

Is jQuery.Color actually used in Core? I see the enqueue, but it's not tied to anything.

Related: #21206

#2 @azaozz
12 years ago

It's used in wp-lists.js to get/set background colors. Some of this functionality is now included in jQuery afaik.

#3 @scribu
12 years ago

Then shouldn't we just add it as a dependency to wp-lists.js instead of enqueuing it manually?

#4 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21632]:

Update jQuery Color Animations plugin to 2.1.0. Props gnarf. fixes #21692.

#5 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5

#6 @scribu
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Why do we need the unminified version in Core?

And what about the dangling dependency?

@scribu
12 years ago

#7 @scribu
12 years ago

  • Keywords has-patch added

21692.diff fixes the dependencies.

#8 @scribu
12 years ago

PS: I tried just removing wp_enqueue_script( 'jquery-color' ); and couldn't notice any errors or differences in the UI.

#9 @nacin
12 years ago

We can remove both un-minified versions and add them to the sources repository. Since we have changed from .js to .min.js, I didn't want to break any direct references to .js. But in this case, I don't care.

#10 @nacin
12 years ago

This was added when alerts used to have a color fade. See [6582] for when we transitioned from FAT to jQuery Color Animations. At the time, it should have been added as a dependency to 'common', just as it was a dependency for 'listman'.

We no longer have any animations in common.js as we no longer have fades in our alerts (removed in 2.9). We do however still animate colors when approving/unapproving/trashing/etc a comment, which is why we need it for wp-lists.

We only actually use the dimming aspects of wp-lists inside edit-comments, but someone else using and extending wp-lists (and, I really do apologize to them) might be. By removing the global enqueue, we're still saving some bytes, so let's move to wp-lists instead of edit-comments.

Anyone using color animations in the admin will lose them if they are not marking jquery-color as a dependency themselves (or enqueueing it themselves). If people complain, we can make it a dependency of 'common' as well.

#11 @nacin
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [21646]:

Set jQuery Color to be a dependency for wp-lists, rather than enqueueing it everywhere.

Any plugin wishing to use jQuery color animations must set jquery-color as a dependency
(or enqueue it).

Remove the un-minified version of jQuery Color.

props scribu.
fixes #21692.

#12 @nacin
12 years ago

In [21660]:

Update old files array:

  • Remove old names for jQuery UI Effects files. see #21736.
  • Remove un-minified version of Jcrop and jQuery Color. see #21692, #20728.
  • Remove .dev.css and .dev.js. see #21633.
Note: See TracTickets for help on using tickets.