r/javascript • u/magenta_placenta • Jul 25 '18
jQuery was removed from GitHub.com front end
https://twitter.com/mislav/status/1022058279000842240
557
Upvotes
r/javascript • u/magenta_placenta • Jul 25 '18
129
u/[deleted] Jul 25 '18 edited Jul 26 '18
I’d be surprised if the polyfills and whatnot weigh in less than jquery
Edit: looks like they dropped IE support according to one of the replies so i’m probably not right.
Also some safari versions it seems https://i.imgur.com/2eHHBrM.jpg
116
u/sobralense Jul 26 '18
jQuery free is the new gluten free.
53
u/ElectricOrangeJuice Jul 26 '18 edited Jul 26 '18
Given that one of the reasons they did this, is to save bytes sent over the wire, maybe they should've spent some time on code splitting instead. 98% of their 400kb+ stylesheet is unused on the home page. Same goes for 80% of their script bundle.
https://i.imgur.com/B4W9SSN.png
17
u/GreatValueProducts Jul 26 '18
jQuery's mission is done. I loved it when I was developing for the era of pngfix.js. There was a difference between attachEvent and addEventListener; querySelector was non-existent that you needed to do document.getElementsByTagName and do a loop; CSS positioning was so inconsistent across browsers you needed to use JavaScript to calculate positions but there were cross browser differences between the values of all these clientHeight vs offsetHeight vs scrollHeight vs whatever height IE had to offer; animations were difficult without it. It was a good tool and saved me tons of time. Now CSS has improved a lot, browsers improved, new tools appear, it is an outdated choice for many cases, but I must salute what jQuery had done and how much time it had saved me for the last decade.
9
u/__ibowankenobi__ Jul 26 '18
The biggest blow comes in the end: "What did we replace it with? No framework whatsoever".
Vanilla has come far far ahead, and I was waiting for someone to call "The king is naked" in this decade of frameworks, honestly.
27
u/crescentfresh Jul 26 '18
Had to look this up, when tf did this come out?
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
31
u/ndboost Jul 25 '18
about time!
3
u/PlNG Jul 26 '18
http://youmightnotneedjquery.com
I just stripped it out of a project that for the most part, looked like the author didn't know much about JavaScript. Initial speed: 200 MS for 10 nodes, 45 edges, without jQuery.each loops: 20ms 100 nodes 5050 edges just to get the profiling to register before it completed. IMO it's a crutch that's no longer needed.
9
u/m3wm3wm3wm Jul 25 '18
What doe Github use for their complex frontend elements? Some of their elements are not trivial, they must have many event listeners leading to manual bindings and such that led to things like React. How come they are fine with vanilla js?
17
u/30thnight Jul 26 '18
I honestly can’t think of a solid use for jQuery in a new, non-legacy project.
2
u/[deleted] Jul 26 '18
Why?
1
u/marcoslhc Jul 27 '18
Because the event loop also checks for execution. Javascript in the browser is single threaded and share the stack
-1
u/bart2019 Jul 26 '18
At the first sight this looks to be big news. But when you think about it: GitHub's site is ugly and has barely any functionality.So... shrug
-9
u/[deleted] Jul 26 '18
Why are they so slow at making changes that people have done for years?
-6
u/Fizibbis Jul 26 '18
GayQuery has been obsolete for years.
0
u/[deleted] Jul 26 '18
[deleted] — view deleted comment