Removing jQuery from GitHub.com front end
11–20 of 26 posts
Re: Removing jQuery from GitHub.com front end
#12> Having static type checking helped us have greater confidence around those refactorings Does Github use TypeScript?
> Finally, we wanted to start annotating types with Flow to perform static type checking at build time, and we concluded that the chaining syntax doesn’t lend itself well to static analysis, since almost every result of a jQuery method call is of the same type. We chose Flow over alternatives because, at the time, features such as @flow weak mode allowed us to progressively and efficiently start applying types to a c…
Re: Removing jQuery from GitHub.com front end
#13My concern, also when building UI with React, is that web design is often only interested in end-state of an interface, playing a bunch of fire-and-forget animations to transition between states.
The reality, that only games and Apple seem to have embraced, is that it's far more sophisticated for animation to reflect a state that can change at 60 or even 120 frames per second, depending on what the user is doing.
This is a great presentation from Apple, Designing Fluid Interfaces, that captures the concept: https://developer.apple.com/videos/play/wwdc2018/803/
Am curious: have any web frameworks embraced this approach?
Re: Removing jQuery from GitHub.com front end
#14Re: Removing jQuery from GitHub.com front end
#15Re: Removing jQuery from GitHub.com front end
#16The transition to CSS transitions seems primitive to me. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animati... makes it sound very much like a fire-and-forget approach. My concern, also when building UI with React, is that web design is often only interested in end-state of an interface, playing a bunch of fire-and-forget animations to transition between states. The reality, that only games and Apple seem t…
The gestures and animations in that video are a million miles away from the best I’ve seen on the web.
Re: Removing jQuery from GitHub.com front end
#17Re: Removing jQuery from GitHub.com front end
#18I don't use jQuery anymore, but damn do I miss the simplicity of fadeIn() and fadeOut(). Trying to do the same with CSS transitions is much more complicated and brittle.
Re: Removing jQuery from GitHub.com front end
#19> Set up metrics that tracked ratio of jQuery calls used per overall line of code and monitored that graph over time to make sure that it’s either staying constant or going down, not up. Would love to know how this was done.
I would think you could wrap $ or jQuery or whatever in a hook for metrics.
I think the more concerning call would actually be some crazy selector, animation, and implicit state change which could be done in just a few calls that happen rarely.
With this in mind I think the right metric is #call-sites and not #calls: most of the time the effort required to refactor a jquery call away is not proportional to the number of times the function is called.