{"action":"created","comment":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/comments/73820311","id":73820311,"diff_hunk":"@@ -0,0 +1,74 @@\n+import {Channel} from 'vega-lite/src/channel';\n+import {Type} from 'vega-lite/src/type';\n+\n+import {QueryConfig} from './config';\n+import {SpecQueryModel} from './model';\n+// import {Property} from './property';\n+import {EncodingQuery, ScaleQuery} from './query/encoding';\n+import {Schema} from './schema';\n+import {Dict} from './util';\n+\n+export function stylize(answerSet: SpecQueryModel[], schema: Schema, opt: QueryConfig): SpecQueryModel[] {\n+\n+  answerSet = answerSet.map(function(specM) {\n+    let encQIndex: Dict<EncodingQuery> = {};\n+\n+    if (opt.smallBandSizeForHighCardinality || opt.smallBandSizeForFacet) {\n+\n+      [Channel.ROW, Channel.Y, Channel.COLUMN, Channel.X].forEach((channel) => {","path":"src/stylize.ts","position":18,"original_position":18,"commit_id":"8d3bed4311dc24ead9d3e3469c4962e1c46a9953","original_commit_id":"8d3bed4311dc24ead9d3e3469c4962e1c46a9953","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"body":"I already mentioned that you should break sub-logic in `stylize` into multiple methods.  \r\n\r\nBreak logic in this `if` into a method.  ","created_at":"2016-08-08T04:09:47Z","updated_at":"2016-08-08T04:09:47Z","html_url":"https://github.com/uwdata/compassql/pull/187#discussion_r73820311","pull_request_url":"https://api.github.com/repos/uwdata/compassql/pulls/187","_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments/73820311"},"html":{"href":"https://github.com/uwdata/compassql/pull/187#discussion_r73820311"},"pull_request":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/187","id":80374915,"html_url":"https://github.com/uwdata/compassql/pull/187","diff_url":"https://github.com/uwdata/compassql/pull/187.diff","patch_url":"https://github.com/uwdata/compassql/pull/187.patch","issue_url":"https://api.github.com/repos/uwdata/compassql/issues/187","number":187,"state":"open","locked":false,"title":"add post enumeration modification to generate.ts","user":{"login":"felixcodes","id":17525561,"avatar_url":"https://avatars.githubusercontent.com/u/17525561?v=3","gravatar_id":"","url":"https://api.github.com/users/felixcodes","html_url":"https://github.com/felixcodes","followers_url":"https://api.github.com/users/felixcodes/followers","following_url":"https://api.github.com/users/felixcodes/following{/other_user}","gists_url":"https://api.github.com/users/felixcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/felixcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixcodes/subscriptions","organizations_url":"https://api.github.com/users/felixcodes/orgs","repos_url":"https://api.github.com/users/felixcodes/repos","events_url":"https://api.github.com/users/felixcodes/events{/privacy}","received_events_url":"https://api.github.com/users/felixcodes/received_events","type":"User","site_admin":false},"body":"fix #176 \r\n- add nominalScaleForHighCardinality config\r\n- add smallBandSizeForFacet config\r\n- add smallBandSizeForHighCardinality config\r\n- create Stylize.ts to handle post enumeration modification","created_at":"2016-08-07T19:04:09Z","updated_at":"2016-08-08T04:09:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bee10e643da062bb5202c810592c7268e9ce0c7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uwdata/compassql/pulls/187/commits","review_comments_url":"https://api.github.com/repos/uwdata/compassql/pulls/187/comments","review_comment_url":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uwdata/compassql/issues/187/comments","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/8d3bed4311dc24ead9d3e3469c4962e1c46a9953","head":{"label":"uwdata:fo/168-channel-cardinality-constraint","ref":"fo/168-channel-cardinality-constraint","sha":"8d3bed4311dc24ead9d3e3469c4962e1c46a9953","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-19T01:19:16Z","pushed_at":"2016-08-08T02:53:52Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":1214,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":59,"forks":0,"open_issues":59,"watchers":2,"default_branch":"master"}},"base":{"label":"uwdata:master","ref":"master","sha":"f91dc6891d6b06db264e1c0c61e1828645ae2e05","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-19T01:19:16Z","pushed_at":"2016-08-08T02:53:52Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":1214,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":59,"forks":0,"open_issues":59,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/187"},"html":{"href":"https://github.com/uwdata/compassql/pull/187"},"issue":{"href":"https://api.github.com/repos/uwdata/compassql/issues/187"},"comments":{"href":"https://api.github.com/repos/uwdata/compassql/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/uwdata/compassql/statuses/8d3bed4311dc24ead9d3e3469c4962e1c46a9953"}}}}
{"actor":{"display_login":"kanitw"}}