{"action":"created","comment":{"url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/comments/204067424","pull_request_review_id":139085742,"id":204067424,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDA2NzQyNA==","diff_hunk":"@@ -1,26 +1,52 @@\n import Mn from 'backbone.marionette';\n+import React from 'react';\n+import ReactDOM from 'react-dom';\n import Template from './template.hbs';\n+import SurveyCollection from './list/collection';\n import ListView from './list/view';\n import AddView from './add/view';\n import storage from './storage';\n+import MapWrapper from '../components/map/mapWrapper';\n \n export default Mn.View.extend({\n   template: Template,\n   regions: {\n     surveysContent: '#surveys-content'\n   },\n   initialize(app) {\n-    this.app = app.app\n+    this.app = app.app;\n+    this.collection = new SurveyCollection();\n+    this.getSurveys();","path":"src/app/surveys/view.js","position":20,"original_position":20,"commit_id":"d48d11c793e50df746a65fddc6517dd480929bd0","original_commit_id":"d48d11c793e50df746a65fddc6517dd480929bd0","user":{"login":"rodrigojv","id":17142306,"node_id":"MDQ6VXNlcjE3MTQyMzA2","avatar_url":"https://avatars2.githubusercontent.com/u/17142306?v=4","gravatar_id":"","url":"https://api.github.com/users/rodrigojv","html_url":"https://github.com/rodrigojv","followers_url":"https://api.github.com/users/rodrigojv/followers","following_url":"https://api.github.com/users/rodrigojv/following{/other_user}","gists_url":"https://api.github.com/users/rodrigojv/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigojv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigojv/subscriptions","organizations_url":"https://api.github.com/users/rodrigojv/orgs","repos_url":"https://api.github.com/users/rodrigojv/repos","events_url":"https://api.github.com/users/rodrigojv/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigojv/received_events","type":"User","site_admin":false},"body":"@IvaKop one possible issue I see here is that the render method will be called twice, because of the `then(self.render)` in `getSurveys`. So the behaviour would be:\r\n1) The view gets initialized, `getSurveys` is called to fetch the surveys asynchronously\r\n2) The view gets render inmediately after that and onRender is called, thus renderMap is called. At this point we may not have surveys to show yet.\r\n3) getSurveys finished executing and render->onRender is called again. We have data to show at this point.\r\n\r\nSo, here is my change proposal:\r\n1) maybe we can move `getSurveys` to onRender\r\n2) call `then(self.renderMap)` instead of self.render\r\n\r\nWhat do you think?","created_at":"2018-07-20T14:42:09Z","updated_at":"2018-07-20T14:49:15Z","html_url":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210#discussion_r204067424","pull_request_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/comments/204067424"},"html":{"href":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210#discussion_r204067424"},"pull_request":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210","id":202610931,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNjEwOTMx","html_url":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210","diff_url":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210.diff","patch_url":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210.patch","issue_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/210","number":210,"state":"open","locked":false,"title":"Implement map and fetch survey indicators","user":{"login":"IvaKop","id":25869467,"node_id":"MDQ6VXNlcjI1ODY5NDY3","avatar_url":"https://avatars2.githubusercontent.com/u/25869467?v=4","gravatar_id":"","url":"https://api.github.com/users/IvaKop","html_url":"https://github.com/IvaKop","followers_url":"https://api.github.com/users/IvaKop/followers","following_url":"https://api.github.com/users/IvaKop/following{/other_user}","gists_url":"https://api.github.com/users/IvaKop/gists{/gist_id}","starred_url":"https://api.github.com/users/IvaKop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvaKop/subscriptions","organizations_url":"https://api.github.com/users/IvaKop/orgs","repos_url":"https://api.github.com/users/IvaKop/repos","events_url":"https://api.github.com/users/IvaKop/events{/privacy}","received_events_url":"https://api.github.com/users/IvaKop/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-19T16:07:39Z","updated_at":"2018-07-20T14:49:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea28e9b890ac43e6ed72e2805d5f8a00927adc68","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210/commits","review_comments_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210/comments","review_comment_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/210/comments","statuses_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/statuses/d48d11c793e50df746a65fddc6517dd480929bd0","head":{"label":"IvaKop:map","ref":"map","sha":"d48d11c793e50df746a65fddc6517dd480929bd0","user":{"login":"IvaKop","id":25869467,"node_id":"MDQ6VXNlcjI1ODY5NDY3","avatar_url":"https://avatars2.githubusercontent.com/u/25869467?v=4","gravatar_id":"","url":"https://api.github.com/users/IvaKop","html_url":"https://github.com/IvaKop","followers_url":"https://api.github.com/users/IvaKop/followers","following_url":"https://api.github.com/users/IvaKop/following{/other_user}","gists_url":"https://api.github.com/users/IvaKop/gists{/gist_id}","starred_url":"https://api.github.com/users/IvaKop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvaKop/subscriptions","organizations_url":"https://api.github.com/users/IvaKop/orgs","repos_url":"https://api.github.com/users/IvaKop/repos","events_url":"https://api.github.com/users/IvaKop/events{/privacy}","received_events_url":"https://api.github.com/users/IvaKop/received_events","type":"User","site_admin":false},"repo":{"id":141595613,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1OTU2MTM=","name":"fp-psp-frontend","full_name":"IvaKop/fp-psp-frontend","owner":{"login":"IvaKop","id":25869467,"node_id":"MDQ6VXNlcjI1ODY5NDY3","avatar_url":"https://avatars2.githubusercontent.com/u/25869467?v=4","gravatar_id":"","url":"https://api.github.com/users/IvaKop","html_url":"https://github.com/IvaKop","followers_url":"https://api.github.com/users/IvaKop/followers","following_url":"https://api.github.com/users/IvaKop/following{/other_user}","gists_url":"https://api.github.com/users/IvaKop/gists{/gist_id}","starred_url":"https://api.github.com/users/IvaKop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvaKop/subscriptions","organizations_url":"https://api.github.com/users/IvaKop/orgs","repos_url":"https://api.github.com/users/IvaKop/repos","events_url":"https://api.github.com/users/IvaKop/events{/privacy}","received_events_url":"https://api.github.com/users/IvaKop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IvaKop/fp-psp-frontend","description":"Single Page Application working as a web client for https://github.com/FundacionParaguaya/FP-PSP-SERVER","fork":true,"url":"https://api.github.com/repos/IvaKop/fp-psp-frontend","forks_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/forks","keys_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/teams","hooks_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/hooks","issue_events_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/events","assignees_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/tags","blobs_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/languages","stargazers_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/stargazers","contributors_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/contributors","subscribers_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/subscribers","subscription_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/subscription","commits_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/merges","archive_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/downloads","issues_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/labels{/name}","releases_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/IvaKop/fp-psp-frontend/deployments","created_at":"2018-07-19T15:04:23Z","updated_at":"2018-07-19T15:04:26Z","pushed_at":"2018-07-19T19:41:08Z","git_url":"git://github.com/IvaKop/fp-psp-frontend.git","ssh_url":"git@github.com:IvaKop/fp-psp-frontend.git","clone_url":"https://github.com/IvaKop/fp-psp-frontend.git","svn_url":"https://github.com/IvaKop/fp-psp-frontend","homepage":"","size":8703,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"FundacionParaguaya:develop","ref":"develop","sha":"44f4f090ee137382cfe9bf144d8ce3ed4b396244","user":{"login":"FundacionParaguaya","id":30843927,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODQzOTI3","avatar_url":"https://avatars3.githubusercontent.com/u/30843927?v=4","gravatar_id":"","url":"https://api.github.com/users/FundacionParaguaya","html_url":"https://github.com/FundacionParaguaya","followers_url":"https://api.github.com/users/FundacionParaguaya/followers","following_url":"https://api.github.com/users/FundacionParaguaya/following{/other_user}","gists_url":"https://api.github.com/users/FundacionParaguaya/gists{/gist_id}","starred_url":"https://api.github.com/users/FundacionParaguaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundacionParaguaya/subscriptions","organizations_url":"https://api.github.com/users/FundacionParaguaya/orgs","repos_url":"https://api.github.com/users/FundacionParaguaya/repos","events_url":"https://api.github.com/users/FundacionParaguaya/events{/privacy}","received_events_url":"https://api.github.com/users/FundacionParaguaya/received_events","type":"Organization","site_admin":false},"repo":{"id":101509695,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE1MDk2OTU=","name":"fp-psp-frontend","full_name":"FundacionParaguaya/fp-psp-frontend","owner":{"login":"FundacionParaguaya","id":30843927,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODQzOTI3","avatar_url":"https://avatars3.githubusercontent.com/u/30843927?v=4","gravatar_id":"","url":"https://api.github.com/users/FundacionParaguaya","html_url":"https://github.com/FundacionParaguaya","followers_url":"https://api.github.com/users/FundacionParaguaya/followers","following_url":"https://api.github.com/users/FundacionParaguaya/following{/other_user}","gists_url":"https://api.github.com/users/FundacionParaguaya/gists{/gist_id}","starred_url":"https://api.github.com/users/FundacionParaguaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundacionParaguaya/subscriptions","organizations_url":"https://api.github.com/users/FundacionParaguaya/orgs","repos_url":"https://api.github.com/users/FundacionParaguaya/repos","events_url":"https://api.github.com/users/FundacionParaguaya/events{/privacy}","received_events_url":"https://api.github.com/users/FundacionParaguaya/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FundacionParaguaya/fp-psp-frontend","description":"Single Page Application working as a web client for https://github.com/FundacionParaguaya/FP-PSP-SERVER","fork":false,"url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend","forks_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/forks","keys_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/teams","hooks_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/hooks","issue_events_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/events","assignees_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/tags","blobs_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/languages","stargazers_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/stargazers","contributors_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/contributors","subscribers_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/subscribers","subscription_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/subscription","commits_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/merges","archive_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/downloads","issues_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/labels{/name}","releases_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/deployments","created_at":"2017-08-26T19:53:55Z","updated_at":"2018-07-20T14:10:09Z","pushed_at":"2018-07-20T14:10:07Z","git_url":"git://github.com/FundacionParaguaya/fp-psp-frontend.git","ssh_url":"git@github.com:FundacionParaguaya/fp-psp-frontend.git","clone_url":"https://github.com/FundacionParaguaya/fp-psp-frontend.git","svn_url":"https://github.com/FundacionParaguaya/fp-psp-frontend","homepage":"","size":8669,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":14,"open_issues":5,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210"},"html":{"href":"https://github.com/FundacionParaguaya/fp-psp-frontend/pull/210"},"issue":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/210"},"comments":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/FundacionParaguaya/fp-psp-frontend/statuses/d48d11c793e50df746a65fddc6517dd480929bd0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rodrigojv"}}