{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/178063057","pull_request_review_id":108056426,"id":178063057,"diff_hunk":"@@ -70,20 +73,33 @@ class CircleBucket<Layer: CircleStyleLayer | HeatmapStyleLayer> implements Bucke\n         for (const {feature, index, sourceLayerIndex} of features) {\n             if (this.layers[0]._featureFilter({zoom: this.zoom}, feature)) {\n                 const geometry = loadGeometry(feature);\n-                this.addFeature(feature, geometry);\n+                this.addFeature(feature, geometry, index);\n                 options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n             }\n         }\n     }\n \n+    update(states: FeatureStates, vtLayer: VectorTileLayer) {\n+        if (!this.stateDependentLayers.length) return;\n+        this.changed = this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers);","path":"src/data/bucket/circle_bucket.js","position":37,"original_position":37,"commit_id":"8eeadc0cd86a60ecd5e83fe2870880f7e49aff33","original_commit_id":"d1cd5590df530b81005412f7ddfe2005e69515dd","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars3.githubusercontent.com/u/4974151?v=4","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"body":"> If we follow that idea, the correct place to track changes would be in the individual ProgramConfiguration's\r\n\r\nWe can put a `dirty` property on `ProgramConfigurationSet`, which is set during `updatePaintArrays`, checked in `upload()` to decide whether to actually do work (and then cleared).  I suppose it might not be simpler per se, but it has the advantage of localizing and centralizing this state tracking in `program_configuration.js`, rather than having it replicated in each bucket.","created_at":"2018-03-29T13:55:06Z","updated_at":"2018-03-29T13:55:07Z","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/6263#discussion_r178063057","pull_request_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/178063057"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/6263#discussion_r178063057"},"pull_request":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263"}},"in_reply_to_id":177253409},"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263","id":172404292,"html_url":"https://github.com/mapbox/mapbox-gl-js/pull/6263","diff_url":"https://github.com/mapbox/mapbox-gl-js/pull/6263.diff","patch_url":"https://github.com/mapbox/mapbox-gl-js/pull/6263.patch","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6263","number":6263,"state":"open","locked":false,"title":"[wip] Arbitrary states for feature interactivity","user":{"login":"asheemmamoowala","id":11619675,"avatar_url":"https://avatars2.githubusercontent.com/u/11619675?v=4","gravatar_id":"","url":"https://api.github.com/users/asheemmamoowala","html_url":"https://github.com/asheemmamoowala","followers_url":"https://api.github.com/users/asheemmamoowala/followers","following_url":"https://api.github.com/users/asheemmamoowala/following{/other_user}","gists_url":"https://api.github.com/users/asheemmamoowala/gists{/gist_id}","starred_url":"https://api.github.com/users/asheemmamoowala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asheemmamoowala/subscriptions","organizations_url":"https://api.github.com/users/asheemmamoowala/orgs","repos_url":"https://api.github.com/users/asheemmamoowala/repos","events_url":"https://api.github.com/users/asheemmamoowala/events{/privacy}","received_events_url":"https://api.github.com/users/asheemmamoowala/received_events","type":"User","site_admin":false},"body":"Based on @ansis' work in [`data-update-proof-of-concept`](https://github.com/mapbox/mapbox-gl-js/commit/1bdd3130a39a386b11a78f69ef360af8ea24c881)\r\n\r\nImplements `map.setFeatureState()`, a new method to set `key: value` pairs on specific features in a source. The source must provide unique feature id's per source-layer for this to work correctly.\r\n\r\nAlso implemented `['state', '<stateName>']` expression syntax. Similar to `get`, this allows accessing a feature's state instead of source data property. \r\n\r\n## todo\r\n - [x] Apply state to all symbol instances\r\n - [ ] Improve [ExpressionCreate](https://bl.ocks.org/anonymous/raw/f82c913b555326fd44b16d1864b7a23c) benchmark\r\n - [x] Implement feature id checking per source-layer\r\n - [x] Only evaluate state-dependent layers \r\n     - [x] Conditionally enable `dynamicDraw` on vertex and index buffers\r\n- [ ] Don't reparse expressions (#6255)\r\n\r\n## Launch Checklist\r\n - [ ] write tests for all new functionality\r\n - [ ] document any changes to public APIs\r\n - [ ] post benchmark scores\r\n - [ ] create debug page\r\n\r\ncc @ansis @mollymerp ","created_at":"2018-03-02T02:02:07Z","updated_at":"2018-03-29T13:55:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b1143873657cbbc4061a755a556be6185323e87","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":481447185,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/under%20development%20:construction:","name":"under development :construction:","color":"f9d0c4","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263/commits","review_comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263/comments","review_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6263/comments","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/8eeadc0cd86a60ecd5e83fe2870880f7e49aff33","head":{"label":"mapbox:update-paint-arrays","ref":"update-paint-arrays","sha":"8eeadc0cd86a60ecd5e83fe2870880f7e49aff33","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":8629417,"name":"mapbox-gl-js","full_name":"mapbox/mapbox-gl-js","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/mapbox-gl-js","description":"Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL","fork":false,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js","forks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/deployments","created_at":"2013-03-07T14:45:24Z","updated_at":"2018-03-29T13:48:28Z","pushed_at":"2018-03-29T01:21:57Z","git_url":"git://github.com/mapbox/mapbox-gl-js.git","ssh_url":"git@github.com:mapbox/mapbox-gl-js.git","clone_url":"https://github.com/mapbox/mapbox-gl-js.git","svn_url":"https://github.com/mapbox/mapbox-gl-js","homepage":"https://www.mapbox.com/maps","size":117416,"stargazers_count":2747,"watchers_count":2747,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":682,"mirror_url":null,"archived":false,"open_issues_count":546,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":682,"open_issues":546,"watchers":2747,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"31d92db36398cddbf8a511af261861460770d894","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":8629417,"name":"mapbox-gl-js","full_name":"mapbox/mapbox-gl-js","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/mapbox-gl-js","description":"Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL","fork":false,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js","forks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/deployments","created_at":"2013-03-07T14:45:24Z","updated_at":"2018-03-29T13:48:28Z","pushed_at":"2018-03-29T01:21:57Z","git_url":"git://github.com/mapbox/mapbox-gl-js.git","ssh_url":"git@github.com:mapbox/mapbox-gl-js.git","clone_url":"https://github.com/mapbox/mapbox-gl-js.git","svn_url":"https://github.com/mapbox/mapbox-gl-js","homepage":"https://www.mapbox.com/maps","size":117416,"stargazers_count":2747,"watchers_count":2747,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":682,"mirror_url":null,"archived":false,"open_issues_count":546,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":682,"open_issues":546,"watchers":2747,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/6263"},"issue":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6263"},"comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6263/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6263/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/8eeadc0cd86a60ecd5e83fe2870880f7e49aff33"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anandthakker"}}