{"action":"created","comment":{"url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/comments/237530969","pull_request_review_id":179851035,"id":237530969,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzUzMDk2OQ==","diff_hunk":"@@ -79,37 +42,21 @@ export class Rest<T> extends React.Component<IRestProps<T>, IRestState<T>> {\n       error: false,\n       hasData: false,\n       loading: true,\n-      read: this.read,\n-      save: this.onSave,\n+      read: this.read.bind(this),","path":"packages/api/src/Rest.tsx","position":73,"original_position":73,"commit_id":"5f0b6eeb59300a43d4b8bf7f91d324532bb2dff8","original_commit_id":"5f0b6eeb59300a43d4b8bf7f91d324532bb2dff8","user":{"login":"gashcrumb","id":351660,"node_id":"MDQ6VXNlcjM1MTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/351660?v=4","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"body":"> Also, why are you linking the save and read functions in the state? This will mess up with the change detection done in the shouldComponentUpdate hook I think.\r\n\r\n> If this is to pass them in the render function, just recompose the object on the fly\r\n\r\nGotcha!  Reworked that bit.  The state interface though has these functions defined, so not setting them yeilds a compilation error:\r\n\r\n```\r\n@syndesis/api: (rpt2 plugin) Error: /home/gashcrumb/Source/syndesis-react-poc/packages/api/src/Rest.tsx(39,5): semantic error TS2322 Type '{ data: T; error: false; hasData: false; loading: true; }' is not assignable to type 'Readonly<IRestState<T>>'.\r\n@syndesis/api:   Property 'read' is missing in type '{ data: T; error: false; hasData: false; loading: true; }'.\r\n```\r\n\r\nI'll go with:\r\n\r\n```\r\n    this.read = this.read.bind(this);\r\n    this.onSave = this.onSave.bind(this);\r\n    this.state = {\r\n      data: this.props.defaultValue,\r\n      error: false,\r\n      hasData: false,\r\n      loading: true,\r\n      read: this.read,\r\n      save: this.onSave,\r\n    };\r\n```\r\n\r\nDefinitely needs to be done, I had head-scratching runtime errors for a bit before realizing it :-)\r\n","created_at":"2018-11-29T15:23:21Z","updated_at":"2018-11-29T15:23:22Z","html_url":"https://github.com/syndesisio/syndesis-react-poc/pull/29#discussion_r237530969","pull_request_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/comments/237530969"},"html":{"href":"https://github.com/syndesisio/syndesis-react-poc/pull/29#discussion_r237530969"},"pull_request":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29"}},"in_reply_to_id":237402793},"pull_request":{"url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29","id":233690334,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNjkwMzM0","html_url":"https://github.com/syndesisio/syndesis-react-poc/pull/29","diff_url":"https://github.com/syndesisio/syndesis-react-poc/pull/29.diff","patch_url":"https://github.com/syndesisio/syndesis-react-poc/pull/29.patch","issue_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/29","number":29,"state":"open","locked":false,"title":"[WIP] feat: fetch when notified by the server side event service","user":{"login":"gashcrumb","id":351660,"node_id":"MDQ6VXNlcjM1MTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/351660?v=4","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"body":"fixes #26 \r\n\r\nCurrently still just a POC, basically I'd like to check if I'm going in the right direction with this @riccardo-forina \r\n\r\nThe general idea is to connect to the server side event source once and make the message queue available to child components so they can listen and act on incoming changes as needed.\r\n\r\nTODO:\r\n* a lot more cleanup in the imported event service code in particular, what's there is just to get it running\r\n* there's a lot of rxjs usage in there, it's worth trying to clean that up probably\r\n","created_at":"2018-11-26T20:43:06Z","updated_at":"2018-11-29T15:23:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"651b5926fbdda7b42c741aa7392105b23abc70ab","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1134452232,"node_id":"MDU6TGFiZWwxMTM0NDUyMjMy","url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/labels/pr/wip","name":"pr/wip","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29/commits","review_comments_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29/comments","review_comment_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/29/comments","statuses_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/statuses/5f0b6eeb59300a43d4b8bf7f91d324532bb2dff8","head":{"label":"gashcrumb:issue-26","ref":"issue-26","sha":"5f0b6eeb59300a43d4b8bf7f91d324532bb2dff8","user":{"login":"gashcrumb","id":351660,"node_id":"MDQ6VXNlcjM1MTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/351660?v=4","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"repo":{"id":157594798,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc1OTQ3OTg=","name":"syndesis-react-poc","full_name":"gashcrumb/syndesis-react-poc","private":false,"owner":{"login":"gashcrumb","id":351660,"node_id":"MDQ6VXNlcjM1MTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/351660?v=4","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gashcrumb/syndesis-react-poc","description":null,"fork":true,"url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc","forks_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/forks","keys_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/teams","hooks_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/hooks","issue_events_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/issues/events{/number}","events_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/events","assignees_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/assignees{/user}","branches_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/branches{/branch}","tags_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/tags","blobs_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/languages","stargazers_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/stargazers","contributors_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/contributors","subscribers_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/subscribers","subscription_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/subscription","commits_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/contents/{+path}","compare_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/merges","archive_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/downloads","issues_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/issues{/number}","pulls_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/labels{/name}","releases_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/releases{/id}","deployments_url":"https://api.github.com/repos/gashcrumb/syndesis-react-poc/deployments","created_at":"2018-11-14T18:45:23Z","updated_at":"2018-11-27T17:22:27Z","pushed_at":"2018-11-28T21:27:36Z","git_url":"git://github.com/gashcrumb/syndesis-react-poc.git","ssh_url":"git@github.com:gashcrumb/syndesis-react-poc.git","clone_url":"https://github.com/gashcrumb/syndesis-react-poc.git","svn_url":"https://github.com/gashcrumb/syndesis-react-poc","homepage":null,"size":1340,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":{"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"syndesisio:master","ref":"master","sha":"eaf301c1367ec217a0a60a91131ca11c6fc1e0f1","user":{"login":"syndesisio","id":23079786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDc5Nzg2","avatar_url":"https://avatars3.githubusercontent.com/u/23079786?v=4","gravatar_id":"","url":"https://api.github.com/users/syndesisio","html_url":"https://github.com/syndesisio","followers_url":"https://api.github.com/users/syndesisio/followers","following_url":"https://api.github.com/users/syndesisio/following{/other_user}","gists_url":"https://api.github.com/users/syndesisio/gists{/gist_id}","starred_url":"https://api.github.com/users/syndesisio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syndesisio/subscriptions","organizations_url":"https://api.github.com/users/syndesisio/orgs","repos_url":"https://api.github.com/users/syndesisio/repos","events_url":"https://api.github.com/users/syndesisio/events{/privacy}","received_events_url":"https://api.github.com/users/syndesisio/received_events","type":"Organization","site_admin":false},"repo":{"id":153815627,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4MTU2Mjc=","name":"syndesis-react-poc","full_name":"syndesisio/syndesis-react-poc","private":false,"owner":{"login":"syndesisio","id":23079786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDc5Nzg2","avatar_url":"https://avatars3.githubusercontent.com/u/23079786?v=4","gravatar_id":"","url":"https://api.github.com/users/syndesisio","html_url":"https://github.com/syndesisio","followers_url":"https://api.github.com/users/syndesisio/followers","following_url":"https://api.github.com/users/syndesisio/following{/other_user}","gists_url":"https://api.github.com/users/syndesisio/gists{/gist_id}","starred_url":"https://api.github.com/users/syndesisio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syndesisio/subscriptions","organizations_url":"https://api.github.com/users/syndesisio/orgs","repos_url":"https://api.github.com/users/syndesisio/repos","events_url":"https://api.github.com/users/syndesisio/events{/privacy}","received_events_url":"https://api.github.com/users/syndesisio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/syndesisio/syndesis-react-poc","description":null,"fork":false,"url":"https://api.github.com/repos/syndesisio/syndesis-react-poc","forks_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/forks","keys_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/teams","hooks_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/hooks","issue_events_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/events{/number}","events_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/events","assignees_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/assignees{/user}","branches_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/branches{/branch}","tags_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/tags","blobs_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/languages","stargazers_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/stargazers","contributors_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/contributors","subscribers_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/subscribers","subscription_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/subscription","commits_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/contents/{+path}","compare_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/merges","archive_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/downloads","issues_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues{/number}","pulls_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/labels{/name}","releases_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/releases{/id}","deployments_url":"https://api.github.com/repos/syndesisio/syndesis-react-poc/deployments","created_at":"2018-10-19T17:01:56Z","updated_at":"2018-11-29T15:19:12Z","pushed_at":"2018-11-29T15:19:09Z","git_url":"git://github.com/syndesisio/syndesis-react-poc.git","ssh_url":"git@github.com:syndesisio/syndesis-react-poc.git","clone_url":"https://github.com/syndesisio/syndesis-react-poc.git","svn_url":"https://github.com/syndesisio/syndesis-react-poc","homepage":null,"size":1411,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":12,"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":4,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29"},"html":{"href":"https://github.com/syndesisio/syndesis-react-poc/pull/29"},"issue":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/29"},"comments":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/syndesisio/syndesis-react-poc/statuses/5f0b6eeb59300a43d4b8bf7f91d324532bb2dff8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gashcrumb"}}