Ticket #5447 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

[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 Work issues:
Report Upstream: Reviewers: Jason Grout
Authors: Mitesh Patel Merged in:
Dependencies: Stopgaps:

Description (last modified by mpatel) (diff)

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

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

Change History

comment:1 Changed 4 years ago by jason

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

comment:2 Changed 4 years ago by jason

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

Changed 4 years ago by mpatel

For p0 spkgs.

comment:3 Changed 4 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 Download 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: ↓ 5 Changed 4 years ago by mpatel

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

comment:5 in reply to: ↑ 4 Changed 4 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 4 years ago by mpatel

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

comment:6 Changed 4 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 4 years ago by mpatel

  • 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
  • Description modified (diff)
  • Authors set to Mitesh Patel

comment:9 Changed 4 years ago by mpatel

  • Description modified (diff)

Changed 4 years ago by jason

apply instead of previous patches

comment:10 Changed 4 years ago by jason

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

comment:11 Changed 4 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 4 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 4 years ago by jason

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

Changed 4 years ago by mpatel

Apply only this patch.

comment:14 Changed 4 years ago by mpatel

  • Description modified (diff)

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

comment:15 Changed 4 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 4 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 4 years ago by mpatel

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

comment:18 Changed 4 years ago by mpatel

  • Description modified (diff)

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

comment:20 Changed 4 years ago by was

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

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

Note: See TracTickets for help on using tickets.