{"action":"created","comment":{"url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments/25476731","id":25476731,"diff_hunk":"@@ -0,0 +1,95 @@\n+var d3 = require('d3');\n+var _ = require('lodash');\n+_.mixin(require('lodash-deep'));","path":"public/js/Histogram.js","position":3,"original_position":3,"commit_id":"c1da55681d452f4b18f7a11584bbe49e776ca068","original_commit_id":"c1da55681d452f4b18f7a11584bbe49e776ca068","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"body":"Hahaha.. the package that lodash is forked from is called 'underscore'. Lodash has since surpassed underscore in pretty much every way, but underscore gets to keep the sensible name. :P","created_at":"2015-02-26T23:38:07Z","updated_at":"2015-02-26T23:38:07Z","html_url":"https://github.com/microscopium/microscopium-ui/pull/34#discussion_r25476731","pull_request_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments/25476731"},"html":{"href":"https://github.com/microscopium/microscopium-ui/pull/34#discussion_r25476731"},"pull_request":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34","id":29956479,"html_url":"https://github.com/microscopium/microscopium-ui/pull/34","diff_url":"https://github.com/microscopium/microscopium-ui/pull/34.diff","patch_url":"https://github.com/microscopium/microscopium-ui/pull/34.patch","issue_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/34","number":34,"state":"open","locked":false,"title":"Add Browserify and re-write plot functions as objects","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"body":"Okay, this is a pretty significant PR.. but I think this takes the quality of the code from 'something hacked together by a noob who has no idea WTF' to something approaching quality. Happy to run through it in person if need be!\r\n\r\n* Plots have now been re-written as objects with methods for drawing and updating. This makes the plots much more modular and easier to understand, and when a filter is applied to the data we'll be able to update the bare minimum needed to reflect the new data. The old plots were 'draw once' type functions, so the whole plot needed to be re-drawn if the data changed. Another advantage to this approach is that plots can be re-usable, so we could say draw two lineplots to allow a user to compare feature distributions of two samples at once.\r\n\r\n* The 'active' feature selected in the lineplot stays the same even after you select a new sample from the PCA plot.\r\n\r\n* All JS files are now Browserified! Now that modules can now be imported with 'require' on the front-end, dependencies are now loaded in NPM instead of Bower where possible. Bower is used for libraries where there's CSS being imported (eg Bootstrap, Font-Awesome, Slidebars) or when we want the library to be global (eg jQuery and jQuery plugins). This means you HAVE to use grunt whenever you run the UI locally to make sure all the JS files get browserified first. Also remember to ``npm install && bower install`` if you run this locally too.\r\n\r\n* Lodash has been used whenever possible for array operations. Lodash usually outperforms Javascript for many operations.\r\n\r\nOnce this is merged, I can add methods to the plots that will update them whenever the Filter is updated.","created_at":"2015-02-25T02:30:14Z","updated_at":"2015-02-26T23:38:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ff70c57a031af9c397bec4c3b2d6d987bab15ab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34/commits","review_comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34/comments","review_comment_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/34/comments","statuses_url":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/c1da55681d452f4b18f7a11584bbe49e776ca068","head":{"label":"starcalibre:browserify-all-the-things","ref":"browserify-all-the-things","sha":"c1da55681d452f4b18f7a11584bbe49e776ca068","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"repo":{"id":29283595,"name":"microscopium-ui","full_name":"starcalibre/microscopium-ui","owner":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starcalibre/microscopium-ui","description":"Microscopium web interface.","fork":true,"url":"https://api.github.com/repos/starcalibre/microscopium-ui","forks_url":"https://api.github.com/repos/starcalibre/microscopium-ui/forks","keys_url":"https://api.github.com/repos/starcalibre/microscopium-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starcalibre/microscopium-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starcalibre/microscopium-ui/teams","hooks_url":"https://api.github.com/repos/starcalibre/microscopium-ui/hooks","issue_events_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues/events{/number}","events_url":"https://api.github.com/repos/starcalibre/microscopium-ui/events","assignees_url":"https://api.github.com/repos/starcalibre/microscopium-ui/assignees{/user}","branches_url":"https://api.github.com/repos/starcalibre/microscopium-ui/branches{/branch}","tags_url":"https://api.github.com/repos/starcalibre/microscopium-ui/tags","blobs_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starcalibre/microscopium-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/starcalibre/microscopium-ui/languages","stargazers_url":"https://api.github.com/repos/starcalibre/microscopium-ui/stargazers","contributors_url":"https://api.github.com/repos/starcalibre/microscopium-ui/contributors","subscribers_url":"https://api.github.com/repos/starcalibre/microscopium-ui/subscribers","subscription_url":"https://api.github.com/repos/starcalibre/microscopium-ui/subscription","commits_url":"https://api.github.com/repos/starcalibre/microscopium-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/starcalibre/microscopium-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/starcalibre/microscopium-ui/contents/{+path}","compare_url":"https://api.github.com/repos/starcalibre/microscopium-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starcalibre/microscopium-ui/merges","archive_url":"https://api.github.com/repos/starcalibre/microscopium-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starcalibre/microscopium-ui/downloads","issues_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues{/number}","pulls_url":"https://api.github.com/repos/starcalibre/microscopium-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/starcalibre/microscopium-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/starcalibre/microscopium-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starcalibre/microscopium-ui/labels{/name}","releases_url":"https://api.github.com/repos/starcalibre/microscopium-ui/releases{/id}","created_at":"2015-01-15T06:12:36Z","updated_at":"2015-01-29T07:06:19Z","pushed_at":"2015-02-25T05:44:09Z","git_url":"git://github.com/starcalibre/microscopium-ui.git","ssh_url":"git@github.com:starcalibre/microscopium-ui.git","clone_url":"https://github.com/starcalibre/microscopium-ui.git","svn_url":"https://github.com/starcalibre/microscopium-ui","homepage":null,"size":6155,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"microscopium:master","ref":"master","sha":"4897e60af821fa09a22d4a2027a1181fd073602c","user":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"repo":{"id":28170352,"name":"microscopium-ui","full_name":"microscopium/microscopium-ui","owner":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/microscopium/microscopium-ui","description":"Microscopium web interface.","fork":false,"url":"https://api.github.com/repos/microscopium/microscopium-ui","forks_url":"https://api.github.com/repos/microscopium/microscopium-ui/forks","keys_url":"https://api.github.com/repos/microscopium/microscopium-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/microscopium/microscopium-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/microscopium/microscopium-ui/teams","hooks_url":"https://api.github.com/repos/microscopium/microscopium-ui/hooks","issue_events_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/events{/number}","events_url":"https://api.github.com/repos/microscopium/microscopium-ui/events","assignees_url":"https://api.github.com/repos/microscopium/microscopium-ui/assignees{/user}","branches_url":"https://api.github.com/repos/microscopium/microscopium-ui/branches{/branch}","tags_url":"https://api.github.com/repos/microscopium/microscopium-ui/tags","blobs_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/microscopium/microscopium-ui/languages","stargazers_url":"https://api.github.com/repos/microscopium/microscopium-ui/stargazers","contributors_url":"https://api.github.com/repos/microscopium/microscopium-ui/contributors","subscribers_url":"https://api.github.com/repos/microscopium/microscopium-ui/subscribers","subscription_url":"https://api.github.com/repos/microscopium/microscopium-ui/subscription","commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/microscopium/microscopium-ui/contents/{+path}","compare_url":"https://api.github.com/repos/microscopium/microscopium-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/microscopium/microscopium-ui/merges","archive_url":"https://api.github.com/repos/microscopium/microscopium-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/microscopium/microscopium-ui/downloads","issues_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues{/number}","pulls_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/microscopium/microscopium-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/microscopium/microscopium-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/microscopium/microscopium-ui/labels{/name}","releases_url":"https://api.github.com/repos/microscopium/microscopium-ui/releases{/id}","created_at":"2014-12-18T05:52:59Z","updated_at":"2015-02-24T02:53:07Z","pushed_at":"2015-02-24T02:53:07Z","git_url":"git://github.com/microscopium/microscopium-ui.git","ssh_url":"git@github.com:microscopium/microscopium-ui.git","clone_url":"https://github.com/microscopium/microscopium-ui.git","svn_url":"https://github.com/microscopium/microscopium-ui","homepage":null,"size":6189,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34"},"html":{"href":"https://github.com/microscopium/microscopium-ui/pull/34"},"issue":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/issues/34"},"comments":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/c1da55681d452f4b18f7a11584bbe49e776ca068"}}}}