WordPress.org

Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#4265 closed defect (bug) (fixed)

Update included prototype.js to 1.5.1

Reported by: zamoose Owned by: rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version:
Component: General Keywords: javascript js prototype has-patch commit
Focuses: Cc:
PR Number:

Description

source:trunk/wp-includes/js/prototype.js is sitting at version 1.5. I'd like to propose we bump that to 1.5.1, the latest as per Prototype's site.

Attachments (3)

4265.diff (65.2 KB) - added by rob1n 13 years ago.
4265-p-s.diff (98.4 KB) - added by zamoose 13 years ago.
4265-final.diff (97.5 KB) - added by rob1n 13 years ago.

Download all attachments as: .zip

Change History (27)

#1 follow-up: @matt
13 years ago

I'd rather freeze it and replace anything that still uses it in core with jQuery.

#2 @zamoose
13 years ago

I thought the idea was to make it available for plugin authors (not just for core admin stuff). The changes are pretty significant and unless we're planning on stripping it out, I don't see the logic in not updating...

Full changelog here, with a basic rundown in the improvements being:

*Incredible Selector speedup and full CSS3 support.
*Full JSON encoding and decoding support and options for improved security.
*Optimized Element#get/setStyle for cross-browser compatibility and speed.
*Various String method enhancements and fixes.
*The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
*Many form serialization fixes—if you had troubles before, now they’ve been squashed.

(Cribbed from the Prototype blog.

#3 @zamoose
13 years ago

Freakin' WikiFormatting. That should've read:

  • Incredible Selector speedup and full CSS3 support.
  • Full JSON encoding and decoding support and options for improved security.
  • Optimized Element#get/setStyle for cross-browser compatibility and speed.
  • Various String method enhancements and fixes.
  • The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
  • Many form serialization fixes—if you had troubles before, now they’ve been squashed.

#4 @filosofo
13 years ago

Ryan had indicated earlier that the plan was to keep Prototype in for plugin and theme authors' benefit. Is the plan now to remove Prototype and Scriptaculous once everything in admin is handled by jQuery?

#5 @foolswisdom
13 years ago

Preview ;-) Freakin' WikiFormatting. That should've read:

  • Incredible Selector speedup and full CSS3 support.
  • Full JSON encoding and decoding support and options for improved security.
  • Optimized Element#get/setStyle for cross-browser compatibility and speed.
  • Various String method enhancements and fixes.
  • The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
  • Many form serialization fixes—if you had troubles before, now they’ve been squashed.

#6 @rob1n
13 years ago

  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned
  • Version 2.3 deleted

I'm okay with bumping the Prototype. It's backwards compatible and this is one of the pains in the butt that we're going to have to deal with, with maintaining included JS libraries.

#7 in reply to: ↑ 1 @rob1n
13 years ago

Replying to matt:

I'd rather freeze it and replace anything that still uses it in core with jQuery.

I believe Prototype is still there for plugin authors. And it wouldn't hurt to speed up the JS in the core that *does* use Prototype.

@rob1n
13 years ago

#8 @rob1n
13 years ago

  • Keywords has-patch commit added

Patch updates Prototype from 1.5.0 to 1.5.1.

#9 @ryan
13 years ago

Bump the version in script-loader.php.

Also, update to scriptaculous 1.7.1 beta 2.

Test the hell out of list manipulation and AJAX.

#10 @rob1n
13 years ago

Okay.

#11 @matt
13 years ago

Good points, okay then.

#12 @zamoose
13 years ago

Okay, the diff I just attached should update Script.aculo.us and script-loader.php too. Please test.

#13 @zamoose
13 years ago

Rats. Bad TinyMCE bit in that .diff. I'll resubmit.

#14 @zamoose
13 years ago

There's also a sound.js included in the Script.aculo.us distro - probably ought to be included and added to script-loader.php. A .diff won't take care of that first part...

#15 @rob1n
13 years ago

It will if you svn add it, then svn diff it.

#16 @zamoose
13 years ago

Shoot, you're right - I shouldn't post diffs before I have my morning coffee.

Submitting new one now.

@zamoose
13 years ago

#17 @rob1n
13 years ago

Looks good.

#18 @rob1n
13 years ago

Why not just set the version to 1.5.1 instead of 1.5.1-0?

#19 @zamoose
13 years ago

rob1n:
I was attempting to follow the general style laid out previously. I've no affinity for numbering either way -- I was assuming whomever set the previous version knew what they were doing and thus blindly followed along. *grin*

Why must you persecute we lemmings?

#20 @rob1n
13 years ago

I was just wondering :).

I'll probably just take out the -0 when I commit, seems pointless to make + upload another patch just to get rid of that.

I'll commit this later today, after testing list manager and category stuff.

#21 @zamoose
13 years ago

Before you commit: looks like I didn't add the sound.js to script-loader.php. Should I add another diff, or do you just want to add it to the end of the scriptaculous-* section when you strip the -0's?

#22 @rob1n
13 years ago

I can just do it. No biggie.

@rob1n
13 years ago

#23 @rob1n
13 years ago

Tested:

  • Listman (categories, posts, pages)
  • Adding categories in the DBX widget, on-the-fly
  • Autosave
  • Dashboard (AJAX calls)

Everything worked fine. Commit?

#24 @rob1n
13 years ago

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

(In [5482]) Update Prototype to 1.5.1 and script.aculo.us to 1.7.1-b2. Props zamoose. fixes #4265

Note: See TracTickets for help on using tickets.