Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep jQuery 1.x and jQuery UI 1.x up to date. #2493

Open
klonos opened this issue Jan 23, 2017 · 13 comments
Open

Keep jQuery 1.x and jQuery UI 1.x up to date. #2493

klonos opened this issue Jan 23, 2017 · 13 comments
Assignees
Milestone

Comments

@klonos
Copy link
Member

klonos commented Jan 23, 2017

I think we should be keeping these two libraries up to date. Especially with minor releases of Backdrop CMS.

List of things to test each time we update:

  • Node edit form: author name autocomplete
  • Node edit form: post date pop-up calendar
  • Note edit form: ckeditor - general
  • Note edit form: ckeditor - link dialog
  • Note edit form: ckeditor - image dialog
  • Layout UI - for path node/% does context appear automatically?
  • Layout UI - drag and drop blocks
  • Views UI - general
  • Views UI - modals
  • more?

Latest vs what we currently ship with is:

jQuery Core 1.12.4 / 1.11.0
jQuery UI 1.13.0 / 1.10.4

PS: it's been quite some time now that jQuery 2.x and 3.x are released. This is what I gathered from the net:

Versions of 2.x leave behind the older Internet Explorer 6,7, and 8 browsers. In return they are smaller, faster, and can be used in JavaScript environments where the code needed for old-IE compatibility often causes problems of its own. The jQuery team still supports the 1.x branch which does run on IE6/7/8. ...if you’re one of those lucky developers who has dropped support for IE6/7/8, grab jQuery 2.0 and don’t look back.

Perhaps now that we have decided to officially drop IE8 support (#214), we should upgrade to a version of jQuery that gets us speed improvements and smaller size. jQuery ninjas like @quicksketch are more qualified to tell if and how we'd benefit from such an update, so I leave it up to them.

@klonos klonos added this to the 1.8.0 milestone May 3, 2017
@jenlampton jenlampton changed the title [on-going task] Keep jQuery and jQuery UI up to date. [ongoing] Keep jQuery and jQuery UI up to date. May 18, 2017
@quicksketch
Copy link
Member

As we have dropped IE8 support, we could in theory upgrade to the latest jQuery (3.2.1 currently). Browser support listed here: http://jquery.com/browser-support/

But I think the bigger issue with upgrading to 3.x of jQuery is the deprecation of the .bind() method (preferring .on() instead). And there are many API changes listed in https://jquery.com/upgrade-guide/3.0/

I think upgrading to 3.x would be a Backdrop 2.x task, considering the scope of APIs changed there. However, I do think we should do our best to make Backdrop core jQuery 3.x compatible.

@quicksketch
Copy link
Member

quicksketch commented Aug 31, 2017

We can still do minor updates for 1.8:

jQuery: Already the latest version 1.12.4, but system_library() reports the version incorrectly as 1.11.0. (see #2826.)

jQuery UI: Currently on 1.11.2. Can be upgraded to 1.12.1.

@quicksketch
Copy link
Member

Upgrading jQuery UI to 1.12.1 looks like it's a doozy, and probably not suitable for 1.8.0 at this point. Drupal accomplished this but it requires a large amount of manual repacking and reorganization. Issue is at https://www.drupal.org/node/2809427. We could adopt their reorganization, or consider just combining all the libraries together as was suggested earlier in that issue, which will make for much easier maintenance in the future.

Filed an issue for fixing the version number of jQuery itself at #2826.

@jenlampton
Copy link
Member

Let's skip upgrading jQuery UI to 1.12.1 until we have time to thoroughly test it (bumping milestone to 1.9). I like the idea of easier maintenance in the future, so I'm all for combining all the libraries together.

@jenlampton jenlampton modified the milestones: 1.8.0, 1.9.0 Sep 14, 2017
@jenlampton jenlampton modified the milestones: 1.9.0, 1.10.0 Jan 15, 2018
@quicksketch
Copy link
Member

This issue wasn't updated when we last did a jQuery update, we are currently on 1.12.4 (the last 1.x version), per #1362.

Moving onto the 3.x version of jQuery (the current supported branch) is going to be a bit challenging. As it includes API breaks. I think we may need to do a combination of A) including the jQuery Migrate library for several releases and B) updating core's JS to not use any of the deprecated/removed functionality.

We could remove jQuery Migrate either by system.core.js and entirely in the 2.x version of Backdrop.

@quicksketch
Copy link
Member

I filed backdrop/backdrop#2175 to upgrade jQuery UI to the latest version. leveraging the Drupal patch this only required minor file renaming to get working. This will need much manual testing and review. Please try out the sandbox to check if everything works properly. Good candidates include CKEditor, Layout and Views UIs, and date elements.

@olafgrabienski
Copy link

olafgrabienski commented May 5, 2018

I've tested CKEditor and other places of the user interface manually without any problems. Afterwards I saw however a few related messages in the DBlog (see below). Here's what I did:

CKEditor

  • Configuration: Added buttons to the editor toolbar.
  • Added and edited a post.
  • Added and edited comments with different roles.

Layout UI

  • Added a custom block.
  • Moved another block.

Field UI

  • Changed the order of fields on one of the Manage Display pages.

Date elements

  • Added a date field to a content type and added a date to a post.

Views UI

  • Added a view.
  • Changed to the display of fields.
  • Rearranged the fields.

As I said, this worked without any problems. In the DBlog I saw however two jQuery related not found messages:

  • page not found: files/js/jquery.form.min.js.map
  • page not found: admin/structure/layouts/manage/jquery.form.min.js.map

(There were also a Theme hook "" not found message. I guess that's not related to jQuery but to the date field, not sure!)

@quicksketch
Copy link
Member

Thanks @olafgrabienski! That's very helpful. I filed a new issue for that jquery.form.min.map problem: #3090

@quicksketch
Copy link
Member

I've merged backdrop/backdrop#2175 into 1.x for 1.10. Thanks @olafgrabienski!

@quicksketch quicksketch modified the milestones: 1.10.0, 1.11.0 May 11, 2018
@klonos klonos changed the title [ongoing] Keep jQuery and jQuery UI up to date. [ongoing] Keep jQuery 1.x and jQuery UI 1.x up to date. May 13, 2018
@jenlampton jenlampton mentioned this issue May 15, 2018
21 tasks
@quicksketch
Copy link
Member

We're up-to-date on jQuery (1.x) and jQuery UI as of 1.11.0 release time. Updating to jQuery 3.x is still desirable but it would take some work to update our JS throughout core.

@klonos
Copy link
Member Author

klonos commented Dec 28, 2018

...bumping to 1.13.0, since no new versions of jQuery 1.x or jQuery UI have been released. Also removed the "has PR", "needs review" and "needs feedback" tags.

@klonos klonos modified the milestones: 1.13.0, ongoing Apr 30, 2019
@klonos klonos changed the title [ongoing] Keep jQuery 1.x and jQuery UI 1.x up to date. Keep jQuery 1.x and jQuery UI 1.x up to date. Apr 30, 2019
@indigoxela
Copy link
Member

This time I try it via issue, as the forum post wasn't the right thing.

My actual question is "hidden" in the last paragraph of that post:

I took a look at how jQuery UI gets pulled in, but didn't get far. Are there instructions regarding how that's done? Backdrop ships with individual compressed js files - which differ in naming from sources.

So, how does jQuery UI get pulled in? Is there a special build tool or helper script, I'm not aware of?

In Backdrop we have individual minified js files with filenames different from [jQuery UI sources, and in a different structure. How that?

@quicksketch do you remember how you did it back in 2018?

@jenlampton
Copy link
Member

Related: #5705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants