@mattab opened this Issue on June 4th 2008 Owner

Task
Update javascript librairies to their latest/fastest releases: jquery, jquery plugins, swfobject.

jquery

http://feeds.feedburner.com/~r/ajaxian/~3/303858275/jquery-release-126-performance-improvements-and-dimensions-plugin-added-to-core

We are using fast changing libraries in Piwik. We should try to upgrade the libraries as often as possible, every few months, so we stay in line with the APIs and latest features.

A new release of jQuery is out 1.2.6. The headlines on improvements:
* Event handling: 103%
* CSS selectors: 13%
* .offset: 21%
* .css: 25%

Lots of other fixes, but the most important, IMHO, is the inclusion of Brandon Aarons Dimensions plugin cross browser support for find element dimensions, offsets and positioning in the jQuery core. Check out the release notes here.

As we are using dimensions and jquery, we definitely should upgrade to this new version.

testing

@robocoder commented on December 31st 2008 Contributor

Attachment: swfobject 2.1 update: replace 3 files, add libs/swfobject/expressInstall.swf (though not currently used), and remove libs/swfobject/README.txt
243_swfobject.zip

@robocoder commented on January 1st 2009 Contributor

Attachment: Sync with sparkline cvs repository (minor bug fixes & dual license change)
243_sparkline.zip

@robocoder commented on January 2nd 2009 Contributor

Attachment: Fix for jquery 1.2.6.
fdd2div-modified.js

@robocoder commented on January 2nd 2009 Contributor

Attachment: Update to jquery-tooltip from 1.1 to 1.3; minor changes as a result of $.fn.Toolkit() being deprecated & removed in favor of $.fn.toolkit()
243_tooltip.zip

@robocoder commented on January 2nd 2009 Contributor

Attachment: Forward port changes to jquery-superfish 1.4.8 and use superfish arrows
243_superfish.zip

@robocoder commented on January 10th 2009 Contributor

Attachment: Replaces patch for core/ViewDataTable/GenerateGraphHTML.php.
GenerateGraphHTML.diff

@robocoder commented on January 18th 2009 Contributor

Attachment: Roll-up - contains diffs and new files
243.zip

@anonymous-piwik-user commented on July 20th 2008

jquery is really sure to make an automatic update without tests from piwik time ? And it's a little useless, because the new features (without some improvements) aren't used yet (piwik can't be based on a future-release of jquery)

@pebosi commented on November 8th 2008 Contributor

i tested (http://dev.piwik.org/trac/wiki/HowToTestUI) with firefox and used jquery-1.2.6-min, following results:

Test Include/Exclude low population

  • Does not work, but maby there are to less entries, tried on action->pages and providers

Actions pages table failed on "Different styles for Odd/Even lines"

Actions Tables are not sortable

maybe the weren't before...

Make sure that already added widgets cannot be added again

Its not klickable but if i click there is a new box wich says "Loading widget please weight" and im still waiting :)

last thing i saw is that the menus of language- and site selection are visible and without arrows...

@pebosi commented on November 8th 2008 Contributor

next test was with updated swfobject, no problems.

@pebosi commented on November 8th 2008 Contributor

sorry, the new swfobject hides all graphs.

@pebosi commented on November 8th 2008 Contributor

what other jquery plugins are to be tested?

@robocoder commented on December 9th 2008 Contributor

jQuery (current: 1.2.2; latest: 1.2.6)

SWFObject (current: 1.5; latest 2.1)
swfobject plugin (not used; latest: 1.0.3) http://jquery.thewikies.com/swfobject/

fdd2div (current: 1.0; latest: 1.0.1) Don't know if it fixes ticket #451.
superfish (current: 1.4.1; latest: 1.4.8)
thickbox (current/latest: 3.1)
tooltip (current: 1.1; latest: 1.3)

truncate (version ???) Could look into using http://www.reindel.com/truncate/ (v2.3)

@robocoder commented on December 29th 2008 Contributor

re: pebosi's observations re: the latest swfobject; the API changed, i.e., the object interface is gone

matt added in email: "Also we have patched some libs (UI sortable, fdd2div, superfish) so let's not update these ones."

@robocoder commented on January 1st 2009 Contributor

fdd2div (original and modified) are broken by jquery 1.2.6

@robocoder commented on January 1st 2009 Contributor

Notes: ui.mouse was moved into the jquery ui.core in 1.5.3; similarly, calendar was adopted as ui.datepicker

@robocoder commented on January 2nd 2009 Contributor

TODO: "Loading data" for swfobject isn't centred (appears in the top left corner) in the widget.

@robocoder commented on January 2nd 2009 Contributor

Suggest update of swfobject should coincide with resolution of ticket #322 (update to Open Flash Chart v2).

@robocoder commented on January 5th 2009 Contributor

Updated blockUI (from 1.33 to 2.11), dimensions (from 1.1.2 to 1.2), and scrollTo (from 1.3 to 1.4) unchanged, with no apparent ill effect. I left ui.mouse, ui.sortable, and calendar alone (as there are big differences going to jquery.ui 1.5.3).

I'll put together a patch and/or zip that rolls up all the above. If there's no objection, I'll probably use the YUI compressor to minify the locally modified versions of fdd2div and superfish.

@robocoder commented on January 8th 2009 Contributor

Here's the roll-up of changes:

Summary of changes:

  • jQuery updated from 1.2.2 to 1.2.6
  • swfobject updated from 1.5 to 2.1
  • sparkline updated from upstream cvs
  • fdd2div fixed to work with jQuery 1.2.6, and yuicompress'd
  • tooltip updated from 1.1 to 1.3
  • superfish updated from 1.4.1 to 1.4.8, and yuicompress'd
  • blockUI updated from 1.33 to 2.11
  • dimensions updated from 1.1.2 to 1.2
  • scrollTo updated from 1.3 to 1.4

Files added:

  • libs/jquery/original\ lib/fdd2div-modified.js
  • libs/jquery/original\ lib/superfish_modified.js
  • libs/sparkline/LICENSE-BSD.txt
  • libs/sparkline/LICENSE-GPL.txt
  • libs/swfobject/expressInstall.swf

Files removed:

  • libs/sparkline/LICENSE
  • libs/swfobject/README.txt

No change to: ui.mouse, ui.sortable, and calendar

(Attachment to follow.)

@mattab commented on January 14th 2009 Owner

vipsoft, thank for the patches.

Can you please confirm, that after applying all your patches, you have tested your updated Piwik following the procedure described in http://dev.piwik.org/trac/wiki/HowToTestUI (I've just slightly updated it); I would recommend testing with Firefox, Internet explorer, and Safari (or Chrome): the three major web engines.

This is really important to make sure there are no regression in the UI.

@robocoder commented on January 14th 2009 Contributor

I'll let you know when I'm done testing.

@robocoder commented on January 16th 2009 Contributor

Matt: I've had to halt testing as there's a major regression where Dashboard changes (e.g., adding/removing/re-adding widgets) manipulates the DOM and leaves it in a bad state. I'll continue to investigate...

To anyone else monitoring this ticket: there were some other regressions which I've since fixed but are not reflected in the previously attached files.

@robocoder commented on January 17th 2009 Contributor

Ok, patches are on their way. I'll also include a fix to ticket #506.

@pebosi commented on January 23rd 2009 Contributor

tried to apply the diff to my piwik installation, but patching of some files failed:

#############

patching file plugins/Dashboard/templates/Dashboard.js
patching file plugins/Dashboard/templates/widgetMenu.js
patching file plugins/UsersManager/templates/UsersManager.js
patching file plugins/CoreHome/templates/datatable.js
patching file plugins/CoreHome/templates/menu.tpl
patching file plugins/Goals/templates/single_goal.tpl
patching file core/Visualization/OpenFlashChart.php
patching file core/ViewDataTable/GenerateGraphHTML.php
Hunk #2 FAILED at 100.
1 out of 2 hunks FAILED -- saving rejects to file core/ViewDataTable/GenerateGraphHTML.php.rej
patching file libs/jquery/jquery.blockUI.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.blockUI.js.rej
patching file libs/jquery/superfish_modified.js
Hunk #2 FAILED at 10.
1 out of 2 hunks FAILED -- saving rejects to file libs/jquery/superfish_modified.js.rej
patching file libs/jquery/tooltip/___jquery.tooltip.js
patching file libs/jquery/tooltip/jquery.tooltip.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/tooltip/jquery.tooltip.js.rej
patching file libs/jquery/tooltip/changelog.txt
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED -- saving rejects to file libs/jquery/tooltip/changelog.txt.rej
patching file libs/jquery/jquery.scrollTo.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.scrollTo.js.rej
patching file libs/jquery/jquery.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.js.rej
patching file 'libs/jquery/original lib/jquery.blockUI.js'
patching file 'libs/jquery/original lib/jquery.dimensions.js'
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.dimensions.js.rej'
patching file 'libs/jquery/original lib/jquery.js'
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.js.rej'
patching file 'libs/jquery/original lib/jquery.scrollTo.js'
Hunk #2 FAILED at 21.
1 out of 2 hunks FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.scrollTo.js.rej'
patching file libs/jquery/jquery.dimensions.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.dimensions.js.rej
patching file libs/jquery/jquery.scrollTo-min.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.scrollTo-min.js.rej
patching file libs/jquery/fdd2div-modified.js
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 70.
2 out of 2 hunks FAILED -- saving rejects to file libs/jquery/fdd2div-modified.js.rej
patching file libs/swfobject/swfobject.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/swfobject/swfobject.js.rej
patching file libs/swfobject/README.txt
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file libs/swfobject/README.txt.rej
patching file libs/sparkline/lib/Sparkline_Bar.php
patching file libs/sparkline/lib/Sparkline_Line.php
patching file libs/sparkline/lib/Object.php
patching file libs/sparkline/lib/Sparkline.php
patching file libs/sparkline/CHANGES
patching file libs/sparkline/DESIGN
patching file libs/sparkline/README

#############

and these days jquery 1.3.1 is released.

@pebosi commented on January 23rd 2009 Contributor
patching file plugins/Dashboard/templates/Dashboard.js
patching file plugins/Dashboard/templates/widgetMenu.js
patching file plugins/UsersManager/templates/UsersManager.js
patching file plugins/CoreHome/templates/datatable.js
patching file plugins/CoreHome/templates/menu.tpl
patching file plugins/Goals/templates/single_goal.tpl
patching file core/Visualization/OpenFlashChart.php
patching file core/ViewDataTable/GenerateGraphHTML.php
Hunk <a href='/2'>#2</a> FAILED at 100.
1 out of 2 hunks FAILED -- saving rejects to file core/ViewDataTable/GenerateGraphHTML.php.rej
patching file libs/jquery/jquery.blockUI.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.blockUI.js.rej
patching file libs/jquery/superfish_modified.js
Hunk <a href='/2'>#2</a> FAILED at 10.
1 out of 2 hunks FAILED -- saving rejects to file libs/jquery/superfish_modified.js.rej
patching file libs/jquery/tooltip/___jquery.tooltip.js
patching file libs/jquery/tooltip/jquery.tooltip.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/tooltip/jquery.tooltip.js.rej
patching file libs/jquery/tooltip/changelog.txt
Hunk <a href='/1'>#1</a> FAILED at 1.
Hunk <a href='/2'>#2</a> FAILED at 35.
2 out of 2 hunks FAILED -- saving rejects to file libs/jquery/tooltip/changelog.txt.rej
patching file libs/jquery/jquery.scrollTo.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.scrollTo.js.rej
patching file libs/jquery/jquery.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.js.rej
patching file 'libs/jquery/original lib/jquery.blockUI.js'
patching file 'libs/jquery/original lib/jquery.dimensions.js'
Hunk <a href='/1'>#1</a> FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.dimensions.js.rej'
patching file 'libs/jquery/original lib/jquery.js'
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.js.rej'
patching file 'libs/jquery/original lib/jquery.scrollTo.js'
Hunk <a href='/2'>#2</a> FAILED at 21.
1 out of 2 hunks FAILED -- saving rejects to file 'libs/jquery/original lib/jquery.scrollTo.js.rej'
patching file libs/jquery/jquery.dimensions.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.dimensions.js.rej
patching file libs/jquery/jquery.scrollTo-min.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/jquery/jquery.scrollTo-min.js.rej
patching file libs/jquery/fdd2div-modified.js
Hunk <a href='/1'>#1</a> FAILED at 41.
Hunk <a href='/2'>#2</a> FAILED at 70.
2 out of 2 hunks FAILED -- saving rejects to file libs/jquery/fdd2div-modified.js.rej
patching file libs/swfobject/swfobject.js
Hunk <a href='/1'>#1</a> FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libs/swfobject/swfobject.js.rej
patching file libs/swfobject/README.txt
Hunk <a href='/1'>#1</a> FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file libs/swfobject/README.txt.rej
patching file libs/sparkline/lib/Sparkline_Bar.php
patching file libs/sparkline/lib/Sparkline_Line.php
patching file libs/sparkline/lib/Object.php
patching file libs/sparkline/lib/Sparkline.php
patching file libs/sparkline/CHANGES
patching file libs/sparkline/DESIGN
patching file libs/sparkline/README
@robocoder commented on January 23rd 2009 Contributor

pebosi: did you "svn up" first? the diffs are against the repository (as of [882]), and there was a widespread change to fix newlines per ticket #452.

@mattab commented on February 3rd 2009 Owner

vipsoft, is it safe now to patch Piwik? are you done with the testing? i'd like to commit asap :) thanks.

@robocoder commented on February 3rd 2009 Contributor

Do you want to wait for pebosi's feedback?

I finished testing a couple of weeks ago. I already noted the issue of the swfobject "Loading data" message occasionally not being centered; I firmly expect this will self-correct itself when we move to OFC2 in ticket #322.

@pebosi commented on February 3rd 2009 Contributor

dont need to wait, first time i tried to patch 0.2.28, patching svn version works ;)

@robocoder commented on February 3rd 2009 Contributor

Matt: Having heard no complaints, it looks like this patch can be committed. Thanks.

@mattab commented on February 11th 2009 Owner

guys, this is a great work! thank you for your help testing pebosi, and kudos to vipsoft for your patience and testing.

in [886]

@robocoder commented on October 29th 2009 Contributor

In [1548], refs #5663 - remove obsolete jquery.dimensions.js; now part of jquery.js 1.2.6

This Issue was closed on October 29th 2009
Powered by GitHub Issue Mirror