{"action":"opened","number":70,"pull_request":{"url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70","id":200192192,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTkyMTky","html_url":"https://github.com/plangrid/react-file-viewer/pull/70","diff_url":"https://github.com/plangrid/react-file-viewer/pull/70.diff","patch_url":"https://github.com/plangrid/react-file-viewer/pull/70.patch","issue_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/70","number":70,"state":"open","locked":false,"title":"FIELD-2756 disable pdf.js worker","user":{"login":"bohdan0","id":22181784,"node_id":"MDQ6VXNlcjIyMTgxNzg0","avatar_url":"https://avatars1.githubusercontent.com/u/22181784?v=4","gravatar_id":"","url":"https://api.github.com/users/bohdan0","html_url":"https://github.com/bohdan0","followers_url":"https://api.github.com/users/bohdan0/followers","following_url":"https://api.github.com/users/bohdan0/following{/other_user}","gists_url":"https://api.github.com/users/bohdan0/gists{/gist_id}","starred_url":"https://api.github.com/users/bohdan0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bohdan0/subscriptions","organizations_url":"https://api.github.com/users/bohdan0/orgs","repos_url":"https://api.github.com/users/bohdan0/repos","events_url":"https://api.github.com/users/bohdan0/events{/privacy}","received_events_url":"https://api.github.com/users/bohdan0/received_events","type":"User","site_admin":false},"body":"After some investigation around issues with `Error: Loading chunk 0 failed.` I came to conclusion that current implementation of pdf-viewer assumes that pdf worker is already set up by the consumer app (which is not always the case).\r\n\r\nChanges in this PR\r\n• import only necessary files from pdfjs library\r\n• disable pdf.js worker\r\n\r\nThis is not ideal solution bc disabling worker degrades performance, but on other hand it allows us to use pdf-viewer without extra setup in consumer app.\r\n\r\nFixes next issues: https://github.com/plangrid/react-file-viewer/issues/64 and https://github.com/plangrid/react-file-viewer/issues/69","created_at":"2018-07-09T19:08:30Z","updated_at":"2018-07-09T19:08:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70/commits","review_comments_url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70/comments","review_comment_url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/70/comments","statuses_url":"https://api.github.com/repos/plangrid/react-file-viewer/statuses/01386425096f9635bca9734c639e442aa24d80ca","head":{"label":"plangrid:disable-worker","ref":"disable-worker","sha":"01386425096f9635bca9734c639e442aa24d80ca","user":{"login":"plangrid","id":1200277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDAyNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1200277?v=4","gravatar_id":"","url":"https://api.github.com/users/plangrid","html_url":"https://github.com/plangrid","followers_url":"https://api.github.com/users/plangrid/followers","following_url":"https://api.github.com/users/plangrid/following{/other_user}","gists_url":"https://api.github.com/users/plangrid/gists{/gist_id}","starred_url":"https://api.github.com/users/plangrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plangrid/subscriptions","organizations_url":"https://api.github.com/users/plangrid/orgs","repos_url":"https://api.github.com/users/plangrid/repos","events_url":"https://api.github.com/users/plangrid/events{/privacy}","received_events_url":"https://api.github.com/users/plangrid/received_events","type":"Organization","site_admin":false},"repo":{"id":91412685,"node_id":"MDEwOlJlcG9zaXRvcnk5MTQxMjY4NQ==","name":"react-file-viewer","full_name":"plangrid/react-file-viewer","owner":{"login":"plangrid","id":1200277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDAyNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1200277?v=4","gravatar_id":"","url":"https://api.github.com/users/plangrid","html_url":"https://github.com/plangrid","followers_url":"https://api.github.com/users/plangrid/followers","following_url":"https://api.github.com/users/plangrid/following{/other_user}","gists_url":"https://api.github.com/users/plangrid/gists{/gist_id}","starred_url":"https://api.github.com/users/plangrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plangrid/subscriptions","organizations_url":"https://api.github.com/users/plangrid/orgs","repos_url":"https://api.github.com/users/plangrid/repos","events_url":"https://api.github.com/users/plangrid/events{/privacy}","received_events_url":"https://api.github.com/users/plangrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plangrid/react-file-viewer","description":null,"fork":false,"url":"https://api.github.com/repos/plangrid/react-file-viewer","forks_url":"https://api.github.com/repos/plangrid/react-file-viewer/forks","keys_url":"https://api.github.com/repos/plangrid/react-file-viewer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plangrid/react-file-viewer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plangrid/react-file-viewer/teams","hooks_url":"https://api.github.com/repos/plangrid/react-file-viewer/hooks","issue_events_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/events{/number}","events_url":"https://api.github.com/repos/plangrid/react-file-viewer/events","assignees_url":"https://api.github.com/repos/plangrid/react-file-viewer/assignees{/user}","branches_url":"https://api.github.com/repos/plangrid/react-file-viewer/branches{/branch}","tags_url":"https://api.github.com/repos/plangrid/react-file-viewer/tags","blobs_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/refs{/sha}","trees_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plangrid/react-file-viewer/statuses/{sha}","languages_url":"https://api.github.com/repos/plangrid/react-file-viewer/languages","stargazers_url":"https://api.github.com/repos/plangrid/react-file-viewer/stargazers","contributors_url":"https://api.github.com/repos/plangrid/react-file-viewer/contributors","subscribers_url":"https://api.github.com/repos/plangrid/react-file-viewer/subscribers","subscription_url":"https://api.github.com/repos/plangrid/react-file-viewer/subscription","commits_url":"https://api.github.com/repos/plangrid/react-file-viewer/commits{/sha}","git_commits_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/commits{/sha}","comments_url":"https://api.github.com/repos/plangrid/react-file-viewer/comments{/number}","issue_comment_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/comments{/number}","contents_url":"https://api.github.com/repos/plangrid/react-file-viewer/contents/{+path}","compare_url":"https://api.github.com/repos/plangrid/react-file-viewer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plangrid/react-file-viewer/merges","archive_url":"https://api.github.com/repos/plangrid/react-file-viewer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plangrid/react-file-viewer/downloads","issues_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues{/number}","pulls_url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls{/number}","milestones_url":"https://api.github.com/repos/plangrid/react-file-viewer/milestones{/number}","notifications_url":"https://api.github.com/repos/plangrid/react-file-viewer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plangrid/react-file-viewer/labels{/name}","releases_url":"https://api.github.com/repos/plangrid/react-file-viewer/releases{/id}","deployments_url":"https://api.github.com/repos/plangrid/react-file-viewer/deployments","created_at":"2017-05-16T04:05:21Z","updated_at":"2018-06-27T13:01:46Z","pushed_at":"2018-07-09T18:26:31Z","git_url":"git://github.com/plangrid/react-file-viewer.git","ssh_url":"git@github.com:plangrid/react-file-viewer.git","clone_url":"https://github.com/plangrid/react-file-viewer.git","svn_url":"https://github.com/plangrid/react-file-viewer","homepage":null,"size":9405,"stargazers_count":39,"watchers_count":39,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":21,"open_issues":16,"watchers":39,"default_branch":"master"}},"base":{"label":"plangrid:master","ref":"master","sha":"f55ce66e49e15244a6c30d77e52acbbdad064d36","user":{"login":"plangrid","id":1200277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDAyNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1200277?v=4","gravatar_id":"","url":"https://api.github.com/users/plangrid","html_url":"https://github.com/plangrid","followers_url":"https://api.github.com/users/plangrid/followers","following_url":"https://api.github.com/users/plangrid/following{/other_user}","gists_url":"https://api.github.com/users/plangrid/gists{/gist_id}","starred_url":"https://api.github.com/users/plangrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plangrid/subscriptions","organizations_url":"https://api.github.com/users/plangrid/orgs","repos_url":"https://api.github.com/users/plangrid/repos","events_url":"https://api.github.com/users/plangrid/events{/privacy}","received_events_url":"https://api.github.com/users/plangrid/received_events","type":"Organization","site_admin":false},"repo":{"id":91412685,"node_id":"MDEwOlJlcG9zaXRvcnk5MTQxMjY4NQ==","name":"react-file-viewer","full_name":"plangrid/react-file-viewer","owner":{"login":"plangrid","id":1200277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDAyNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1200277?v=4","gravatar_id":"","url":"https://api.github.com/users/plangrid","html_url":"https://github.com/plangrid","followers_url":"https://api.github.com/users/plangrid/followers","following_url":"https://api.github.com/users/plangrid/following{/other_user}","gists_url":"https://api.github.com/users/plangrid/gists{/gist_id}","starred_url":"https://api.github.com/users/plangrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plangrid/subscriptions","organizations_url":"https://api.github.com/users/plangrid/orgs","repos_url":"https://api.github.com/users/plangrid/repos","events_url":"https://api.github.com/users/plangrid/events{/privacy}","received_events_url":"https://api.github.com/users/plangrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plangrid/react-file-viewer","description":null,"fork":false,"url":"https://api.github.com/repos/plangrid/react-file-viewer","forks_url":"https://api.github.com/repos/plangrid/react-file-viewer/forks","keys_url":"https://api.github.com/repos/plangrid/react-file-viewer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plangrid/react-file-viewer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plangrid/react-file-viewer/teams","hooks_url":"https://api.github.com/repos/plangrid/react-file-viewer/hooks","issue_events_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/events{/number}","events_url":"https://api.github.com/repos/plangrid/react-file-viewer/events","assignees_url":"https://api.github.com/repos/plangrid/react-file-viewer/assignees{/user}","branches_url":"https://api.github.com/repos/plangrid/react-file-viewer/branches{/branch}","tags_url":"https://api.github.com/repos/plangrid/react-file-viewer/tags","blobs_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/refs{/sha}","trees_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plangrid/react-file-viewer/statuses/{sha}","languages_url":"https://api.github.com/repos/plangrid/react-file-viewer/languages","stargazers_url":"https://api.github.com/repos/plangrid/react-file-viewer/stargazers","contributors_url":"https://api.github.com/repos/plangrid/react-file-viewer/contributors","subscribers_url":"https://api.github.com/repos/plangrid/react-file-viewer/subscribers","subscription_url":"https://api.github.com/repos/plangrid/react-file-viewer/subscription","commits_url":"https://api.github.com/repos/plangrid/react-file-viewer/commits{/sha}","git_commits_url":"https://api.github.com/repos/plangrid/react-file-viewer/git/commits{/sha}","comments_url":"https://api.github.com/repos/plangrid/react-file-viewer/comments{/number}","issue_comment_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues/comments{/number}","contents_url":"https://api.github.com/repos/plangrid/react-file-viewer/contents/{+path}","compare_url":"https://api.github.com/repos/plangrid/react-file-viewer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plangrid/react-file-viewer/merges","archive_url":"https://api.github.com/repos/plangrid/react-file-viewer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plangrid/react-file-viewer/downloads","issues_url":"https://api.github.com/repos/plangrid/react-file-viewer/issues{/number}","pulls_url":"https://api.github.com/repos/plangrid/react-file-viewer/pulls{/number}","milestones_url":"https://api.github.com/repos/plangrid/react-file-viewer/milestones{/number}","notifications_url":"https://api.github.com/repos/plangrid/react-file-viewer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plangrid/react-file-viewer/labels{/name}","releases_url":"https://api.github.com/repos/plangrid/react-file-viewer/releases{/id}","deployments_url":"https://api.github.com/repos/plangrid/react-file-viewer/deployments","created_at":"2017-05-16T04:05:21Z","updated_at":"2018-06-27T13:01:46Z","pushed_at":"2018-07-09T18:26:31Z","git_url":"git://github.com/plangrid/react-file-viewer.git","ssh_url":"git@github.com:plangrid/react-file-viewer.git","clone_url":"https://github.com/plangrid/react-file-viewer.git","svn_url":"https://github.com/plangrid/react-file-viewer","homepage":null,"size":9405,"stargazers_count":39,"watchers_count":39,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":21,"open_issues":16,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70"},"html":{"href":"https://github.com/plangrid/react-file-viewer/pull/70"},"issue":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/issues/70"},"comments":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/plangrid/react-file-viewer/statuses/01386425096f9635bca9734c639e442aa24d80ca"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"bohdan0"}}