Opened 12 years ago

Closed 11 years ago

#5447 closed enhancement (fixed)

[with spkgs and patch, positive review] Upgrade to jQuery 1.3 and jQuery UI 1.7

Reported by: jason Owned by: jason
Priority: major Milestone: sage-4.2
Component: notebook Keywords:
Cc: jason Merged in:
Authors: Mitesh Patel Reviewers: Jason Grout
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mpatel)

Upgrading the jQuery and jQuery UI spkgs in Sage will make available several performance improvements and new features for the notebook. Release notes: jQuery 1.3 , jQuery UI 1.7.

To test the new spkgs, please download and install (e.g., via sage -f)

and apply the rebased v3 patch below to 4.1.2.alpha1's sage repository.

Note: When "downgrading" to the previous versions, it may help to delete local/notebook/javascript/jquery* manually, since their spkg-installs do not erase existing installations.

Attachments (4)

trac_5447-jquery_upgrade.patch (11.1 KB) - added by mpatel 11 years ago.
For p0 spkgs.
trac_5447-jquery_upgrade_v2.patch (8.2 KB) - added by mpatel 11 years ago.
For p1 spkgs. Depends on #6568, #6840.
trac_5447-jquery_upgrade_v2-rebased.patch (8.0 KB) - added by jason 11 years ago.
apply instead of previous patches
trac_5447-jquery_upgrade_v3.patch (9.5 KB) - added by mpatel 11 years ago.
Apply only this patch.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 12 years ago by jason

  • Component changed from algebra to notebook
  • Milestone set to sage-3.4.1
  • Owner changed from tbd to boothby
  • Type changed from defect to enhancement

comment:2 Changed 12 years ago by jason

  • Owner changed from boothby to jason
  • Status changed from new to assigned

Changed 11 years ago by mpatel

For p0 spkgs.

comment:3 Changed 11 years ago by mpatel

  • Cc jason added
  • Summary changed from upgrade to jquery 1.3 and jqueryui 1.7 to [with spkgs and patch, needs review] upgrade to jquery 1.3 and jqueryui 1.7

A first take on a much-desired jQuery / UI upgrade:

Install both packages and apply this patch to the sage repository. The patch

  • Updates the paths to scripts and stylesheets.
  • Tweaks interact.py's html_slider() and html_rangeslider() just enough to get the sliders to work with the new spkgs.
  • Cleans up notebook.py, somewhat.

I've tested the examples listed in interact? with success. However, the libraries have changed significantly and there may be many other ways to break the notebook and @interacts. Please test away and provide feeback!

comment:4 follow-up: Changed 11 years ago by mpatel

Reminder: Apply tips from this thread to the next revisions of spkg-install.

comment:5 in reply to: ↑ 4 Changed 11 years ago by mpatel

Replying to mpatel:

Reminder: Apply tips from this thread to the next revisions of spkg-install.

If necessary, rebase the patch against #6568.

Changed 11 years ago by mpatel

For p1 spkgs. Depends on #6568, #6840.

comment:6 Changed 11 years ago by mpatel

Changes in v2:

New spkgs:

Note: When "downgrading" back to jQuery 1.2.6 and jQuery UI 1.6, it may help to delete local/notebook/javascript/jquery* manually, since their spkg-installs just overwrite the previous installation.

comment:8 Changed 11 years ago by mpatel

  • Authors set to Mitesh Patel
  • Description modified (diff)
  • Summary changed from [with spkgs and patch, needs review] upgrade to jquery 1.3 and jqueryui 1.7 to [with spkgs and patch, needs review] Upgrade to jQuery 1.3 and jQuery UI 1.7

comment:9 Changed 11 years ago by mpatel

  • Description modified (diff)

Changed 11 years ago by jason

apply instead of previous patches

comment:10 Changed 11 years ago by jason

  • Description modified (diff)
  • Reviewers set to Jason Grout

comment:11 Changed 11 years ago by jason

  • Summary changed from [with spkgs and patch, needs review] Upgrade to jQuery 1.3 and jQuery UI 1.7 to [with spkgs and patch, needs work] Upgrade to jQuery 1.3 and jQuery UI 1.7

Great work!

There are still two places that the old location of jquery is referenced:

~/sage/devel/sage/sage/server/notebook$ grep -r jquery.js *
notebook.py:           <script type="text/javascript" src="/javascript_local/jquery/jquery.js"></script>
templates/notebook/worksheet.html:<script type="text/javascript" src="/javascript_local/jquery/jquery.js"></script>

comment:12 Changed 11 years ago by jason

Also, can you post a picture of the new sliders up on sage-devel? Last time I updated jqueryui, there was concern about having the squarish sliders.

comment:13 Changed 11 years ago by jason

(except for the two comments from me above, this has a positive review from me).

Changed 11 years ago by mpatel

Apply only this patch.

comment:14 Changed 11 years ago by mpatel

  • Description modified (diff)

Thanks very much for pointing out those places. Patch v3 should cover them. I've also inquired on sage-devel about the sliders.

comment:15 Changed 11 years ago by mpatel

  • Description modified (diff)
  • Summary changed from [with spkgs and patch, needs work] Upgrade to jQuery 1.3 and jQuery UI 1.7 to [with spkgs and patch, needs review] Upgrade to jQuery 1.3 and jQuery UI 1.7

I've uploaded a new jQuery UI package that tweaks patches/sage/jquery-ui-1.7.2.custom.css to set up thinner handles for both horizontal and vertical sliders (cf. "the middle one" at sage-devel):

comment:16 Changed 11 years ago by jason

  • Summary changed from [with spkgs and patch, needs review] Upgrade to jQuery 1.3 and jQuery UI 1.7 to [with spkgs and patch, positive review] Upgrade to jQuery 1.3 and jQuery UI 1.7

Okay, positive review.

However, please use http://sage.math.washington.edu/home/jason/jqueryui-1.7.2.p3.spkg

I just deleted one file that was leftover (a .orig file) and removed said file from the repository.

Nice work!!

comment:17 Changed 11 years ago by mpatel

Thanks! Sorry about not being explicit about my not wanting to fiddle further with the sliders.

comment:18 Changed 11 years ago by mpatel

  • Description modified (diff)

If the new jQuery UI package needs a review: Positive.

comment:20 Changed 11 years ago by was

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

Merged into sagenb-0.3.2 (i.e., sage-4.2).

Note: See TracTickets for help on using tickets.