Upgrade jQuery Rails from 4.0.5 to 4.1.1
Upgrades jQuery to 1.12.1 and jquery-ujs to 1.2.1.
Changelogs:
- https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md
- https://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/
- https://github.com/rails/jquery-ujs/releases
cc: @rspeicher
Merge request reports
Activity
cc @jschatz1 as well
@connorshea Would probably be helpful to link the changelogs for those two libs as well. Thanks!
Added 1 commit:
- a153a1d6 - Upgrade jQuery Rails from 4.0.5 to 4.1.1
@rspeicher updated w/ Changelogs
@jschatz1 I'll leave this to you to determine if any of the jQuery changes would affect us. We're going from 1.11.3 to 1.12.1.
Reassigned to @jschatz1
Added gem update label
Sorry I don't understand why we aren't going to jQuery 2 since the point of jQuery 1 is to support older browsers which we do not support. @connorshea @rspeicher
@jschatz1
We're not going to jQuery 2 -- the gem just includes both. We requirejquery.js
which is 1.11.3 currently and 1.12.1 after this is merged.Totally misread that. Derp.
Edited by Robert Speicher@jschatz1 see #12440 (closed), there were errors when I tried updating to jQuery 2 a few months ago
And the jQuery Rails gem includes both 1.x and 2.x versions simultaneously, just depends on what you include in the
application.js
.@rspeicher smaller JS size by about ~20KB (without gzip) and therefore slightly faster parsing of the JS, since it drops support for older versions of IE.
Edited by username-removed-386624@rspeicher Smaller size. The point of jQuery 2 is to remove the fixes for IE 8 and older browsers which we do not use. Since we aren't supporting those browsers we might as well not support them through jQuery. Read this https://blog.jquery.com/2013/04/18/jquery-2-0-released/ but to copy paste the most important parts:
No more support for IE 6/7/8: Remember that this can also affect IE9 and even IE10 if they are used in their “Compatibility View” modes that emulate older versions. To prevent these newer IE versions from slipping back into prehistoric modes, we suggest you always use an X-UA-Compatible tag or HTTP header. If you can use the HTTP header it is slightly better for performance because it avoids a potential browser parser restart.
Reduced size: The final 2.0.0 file is 12 percent smaller than the 1.9.1 file, thanks to the elimination of patches that were only needed for IE 6, 7, and 8. We had hoped to remove even more code and increase performance, but older Android/WebKit 2.x browsers are now the weakest link. We’re carefully watching Android 2.x market share to determine when we can cross it off the support list, and don’t expect it to take very long.
@jschatz1 what browsers do we support? Is that documented anywhere?
@connorshea @rspeicher I'd say the move from 1.11 to 1.12 is not particularly worth it. It would be worth it to move from 1.11 to 2.x. Otherwise what do we gain? Everything currently works fine without 1.12. Of course we can do the upgrade and I am sure it's a good upgrade. So I guess we can go through with it. But I personally think stay with 1.11 or go to 2. Otherwise let's close this MR.
Edited by Jacob Schatz@jschatz1 we're going to want to upgrade the jquery-rails gem anyway since it also includes a newer version of the 2.x series, so I don't see why not.
@connorshea Let's wait till after the next release to do this. Although I am 99% sure it will be fine, there's that 1% of stuff it could affect and I don't want to take the risk this close to the release. After the release we should figure out how to get to 2.x. Anything to make GitLab faster.
@jschatz1 Good call.
Milestone changed to 8.8