{"action":"created","comment":{"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments/74992124","id":74992124,"diff_hunk":"@@ -29,12 +31,21 @@ export default React.createClass({\n \n   getInitialState(){\n     return ({\n-      questions: allQuestions,","path":"ui/src/message_popup/author/questions_page.jsx","position":13,"original_position":13,"commit_id":"e5d1368c7dc577f218ca678966c0a744ee2c96e4","original_commit_id":"e5d1368c7dc577f218ca678966c0a744ee2c96e4","user":{"login":"kevinrobinson","id":1056957,"avatar_url":"https://avatars.githubusercontent.com/u/1056957?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinrobinson","html_url":"https://github.com/kevinrobinson","followers_url":"https://api.github.com/users/kevinrobinson/followers","following_url":"https://api.github.com/users/kevinrobinson/following{/other_user}","gists_url":"https://api.github.com/users/kevinrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinrobinson/subscriptions","organizations_url":"https://api.github.com/users/kevinrobinson/orgs","repos_url":"https://api.github.com/users/kevinrobinson/repos","events_url":"https://api.github.com/users/kevinrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/kevinrobinson/received_events","type":"User","site_admin":false},"body":"Same questions as elsewhere about loading the questions data.","created_at":"2016-08-16T18:25:32Z","updated_at":"2016-08-16T18:25:32Z","html_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118#discussion_r74992124","pull_request_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments/74992124"},"html":{"href":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118#discussion_r74992124"},"pull_request":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118","id":80845333,"html_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118","diff_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118.diff","patch_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118.patch","issue_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/118","number":118,"state":"open","locked":false,"title":"Setting up Question Authoring with the database","user":{"login":"david-rosales","id":1490352,"avatar_url":"https://avatars.githubusercontent.com/u/1490352?v=3","gravatar_id":"","url":"https://api.github.com/users/david-rosales","html_url":"https://github.com/david-rosales","followers_url":"https://api.github.com/users/david-rosales/followers","following_url":"https://api.github.com/users/david-rosales/following{/other_user}","gists_url":"https://api.github.com/users/david-rosales/gists{/gist_id}","starred_url":"https://api.github.com/users/david-rosales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-rosales/subscriptions","organizations_url":"https://api.github.com/users/david-rosales/orgs","repos_url":"https://api.github.com/users/david-rosales/repos","events_url":"https://api.github.com/users/david-rosales/events{/privacy}","received_events_url":"https://api.github.com/users/david-rosales/received_events","type":"User","site_admin":false},"body":"I started implementing the usage of the database endpoints in the Question Authoring. Merging this will effectively hide all currently listed questions as it should take its data strictly from the database when available. \r\n\r\nOne issue I ran into and have made a temporary solution for is that the `QuestionPage` component that gets rendered into the `EditQuestionPage` component must be rendered only when the `originalQuestion` is ready to be passed in. Otherwise, the `getInitialState` of `QuestionPage` will treat the question, even if coming from `EditQuestionPage`, as a new page because the `originalQuestion` is still not set and seen as `undefined`. To fix this, I just rendered the `QuestionPage` once `originalQuestion` was no longer `undefined`. Interestingly, when I did this, `Api.questionsQuery().end(this.onQuestionsReceived);` was no longer running even though `componentDidMount` ran perfectly fine. For now, since I mainly want to test the database endpoints I just passed in a prop will `allQuestions` which gets calculated anyways in `EditQuestionPage`. Later, I think we should look into why this was happening. The `questionsQuery` calls were still left in `QuestionPage` because it was still needed as a new question would not be able to pass in the `allQuestions` prop.\r\n\r\nAs I mentioned, I mainly want to test the database endpoints first to make sure they are working and that questions could be created, editing, and deleted (archived).","created_at":"2016-08-10T18:40:05Z","updated_at":"2016-08-16T18:25:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f72ffe45d41f6f29a82800ad081d72b33c1573c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118/commits","review_comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118/comments","review_comment_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/118/comments","statuses_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/e5d1368c7dc577f218ca678966c0a744ee2c96e4","head":{"label":"david-rosales:feature/databse-question-authoring","ref":"feature/databse-question-authoring","sha":"e5d1368c7dc577f218ca678966c0a744ee2c96e4","user":{"login":"david-rosales","id":1490352,"avatar_url":"https://avatars.githubusercontent.com/u/1490352?v=3","gravatar_id":"","url":"https://api.github.com/users/david-rosales","html_url":"https://github.com/david-rosales","followers_url":"https://api.github.com/users/david-rosales/followers","following_url":"https://api.github.com/users/david-rosales/following{/other_user}","gists_url":"https://api.github.com/users/david-rosales/gists{/gist_id}","starred_url":"https://api.github.com/users/david-rosales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-rosales/subscriptions","organizations_url":"https://api.github.com/users/david-rosales/orgs","repos_url":"https://api.github.com/users/david-rosales/repos","events_url":"https://api.github.com/users/david-rosales/events{/privacy}","received_events_url":"https://api.github.com/users/david-rosales/received_events","type":"User","site_admin":false},"repo":{"id":61657160,"name":"threeflows","full_name":"david-rosales/threeflows","owner":{"login":"david-rosales","id":1490352,"avatar_url":"https://avatars.githubusercontent.com/u/1490352?v=3","gravatar_id":"","url":"https://api.github.com/users/david-rosales","html_url":"https://github.com/david-rosales","followers_url":"https://api.github.com/users/david-rosales/followers","following_url":"https://api.github.com/users/david-rosales/following{/other_user}","gists_url":"https://api.github.com/users/david-rosales/gists{/gist_id}","starred_url":"https://api.github.com/users/david-rosales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-rosales/subscriptions","organizations_url":"https://api.github.com/users/david-rosales/orgs","repos_url":"https://api.github.com/users/david-rosales/repos","events_url":"https://api.github.com/users/david-rosales/events{/privacy}","received_events_url":"https://api.github.com/users/david-rosales/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david-rosales/threeflows","description":"Design sketch of flows","fork":true,"url":"https://api.github.com/repos/david-rosales/threeflows","forks_url":"https://api.github.com/repos/david-rosales/threeflows/forks","keys_url":"https://api.github.com/repos/david-rosales/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david-rosales/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david-rosales/threeflows/teams","hooks_url":"https://api.github.com/repos/david-rosales/threeflows/hooks","issue_events_url":"https://api.github.com/repos/david-rosales/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/david-rosales/threeflows/events","assignees_url":"https://api.github.com/repos/david-rosales/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/david-rosales/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/david-rosales/threeflows/tags","blobs_url":"https://api.github.com/repos/david-rosales/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david-rosales/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david-rosales/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/david-rosales/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david-rosales/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/david-rosales/threeflows/languages","stargazers_url":"https://api.github.com/repos/david-rosales/threeflows/stargazers","contributors_url":"https://api.github.com/repos/david-rosales/threeflows/contributors","subscribers_url":"https://api.github.com/repos/david-rosales/threeflows/subscribers","subscription_url":"https://api.github.com/repos/david-rosales/threeflows/subscription","commits_url":"https://api.github.com/repos/david-rosales/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/david-rosales/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/david-rosales/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/david-rosales/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/david-rosales/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/david-rosales/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david-rosales/threeflows/merges","archive_url":"https://api.github.com/repos/david-rosales/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david-rosales/threeflows/downloads","issues_url":"https://api.github.com/repos/david-rosales/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/david-rosales/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/david-rosales/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/david-rosales/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david-rosales/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/david-rosales/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/david-rosales/threeflows/deployments","created_at":"2016-06-21T18:27:41Z","updated_at":"2016-06-21T18:27:43Z","pushed_at":"2016-08-16T18:08:40Z","git_url":"git://github.com/david-rosales/threeflows.git","ssh_url":"git@github.com:david-rosales/threeflows.git","clone_url":"https://github.com/david-rosales/threeflows.git","svn_url":"https://github.com/david-rosales/threeflows","homepage":null,"size":969,"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":"mit-teaching-systems-lab:master","ref":"master","sha":"1158aab9648efa36290c59015aa4e81097699b8d","user":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars.githubusercontent.com/u/19670919?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":61143637,"name":"threeflows","full_name":"mit-teaching-systems-lab/threeflows","owner":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars.githubusercontent.com/u/19670919?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mit-teaching-systems-lab/threeflows","description":"Design sketch of flows","fork":false,"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows","forks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/forks","keys_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/teams","hooks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/hooks","issue_events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/events","assignees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/tags","blobs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/languages","stargazers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/stargazers","contributors_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contributors","subscribers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscribers","subscription_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscription","commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/merges","archive_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/downloads","issues_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/deployments","created_at":"2016-06-14T17:49:59Z","updated_at":"2016-06-14T20:25:26Z","pushed_at":"2016-08-16T18:01:14Z","git_url":"git://github.com/mit-teaching-systems-lab/threeflows.git","ssh_url":"git@github.com:mit-teaching-systems-lab/threeflows.git","clone_url":"https://github.com/mit-teaching-systems-lab/threeflows.git","svn_url":"https://github.com/mit-teaching-systems-lab/threeflows","homepage":null,"size":1003,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118"},"html":{"href":"https://github.com/mit-teaching-systems-lab/threeflows/pull/118"},"issue":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/118"},"comments":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/e5d1368c7dc577f218ca678966c0a744ee2c96e4"}}}}
{"actor":{"display_login":"kevinrobinson"}}