Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9019 closed enhancement (fixed)

Upgrade to jQuery 1.4.x

Reported by: Christian Boos Owned by: Christian Boos
Priority: normal Milestone: 0.12
Component: general Version: 0.12dev
Severity: normal Keywords: jquery javascript
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

jQuery 1.4 has been released recently (Thursday, January 14, 2010): see the Full Release Notes.

I've tested 1.4a2 some time ago and only found one issue, so I suppose upgrading won't be a big deal.

Besides the usual performance improvements that should come "for free", I've noted a good deal of new features that we could benefit from to have a better code in some places:

  • jQuery.parseJSON on the other side of our new trac.util.presentation.to_json, for passing data from Python to Javascript instead of writing data structures in the templates
  • as the selector style “#id p” is faster we can probably benefit from this
  • creation of HTML elements can now be done with jQuery(html, props), props being a dictionary of attributes and events

I've updated that patch with the minified copy of 1.4.1, but for developing better use the uncompressed version of course. So far it only contains the fix for the use of the now removed className internal (Backwards-Incompatible Changes).

Testing welcomed.

Attachments (0)

Change History (7)

comment:1 by Christian Boos, 15 years ago

Well, actually the patch was so small it didn't make much sense to bundle it with jquery 1.4.1 ;-)

So download your flavor of 1.4.1 from Day Twelve and test with r9117 (as the change is also compatible with jQuery 1.3.2).

comment:2 by anatoly techtonik <techtonik@…>, 15 years ago

+1 on including jQuery 1.4.1 in wiki:TracDev/ApiChanges/0.12

comment:3 by Christian Boos, 15 years ago

Well, first upgrade, then document …

And before doing the upgrade, I'd prefer to receive some positive testing feedback first (though all the tests I did myself show that it didn't introduce any issues, so I'll upgrade anyway in a few days).

comment:4 by anatoly techtonik <techtonik@…>, 15 years ago

Not many people have guts to switch their Trac to something that had't earned a stable state yet, because these are usually installed in production environment. =)

comment:5 by Christian Boos, 15 years ago

Well, in general, if the db is SQLite, testing a new version is pretty trivial:

  • cp -a productionenv testenv
  • PYTHONPATH=/path/to/trunk python /path/to/trunk/trac/web/standalone.py -p 8080 testenv

(or use a virtual env…)

If the db is something else, then doing a backup + reload in a different db should do the job as well (hm, maybe doing a backup at the occasion of a trac-admin ... hotcopy could make things easier here).

Now for the specific case of testing a new jQuery version, that's even more trivial: simply copy that new version over your existing <deploydir>/htdocs/js/jquery.js. If something breaks, it will be just some dynamic parts of the web UI, nothing critical.

comment:6 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

jQuery upgraded in r9187.

comment:7 by Christian Boos, 15 years ago

Upgrade documented in TracDev/ApiChanges/0.12@27.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.