ivirabyan / jquery-mentions

Adds mentioning support to your text fields.
http://ivirabyan.github.io/jquery-mentions/
MIT License
114 stars 49 forks source link

How is the code "much smaller"? #39

Closed egeriis closed 8 years ago

egeriis commented 8 years ago

Comparing podio/jquery-mentions with this library, there's a 3kb difference in the non-minified JS files. And for this library to work I need to include jQuery UI, which at minimum is 72kb.

As far as I see it, that's 97kb for this library to work, against podio/jquery-mentions, which is 28kb. That's more than three-fold.

I was really hoping that I'd found an improved library, as Podio's lib is barely maintained, but this is ridiculous. So I am curious if you plan to keep the jQuery UI dependency?

ivirabyan commented 8 years ago

You're right, this statement might not be true now, because support for contenteditable was added, which made code twice bigger. Podio's plugin implemented custom autocomplete widget, and it was buggy. I intentionally used existing solution for autocomplete, because it is well tested and customizable. Every tool must do it's own job. It may be a better idea to allow a user to use widget of his choice, but this would require additional work from the user. Anyway, I'm open for suggestions.