{"action":"created","comment":{"url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/comments/232653047","pull_request_review_id":173892499,"id":232653047,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjY1MzA0Nw==","diff_hunk":"@@ -0,0 +1,73 @@\n+<!--\n+@license\n+Copyright (c) 2018 Vaadin Ltd.\n+This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n+-->\n+<script>\n+  window.Vaadin = window.Vaadin || {};\n+  window.Vaadin.Grid = window.Vaadin.Grid || {};\n+\n+  /**\n+   * @polymerMixin\n+   */\n+  Vaadin.Grid.StylingMixin = superClass => class StylingMixin extends superClass {\n+\n+    static get properties() {\n+      return {\n+        /**\n+         * A function that allows generating CSS class names for grid cells\n+         * based on their row and column. The return value should be the generated\n+         * class name as a string, or multiple class names separated by whitespace\n+         * characters.\n+         *\n+         * Receives two arguments:\n+         * - `rowData` The object with the properties related with\n+         *   the rendered item, contains:\n+         *   - `rowData.index` The index of the item.\n+         *   - `rowData.item` The item.\n+         *   - `rowData.expanded` Sublevel toggle state.\n+         *   - `rowData.level` Level of the tree represented with a horizontal offset of the toggle button.\n+         *   - `rowData.selected` Selected state.\n+         * - `column` The `<vaadin-grid-column>` element.\n+         */\n+        cellClassNameGenerator: Function\n+      };\n+    }\n+\n+    static get observers() {\n+      return [\n+        '__cellClassNameGeneratorChanged(cellClassNameGenerator)'\n+      ];\n+    }\n+\n+    __cellClassNameGeneratorChanged(cellClassGenerator) {\n+      this.generateClassNames();\n+    }\n+\n+    /**\n+     * Runs the `cellClassNameGenerator` for the visible cells.\n+     * If the generator depends on varying conditions, you need to\n+     * call this function manually in order to update the styles when\n+     * the conditions change.\n+     */\n+    generateClassNames() {\n+      Array.from(this.$.items.children).forEach(","path":"src/vaadin-grid-styling-mixin.html","position":54,"original_position":54,"commit_id":"ce2c0cd78ede16e108e80f60840a3534c9f39791","original_commit_id":"ce2c0cd78ede16e108e80f60840a3534c9f39791","user":{"login":"tomivirkki","id":1222264,"node_id":"MDQ6VXNlcjEyMjIyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1222264?v=4","gravatar_id":"","url":"https://api.github.com/users/tomivirkki","html_url":"https://github.com/tomivirkki","followers_url":"https://api.github.com/users/tomivirkki/followers","following_url":"https://api.github.com/users/tomivirkki/following{/other_user}","gists_url":"https://api.github.com/users/tomivirkki/gists{/gist_id}","starred_url":"https://api.github.com/users/tomivirkki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomivirkki/subscriptions","organizations_url":"https://api.github.com/users/tomivirkki/orgs","repos_url":"https://api.github.com/users/tomivirkki/repos","events_url":"https://api.github.com/users/tomivirkki/events{/privacy}","received_events_url":"https://api.github.com/users/tomivirkki/received_events","type":"User","site_admin":false},"body":"Note that iron-list items container may include hidden rows, for example after the items size is reduced from 2 to 1. So `this.$.items.children` should be filtered before processing.","created_at":"2018-11-12T13:18:00Z","updated_at":"2018-11-12T13:19:36Z","html_url":"https://github.com/vaadin/vaadin-grid/pull/1488#discussion_r232653047","pull_request_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/comments/232653047"},"html":{"href":"https://github.com/vaadin/vaadin-grid/pull/1488#discussion_r232653047"},"pull_request":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488"}}},"pull_request":{"url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488","id":230125379,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTI1Mzc5","html_url":"https://github.com/vaadin/vaadin-grid/pull/1488","diff_url":"https://github.com/vaadin/vaadin-grid/pull/1488.diff","patch_url":"https://github.com/vaadin/vaadin-grid/pull/1488.patch","issue_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/1488","number":1488,"state":"open","locked":false,"title":"Add cellClassNameGenerator API","user":{"login":"pekam","id":28533233,"node_id":"MDQ6VXNlcjI4NTMzMjMz","avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false},"body":"Allows defining a function that adds CSS class names to the cells in grid's body, based on the corresponding `rowData` and column.\r\n\r\nResolves #1481\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/vaadin/vaadin-grid/1488)\n<!-- Reviewable:end -->\n","created_at":"2018-11-12T12:56:49Z","updated_at":"2018-11-12T13:19:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bb8bd47657adb9e2af995c5f06bc66326d02c4f","assignee":{"login":"pekam","id":28533233,"node_id":"MDQ6VXNlcjI4NTMzMjMz","avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false},"assignees":[{"login":"pekam","id":28533233,"node_id":"MDQ6VXNlcjI4NTMzMjMz","avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":202234210,"node_id":"MDU6TGFiZWwyMDIyMzQyMTA=","url":"https://api.github.com/repos/vaadin/vaadin-grid/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488/commits","review_comments_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488/comments","review_comment_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/1488/comments","statuses_url":"https://api.github.com/repos/vaadin/vaadin-grid/statuses/ce2c0cd78ede16e108e80f60840a3534c9f39791","head":{"label":"vaadin:cell-class-generator","ref":"cell-class-generator","sha":"ce2c0cd78ede16e108e80f60840a3534c9f39791","user":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"repo":{"id":29623856,"node_id":"MDEwOlJlcG9zaXRvcnkyOTYyMzg1Ng==","name":"vaadin-grid","full_name":"vaadin/vaadin-grid","private":false,"owner":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/vaadin/vaadin-grid","description":"vaadin-grid is a free, high quality data grid / data table Web Component. Part of the Vaadin components.","fork":false,"url":"https://api.github.com/repos/vaadin/vaadin-grid","forks_url":"https://api.github.com/repos/vaadin/vaadin-grid/forks","keys_url":"https://api.github.com/repos/vaadin/vaadin-grid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaadin/vaadin-grid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaadin/vaadin-grid/teams","hooks_url":"https://api.github.com/repos/vaadin/vaadin-grid/hooks","issue_events_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/events{/number}","events_url":"https://api.github.com/repos/vaadin/vaadin-grid/events","assignees_url":"https://api.github.com/repos/vaadin/vaadin-grid/assignees{/user}","branches_url":"https://api.github.com/repos/vaadin/vaadin-grid/branches{/branch}","tags_url":"https://api.github.com/repos/vaadin/vaadin-grid/tags","blobs_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaadin/vaadin-grid/statuses/{sha}","languages_url":"https://api.github.com/repos/vaadin/vaadin-grid/languages","stargazers_url":"https://api.github.com/repos/vaadin/vaadin-grid/stargazers","contributors_url":"https://api.github.com/repos/vaadin/vaadin-grid/contributors","subscribers_url":"https://api.github.com/repos/vaadin/vaadin-grid/subscribers","subscription_url":"https://api.github.com/repos/vaadin/vaadin-grid/subscription","commits_url":"https://api.github.com/repos/vaadin/vaadin-grid/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaadin/vaadin-grid/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaadin/vaadin-grid/contents/{+path}","compare_url":"https://api.github.com/repos/vaadin/vaadin-grid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaadin/vaadin-grid/merges","archive_url":"https://api.github.com/repos/vaadin/vaadin-grid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaadin/vaadin-grid/downloads","issues_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues{/number}","pulls_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls{/number}","milestones_url":"https://api.github.com/repos/vaadin/vaadin-grid/milestones{/number}","notifications_url":"https://api.github.com/repos/vaadin/vaadin-grid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaadin/vaadin-grid/labels{/name}","releases_url":"https://api.github.com/repos/vaadin/vaadin-grid/releases{/id}","deployments_url":"https://api.github.com/repos/vaadin/vaadin-grid/deployments","created_at":"2015-01-21T22:40:01Z","updated_at":"2018-11-12T12:32:12Z","pushed_at":"2018-11-12T12:56:57Z","git_url":"git://github.com/vaadin/vaadin-grid.git","ssh_url":"git@github.com:vaadin/vaadin-grid.git","clone_url":"https://github.com/vaadin/vaadin-grid.git","svn_url":"https://github.com/vaadin/vaadin-grid","homepage":"https://vaadin.com/components","size":31963,"stargazers_count":343,"watchers_count":343,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"archived":false,"open_issues_count":136,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":140,"open_issues":136,"watchers":343,"default_branch":"master"}},"base":{"label":"vaadin:master","ref":"master","sha":"9d5fc30e3b5cbbfd51d6034f47880ebafb135adc","user":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"repo":{"id":29623856,"node_id":"MDEwOlJlcG9zaXRvcnkyOTYyMzg1Ng==","name":"vaadin-grid","full_name":"vaadin/vaadin-grid","private":false,"owner":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/vaadin/vaadin-grid","description":"vaadin-grid is a free, high quality data grid / data table Web Component. Part of the Vaadin components.","fork":false,"url":"https://api.github.com/repos/vaadin/vaadin-grid","forks_url":"https://api.github.com/repos/vaadin/vaadin-grid/forks","keys_url":"https://api.github.com/repos/vaadin/vaadin-grid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaadin/vaadin-grid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaadin/vaadin-grid/teams","hooks_url":"https://api.github.com/repos/vaadin/vaadin-grid/hooks","issue_events_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/events{/number}","events_url":"https://api.github.com/repos/vaadin/vaadin-grid/events","assignees_url":"https://api.github.com/repos/vaadin/vaadin-grid/assignees{/user}","branches_url":"https://api.github.com/repos/vaadin/vaadin-grid/branches{/branch}","tags_url":"https://api.github.com/repos/vaadin/vaadin-grid/tags","blobs_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaadin/vaadin-grid/statuses/{sha}","languages_url":"https://api.github.com/repos/vaadin/vaadin-grid/languages","stargazers_url":"https://api.github.com/repos/vaadin/vaadin-grid/stargazers","contributors_url":"https://api.github.com/repos/vaadin/vaadin-grid/contributors","subscribers_url":"https://api.github.com/repos/vaadin/vaadin-grid/subscribers","subscription_url":"https://api.github.com/repos/vaadin/vaadin-grid/subscription","commits_url":"https://api.github.com/repos/vaadin/vaadin-grid/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaadin/vaadin-grid/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaadin/vaadin-grid/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaadin/vaadin-grid/contents/{+path}","compare_url":"https://api.github.com/repos/vaadin/vaadin-grid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaadin/vaadin-grid/merges","archive_url":"https://api.github.com/repos/vaadin/vaadin-grid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaadin/vaadin-grid/downloads","issues_url":"https://api.github.com/repos/vaadin/vaadin-grid/issues{/number}","pulls_url":"https://api.github.com/repos/vaadin/vaadin-grid/pulls{/number}","milestones_url":"https://api.github.com/repos/vaadin/vaadin-grid/milestones{/number}","notifications_url":"https://api.github.com/repos/vaadin/vaadin-grid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaadin/vaadin-grid/labels{/name}","releases_url":"https://api.github.com/repos/vaadin/vaadin-grid/releases{/id}","deployments_url":"https://api.github.com/repos/vaadin/vaadin-grid/deployments","created_at":"2015-01-21T22:40:01Z","updated_at":"2018-11-12T12:32:12Z","pushed_at":"2018-11-12T12:56:57Z","git_url":"git://github.com/vaadin/vaadin-grid.git","ssh_url":"git@github.com:vaadin/vaadin-grid.git","clone_url":"https://github.com/vaadin/vaadin-grid.git","svn_url":"https://github.com/vaadin/vaadin-grid","homepage":"https://vaadin.com/components","size":31963,"stargazers_count":343,"watchers_count":343,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"archived":false,"open_issues_count":136,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":140,"open_issues":136,"watchers":343,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488"},"html":{"href":"https://github.com/vaadin/vaadin-grid/pull/1488"},"issue":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/issues/1488"},"comments":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/issues/1488/comments"},"review_comments":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488/comments"},"review_comment":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/pulls/1488/commits"},"statuses":{"href":"https://api.github.com/repos/vaadin/vaadin-grid/statuses/ce2c0cd78ede16e108e80f60840a3534c9f39791"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tomivirkki"}}