Opened 6 years ago

Closed 6 years ago

#4265 closed defect (bug) (fixed)

Update included prototype.js to 1.5.1

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

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 6 years ago.
4265-p-s.diff (98.4 KB) - added by zamoose 6 years ago.
4265-final.diff (97.5 KB) - added by rob1n 6 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 follow-up: ↓ 7   matt6 years ago

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

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.

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.

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?

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.
  • 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.

comment:7 in reply to: ↑ 1   rob1n6 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.

rob1n6 years ago

  • Keywords has-patch commit added

Patch updates Prototype from 1.5.0 to 1.5.1.

comment:9   ryan6 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.

Okay.

Good points, okay then.

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

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

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...

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

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

Submitting new one now.

zamoose6 years ago

Looks good.

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

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?

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.

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?

I can just do it. No biggie.

rob1n6 years ago

Tested:

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

Everything worked fine. Commit?

  • 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.