{"action":"created","issue":{"url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/47","repository_url":"https://api.github.com/repos/humanmade/hm-pattern-library","labels_url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/47/comments","events_url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/47/events","html_url":"https://github.com/humanmade/hm-pattern-library/issues/47","id":163929805,"number":47,"title":"JS Dependencies - jQuery","user":{"login":"mattheu","id":494927,"avatar_url":"https://avatars.githubusercontent.com/u/494927?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheu","html_url":"https://github.com/mattheu","followers_url":"https://api.github.com/users/mattheu/followers","following_url":"https://api.github.com/users/mattheu/following{/other_user}","gists_url":"https://api.github.com/users/mattheu/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheu/subscriptions","organizations_url":"https://api.github.com/users/mattheu/orgs","repos_url":"https://api.github.com/users/mattheu/repos","events_url":"https://api.github.com/users/mattheu/events{/privacy}","received_events_url":"https://api.github.com/users/mattheu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/humanmade/hm-pattern-library/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-05T19:42:18Z","updated_at":"2016-07-06T10:38:35Z","closed_at":"2016-07-06T10:38:35Z","body":"@sambulance raised an interesting point over on https://github.com/humanmade/hm-pattern-library/pull/44. Do we depend on jQuery? I felt like this was a bigger discussion - don't want to derail that ticket.\r\n\r\nMy initial reaction was that I agreed. It's probably overkill for this single component. \r\n\r\nHowever I'm not 100% convinced. Other components may not be so easy to write without it. Furthermore, writing it can be a little frustrating to work around some of the issues and is possibly a little less readable/maintainable. Also jQuery handles some browser compatibility (eg using `classList` is IE10+)\r\n\r\nOn the one hand I'm keen to keep jQuery out of the pattern library itself. We may well want to use it independently of WP where jQuery isn't so ubiquitous and its nice to keep it really lean.\r\n\r\nOn the other, it's less than 40kb, and can be mroe readable, plus has some performance/compatability advantages. When we're loading 400kb of fonts it doesn't seem so bad.\r\n\r\nIf we drop it - what are the alternatives\r\n- [Zepto.js](http://zeptojs.com/) - a lighter weight (> 10kb) jQuery compatible lib. However [zurb foundation backed out of using it](http://zeptojs.com/) because it's not really compatible enough. Also they claim it isn't as performant as jQuery once loaded.\r\n- Something like ES2015 provides a bunch of methods that ease the frustration at not having jQuery. But would require a bunch of build tools to turn this into functional, browser compatible code.\r\n- jQuery - If you're not relying on the version bundled with WP you can build a custom version removing some unused modules to slim it down.\r\n\r\nRight now, I think we still have a small enough amount of JS to do away with the jQuery dependency. But we ultimately need to ship stuff, and I don't want this to become a barrier for the sake of 40kb.\r\n\r\nI'm pretty on the fence about this one, and would love to have some feedback.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/comments/230737988","html_url":"https://github.com/humanmade/hm-pattern-library/issues/47#issuecomment-230737988","issue_url":"https://api.github.com/repos/humanmade/hm-pattern-library/issues/47","id":230737988,"user":{"login":"mattheu","id":494927,"avatar_url":"https://avatars.githubusercontent.com/u/494927?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheu","html_url":"https://github.com/mattheu","followers_url":"https://api.github.com/users/mattheu/followers","following_url":"https://api.github.com/users/mattheu/following{/other_user}","gists_url":"https://api.github.com/users/mattheu/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheu/subscriptions","organizations_url":"https://api.github.com/users/mattheu/orgs","repos_url":"https://api.github.com/users/mattheu/repos","events_url":"https://api.github.com/users/mattheu/events{/privacy}","received_events_url":"https://api.github.com/users/mattheu/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T10:38:35Z","updated_at":"2016-07-06T10:38:35Z","body":"I'm going to close this ticket - great to get your thoughts on this!"}}
{"actor":{"display_login":"mattheu"}}