{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/58530564","id":58530564,"diff_hunk":"@@ -8,25 +8,17 @@\n       <p class=\"CDB-Text u-upperCase CDB-FontSize-small u-altTextColor u-bSpace--m\"><%- _t('editor.layers.analysis-form.reference-layer') %></p>\n       <div class=\"u-tSpace-xl CDB-Text\">\n         <p class=\"CDB-Legend u-upperCase u-iBlock CDB-Text is-semibold CDB-Size-small u-rSpace--m\"><%- _t('editor.layers.analysis-form.input') %></p>\n-        <div class=\"CDB-Text CDB-Size-medium u-iBlock\" data-editors=\"source_id\"></div>\n+        <div class=\"CDB-Text CDB-Size-medium u-iBlock\" data-editors=\"source\"></div>\n       </div>\n     </div>\n   </div>\n   <div class=\"CDB-HeaderInfo\">\n     <div class=\"CDB-HeaderNumeration CDB-Text is-semibold u-rSpace--m\">3</div>\n-    <div class=\"CDB-HeaderInfo-Inner CDB-Text\">\n+    <div class=\"CDB-HeaderInfo-Inner CDB-Text\" data-fields=\"kind,time\">","path":"lib/assets/javascripts/cartodb3/editor/layers/layer-content-views/analyses-form-types/trade-area/analysis-trade-area-form.tpl","position":12,"original_position":12,"commit_id":"d145506c3aed8ac79690bb82b94c02b6372f5e2c","original_commit_id":"d145506c3aed8ac79690bb82b94c02b6372f5e2c","user":{"login":"xavijam","id":132146,"avatar_url":"https://avatars.githubusercontent.com/u/132146?v=3","gravatar_id":"","url":"https://api.github.com/users/xavijam","html_url":"https://github.com/xavijam","followers_url":"https://api.github.com/users/xavijam/followers","following_url":"https://api.github.com/users/xavijam/following{/other_user}","gists_url":"https://api.github.com/users/xavijam/gists{/gist_id}","starred_url":"https://api.github.com/users/xavijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavijam/subscriptions","organizations_url":"https://api.github.com/users/xavijam/orgs","repos_url":"https://api.github.com/users/xavijam/repos","events_url":"https://api.github.com/users/xavijam/events{/privacy}","received_events_url":"https://api.github.com/users/xavijam/received_events","type":"User","site_admin":false},"body":"oh!","created_at":"2016-04-05T12:43:02Z","updated_at":"2016-04-05T12:43:02Z","html_url":"https://github.com/CartoDB/cartodb/pull/7031#discussion_r58530564","pull_request_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/58530564"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/7031#discussion_r58530564"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031","id":65172486,"html_url":"https://github.com/CartoDB/cartodb/pull/7031","diff_url":"https://github.com/CartoDB/cartodb/pull/7031.diff","patch_url":"https://github.com/CartoDB/cartodb/pull/7031.patch","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/7031","number":7031,"state":"open","locked":false,"title":"6886 point in polygon","user":{"login":"viddo","id":978461,"avatar_url":"https://avatars.githubusercontent.com/u/978461?v=3","gravatar_id":"","url":"https://api.github.com/users/viddo","html_url":"https://github.com/viddo","followers_url":"https://api.github.com/users/viddo/followers","following_url":"https://api.github.com/users/viddo/following{/other_user}","gists_url":"https://api.github.com/users/viddo/gists{/gist_id}","starred_url":"https://api.github.com/users/viddo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viddo/subscriptions","organizations_url":"https://api.github.com/users/viddo/orgs","repos_url":"https://api.github.com/users/viddo/repos","events_url":"https://api.github.com/users/viddo/events{/privacy}","received_events_url":"https://api.github.com/users/viddo/received_events","type":"User","site_admin":false},"body":"Closes #6886 (analysis modal), adds the point-on-polygon node type*\r\n\r\n- will create a failing issue initially, showing the user the analysis-form and indicating the source input that needs to be fixed. \r\n- user can select (another) layer as input source, or a raw table (creates a new source node)\r\n\r\nNoteworthy changes:\r\n- removed the `_id` suffix on source attributes, to remove some unnecessary code that doesn't really add any value\r\n- the tables+layer sources available varies depending on which source is considered secondary, can be either points or source depending on prev node, for which an additional editor-only param is set (`primary_source_name`) to indicate which one it is. the composite analysis node view needed to be changed to take this into account\r\n- since both tables and layer's source geometries need to be fetched async, I'm using d3-queue to coordinate the fetch state, to only render options once all fetches returned… ([`queue-async`](https://github.com/CartoDB/cartodb/blob/45410bc06e5023772d622f4cd3aee4c3cac6de89/package.json#L63) wḣich we already have was renamed to d3-queue, but considering the changes are quite big I didn't want to touch that one).\r\n- don't wait for server-side sync to create models, to avoid complicating cascading side-effects (might need to revisit this later)\r\n\r\nThis also depends on https://github.com/CartoDB/cartodb.js/issues/1216, since the initial node is created in incomplete state, and selecting the secondary source required to update the existing node. cc @alonsogarciapablo \r\n\r\n@xavijam can you review?\r\ncc @javierarce who I pair programmed with on the the first ~half of the commits","created_at":"2016-04-04T16:18:46Z","updated_at":"2016-04-05T12:43:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cb8553dd5a4a17a9a58d9be43394806225fe60e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031/commits","review_comments_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031/comments","review_comment_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/7031/comments","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/d145506c3aed8ac79690bb82b94c02b6372f5e2c","head":{"label":"CartoDB:6886-point-in-polygon","ref":"6886-point-in-polygon","sha":"d145506c3aed8ac79690bb82b94c02b6372f5e2c","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-04-05T02:09:46Z","pushed_at":"2016-04-05T12:29:35Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://cartodb.com","size":380429,"stargazers_count":1098,"watchers_count":1098,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":276,"mirror_url":null,"open_issues_count":868,"forks":276,"open_issues":868,"watchers":1098,"default_branch":"master"}},"base":{"label":"CartoDB:analysis","ref":"analysis","sha":"37ba9c845a584d725a791149d59fa02e9d6ba192","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-04-05T02:09:46Z","pushed_at":"2016-04-05T12:29:35Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://cartodb.com","size":380429,"stargazers_count":1098,"watchers_count":1098,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":276,"mirror_url":null,"open_issues_count":868,"forks":276,"open_issues":868,"watchers":1098,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/7031"},"issue":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/7031"},"comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/7031/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7031/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/cartodb/statuses/d145506c3aed8ac79690bb82b94c02b6372f5e2c"}}}}