artursapek / mondrian

Web-based vector graphics editor
MIT License
1.24k stars 104 forks source link

Update to latest jQuery 2.x or Zepto (or drop it completely) #14

Closed fbender closed 10 years ago

fbender commented 10 years ago

Your jQuery version is severly outdated, the current line is 1.11 or 2.1. This leads to at least one issue, I got this message in the command line (roughly translated):

12:56:00.209 getPreventDefault() should not be used anymore. Please use defaultPrevented instead. jquery-1.7.2.min.js:3

Though this may also result in more errors, mostly interoperability issues. Generally, you should switch to the 2.x line because it's more optimized (it dropped support for very old browsers) thus faster and smaller.

However, you should consider switching to zepto.js (which is mostly interoperable with jQuery) and only include the scripts you really need, that will increase performance even more.

I haven't looked at the code yet, however I suspect that you might be able to drop any library alltogether without too much effort, and at most use microlibraries for specific tasks (like key handling) and use other native APIs directly. Though that's probably a bigger task, and upgrading the library version should be a good first step. :)

artursapek commented 10 years ago

I want to drop it completely. I don't really take advantage of it.

Part of the way into this project I started making an effort to use native APIs whenever I could, so removing it shouldn't be too hard. In the short term I'll upgrade to 1.11 on a branch and see if it breaks anything.

Fishrock123 commented 10 years ago

:+1:

artursapek commented 10 years ago

Closed in 89f5a2f92404e660b5f41e875c218aa6a8a66b5d

waldyrious commented 10 years ago

Is the "dropping it completely" goal tracked in an issue? If not, one should be opened.

artursapek commented 10 years ago

Yes, it is. Good point.

artursapek commented 10 years ago

27 opened to address this. Still deciding if dropping it completely is a good idea. It doesn't seem like a good use of dev time.

For now it's an open question.