GitHub PullRequestReviewCommentEvent at 2014-07-18 16:00:55
Repository: akobi
Actor: jivid
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jivid/akobi/pulls/comments/15118849","id":15118849,"diff_hunk":"@@ -89,28 +91,57 @@ define(function() {\n         }\n     });\n \n-    var CollabEditView = Backbone.View.extend({\n-        el: $('#collabedit').parent(),\n+    var CollabEditBox = React.createClass({\n+        render: function() {\n+            var classes = React.addons.classSet({\n+                'app': true,\n+                'container-full': true,\n+            });\n+            return (\n+                <div id=\"collabedit\" className={classes}>\n+                    # Welcome to the Akobi Collaborative Code Editor! Currently, we only\n+                    support Python syntax highlighting, but support for more languages will be added soon!\n+                </div>\n+            );\n+        }\n+    });\n+\n+    var CollabEditView = common.AkobiApplicationView.extend({\n \n         initialize: function() {\n             this.model = new CollabEditText();\n \n             this.captureInterval = setInterval(\n-                $.proxy(this.capture, this), 1000\n+                $.proxy(this.capture, this), 250\n             );\n             EventBus.on(\"socket_closed\", function() {\n                 clearInterval(this.captureInterval);\n             });\n \n             this.model.on('change:contents', function(event){\n-                this.$el.children('#collabedit').val(event.attributes.contents);\n+                cursor = this.editor.getCursorPosition();\n+                this.editor.session.setValue(event.attributes.contents, 1);\n+                this.editor.moveCursorToPosition(cursor);\n             }, this);\n+\n+            this.render();\n         },\n \n-        capture: function() {\n-            this.model.set({'contents' : this.$el.children('#collabedit').val()});\n+        render: function() {\n+            React.renderComponent(\n+                <CollabEditBox rows=\"4\" cols=\"50\" value={this.model.get('contents')} />, this.$el.get(0)\n+            );\n+            this.$el.addClass('container-med pull-right')","path":"static/js/src/collabedit.js","position":67,"original_position":67,"commit_id":"a9e4167ec1f010c8a39dd5c54d0188006206523d","original_commit_id":"57367d788eec31e6aca14a8ddc577eb7eefb570c","user":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"body":"no, because the classes on line 101 are applied to the actual collabedit div, where as these are applied to the parent div. moving these to line 101 won't lead to the same layout on the page","created_at":"2014-07-18T16:00:55Z","updated_at":"2014-07-18T16:00:55Z","html_url":"https://github.com/jivid/akobi/pull/85#discussion_r15118849","pull_request_url":"https://api.github.com/repos/jivid/akobi/pulls/85","_links":{"self":{"href":"https://api.github.com/repos/jivid/akobi/pulls/comments/15118849"},"html":{"href":"https://github.com/jivid/akobi/pull/85#discussion_r15118849"},"pull_request":{"href":"https://api.github.com/repos/jivid/akobi/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/jivid/akobi/pulls/85","id":18377879,"html_url":"https://github.com/jivid/akobi/pull/85","diff_url":"https://github.com/jivid/akobi/pull/85.diff","patch_url":"https://github.com/jivid/akobi/pull/85.patch","issue_url":"https://api.github.com/repos/jivid/akobi/issues/85","number":85,"state":"open","title":"UI Changes, Build Changes","user":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"body":"Ensure you have npm installed before you try to run this change. To get everything set up, run in your terminal:\r\n\r\n```shell\r\n$ <install npm>\r\n$ npm install -g react-tools\r\n$ npm install -g less\r\n$ pip install -r requirements.txt\r\n```\r\n\r\nA big change is how the application is installed now. Instead of creating a symlink and adding to your PYTHONPATH, you can now just run ```python setup.py install```and everything will be installed as expected. If you do this, make sure you remove all the symlinks and remove your PYTHONPATH to make sure there's no conflicts\r\n\r\nHave fun!","created_at":"2014-07-14T22:15:42Z","updated_at":"2014-07-18T16:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2edde78e89217b87321e8df6476d204a727d911","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jivid/akobi/pulls/85/commits","review_comments_url":"https://api.github.com/repos/jivid/akobi/pulls/85/comments","review_comment_url":"https://api.github.com/repos/jivid/akobi/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jivid/akobi/issues/85/comments","statuses_url":"https://api.github.com/repos/jivid/akobi/statuses/a9e4167ec1f010c8a39dd5c54d0188006206523d","head":{"label":"jivid:ui","ref":"ui","sha":"a9e4167ec1f010c8a39dd5c54d0188006206523d","user":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"repo":{"id":19532383,"name":"akobi","full_name":"jivid/akobi","owner":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jivid/akobi","description":"Akobi is a customizable interview application","fork":false,"url":"https://api.github.com/repos/jivid/akobi","forks_url":"https://api.github.com/repos/jivid/akobi/forks","keys_url":"https://api.github.com/repos/jivid/akobi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jivid/akobi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jivid/akobi/teams","hooks_url":"https://api.github.com/repos/jivid/akobi/hooks","issue_events_url":"https://api.github.com/repos/jivid/akobi/issues/events{/number}","events_url":"https://api.github.com/repos/jivid/akobi/events","assignees_url":"https://api.github.com/repos/jivid/akobi/assignees{/user}","branches_url":"https://api.github.com/repos/jivid/akobi/branches{/branch}","tags_url":"https://api.github.com/repos/jivid/akobi/tags","blobs_url":"https://api.github.com/repos/jivid/akobi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jivid/akobi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jivid/akobi/git/refs{/sha}","trees_url":"https://api.github.com/repos/jivid/akobi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jivid/akobi/statuses/{sha}","languages_url":"https://api.github.com/repos/jivid/akobi/languages","stargazers_url":"https://api.github.com/repos/jivid/akobi/stargazers","contributors_url":"https://api.github.com/repos/jivid/akobi/contributors","subscribers_url":"https://api.github.com/repos/jivid/akobi/subscribers","subscription_url":"https://api.github.com/repos/jivid/akobi/subscription","commits_url":"https://api.github.com/repos/jivid/akobi/commits{/sha}","git_commits_url":"https://api.github.com/repos/jivid/akobi/git/commits{/sha}","comments_url":"https://api.github.com/repos/jivid/akobi/comments{/number}","issue_comment_url":"https://api.github.com/repos/jivid/akobi/issues/comments/{number}","contents_url":"https://api.github.com/repos/jivid/akobi/contents/{+path}","compare_url":"https://api.github.com/repos/jivid/akobi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jivid/akobi/merges","archive_url":"https://api.github.com/repos/jivid/akobi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jivid/akobi/downloads","issues_url":"https://api.github.com/repos/jivid/akobi/issues{/number}","pulls_url":"https://api.github.com/repos/jivid/akobi/pulls{/number}","milestones_url":"https://api.github.com/repos/jivid/akobi/milestones{/number}","notifications_url":"https://api.github.com/repos/jivid/akobi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jivid/akobi/labels{/name}","releases_url":"https://api.github.com/repos/jivid/akobi/releases{/id}","created_at":"2014-05-07T11:44:48Z","updated_at":"2014-07-14T20:25:39Z","pushed_at":"2014-07-18T15:12:33Z","git_url":"git://github.com/jivid/akobi.git","ssh_url":"git@github.com:jivid/akobi.git","clone_url":"https://github.com/jivid/akobi.git","svn_url":"https://github.com/jivid/akobi","homepage":"","size":12078,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":5,"default_branch":"develop"}},"base":{"label":"jivid:develop","ref":"develop","sha":"95a2e231ed80f3816f43b39de13931180fa4897d","user":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"repo":{"id":19532383,"name":"akobi","full_name":"jivid/akobi","owner":{"login":"jivid","id":2600370,"avatar_url":"https://avatars.githubusercontent.com/u/2600370?","gravatar_id":"145ec616115d230123ec35918f88d40f","url":"https://api.github.com/users/jivid","html_url":"https://github.com/jivid","followers_url":"https://api.github.com/users/jivid/followers","following_url":"https://api.github.com/users/jivid/following{/other_user}","gists_url":"https://api.github.com/users/jivid/gists{/gist_id}","starred_url":"https://api.github.com/users/jivid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jivid/subscriptions","organizations_url":"https://api.github.com/users/jivid/orgs","repos_url":"https://api.github.com/users/jivid/repos","events_url":"https://api.github.com/users/jivid/events{/privacy}","received_events_url":"https://api.github.com/users/jivid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jivid/akobi","description":"Akobi is a customizable interview application","fork":false,"url":"https://api.github.com/repos/jivid/akobi","forks_url":"https://api.github.com/repos/jivid/akobi/forks","keys_url":"https://api.github.com/repos/jivid/akobi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jivid/akobi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jivid/akobi/teams","hooks_url":"https://api.github.com/repos/jivid/akobi/hooks","issue_events_url":"https://api.github.com/repos/jivid/akobi/issues/events{/number}","events_url":"https://api.github.com/repos/jivid/akobi/events","assignees_url":"https://api.github.com/repos/jivid/akobi/assignees{/user}","branches_url":"https://api.github.com/repos/jivid/akobi/branches{/branch}","tags_url":"https://api.github.com/repos/jivid/akobi/tags","blobs_url":"https://api.github.com/repos/jivid/akobi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jivid/akobi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jivid/akobi/git/refs{/sha}","trees_url":"https://api.github.com/repos/jivid/akobi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jivid/akobi/statuses/{sha}","languages_url":"https://api.github.com/repos/jivid/akobi/languages","stargazers_url":"https://api.github.com/repos/jivid/akobi/stargazers","contributors_url":"https://api.github.com/repos/jivid/akobi/contributors","subscribers_url":"https://api.github.com/repos/jivid/akobi/subscribers","subscription_url":"https://api.github.com/repos/jivid/akobi/subscription","commits_url":"https://api.github.com/repos/jivid/akobi/commits{/sha}","git_commits_url":"https://api.github.com/repos/jivid/akobi/git/commits{/sha}","comments_url":"https://api.github.com/repos/jivid/akobi/comments{/number}","issue_comment_url":"https://api.github.com/repos/jivid/akobi/issues/comments/{number}","contents_url":"https://api.github.com/repos/jivid/akobi/contents/{+path}","compare_url":"https://api.github.com/repos/jivid/akobi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jivid/akobi/merges","archive_url":"https://api.github.com/repos/jivid/akobi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jivid/akobi/downloads","issues_url":"https://api.github.com/repos/jivid/akobi/issues{/number}","pulls_url":"https://api.github.com/repos/jivid/akobi/pulls{/number}","milestones_url":"https://api.github.com/repos/jivid/akobi/milestones{/number}","notifications_url":"https://api.github.com/repos/jivid/akobi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jivid/akobi/labels{/name}","releases_url":"https://api.github.com/repos/jivid/akobi/releases{/id}","created_at":"2014-05-07T11:44:48Z","updated_at":"2014-07-14T20:25:39Z","pushed_at":"2014-07-18T15:12:33Z","git_url":"git://github.com/jivid/akobi.git","ssh_url":"git@github.com:jivid/akobi.git","clone_url":"https://github.com/jivid/akobi.git","svn_url":"https://github.com/jivid/akobi","homepage":"","size":12078,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jivid/akobi/pulls/85"},"html":{"href":"https://github.com/jivid/akobi/pull/85"},"issue":{"href":"https://api.github.com/repos/jivid/akobi/issues/85"},"comments":{"href":"https://api.github.com/repos/jivid/akobi/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/jivid/akobi/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/jivid/akobi/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jivid/akobi/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/jivid/akobi/statuses/a9e4167ec1f010c8a39dd5c54d0188006206523d"}}}}