GitHub ditched jQuery

rhymes - Sep 8 '18 - - Dev Community

On the heels of this earlier discussion about JavaScript and progressive enhancement

I found it refreshing to read about the migration away from jQuery that GitHub successfully completed recently: Removing jQuery from GitHub.com frontend.

They did it incrementally for obvious reasons, leveraging modern browsers and (lots) of polyfills. It seems they haven't used Babel at all.

Two paragraphs of the article stuck with me the most:

As part of our refined approach to building frontend features on GitHub.com, we focused on getting away with regular HTML foundation as much as we could, and only adding JavaScript behaviors as progressive enhancement. As a result, even those web forms and other UI elements that were enhanced using JS would usually also work with JavaScript disabled in the browser. In some cases, we were able to delete certain legacy behaviors altogether instead of having to rewrite them in vanilla JS.

Our general philosophy of striving for progressive enhancement extends to custom elements as well. This means that we keep as much of the content in markup as possible and only add behaviors on top of that. For example, shows the raw timestamp by default and gets upgraded to translate the time to the local timezone, while , when nested in the element, is interactive even without JavaScript, but gets upgraded with accessibility enhancements.

Progressive enhancement is a concept at least ten years old and I'm glad more and more people are keeping it in mind.

On a side note I just noticed the feed on GitHub's homepage doesn't appear at all with JavaScript disabled :D

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player