{"action":"closed","number":766,"pull_request":{"url":"https://api.github.com/repos/sanity-io/sanity/pulls/766","id":184853672,"html_url":"https://github.com/sanity-io/sanity/pull/766","diff_url":"https://github.com/sanity-io/sanity/pull/766.diff","patch_url":"https://github.com/sanity-io/sanity/pull/766.patch","issue_url":"https://api.github.com/repos/sanity-io/sanity/issues/766","number":766,"state":"closed","locked":false,"title":"[default-layout] Provide error boundary at tool level","user":{"login":"rexxars","id":48200,"avatar_url":"https://avatars2.githubusercontent.com/u/48200?v=4","gravatar_id":"","url":"https://api.github.com/users/rexxars","html_url":"https://github.com/rexxars","followers_url":"https://api.github.com/users/rexxars/followers","following_url":"https://api.github.com/users/rexxars/following{/other_user}","gists_url":"https://api.github.com/users/rexxars/gists{/gist_id}","starred_url":"https://api.github.com/users/rexxars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexxars/subscriptions","organizations_url":"https://api.github.com/users/rexxars/orgs","repos_url":"https://api.github.com/users/rexxars/repos","events_url":"https://api.github.com/users/rexxars/events{/privacy}","received_events_url":"https://api.github.com/users/rexxars/received_events","type":"User","site_admin":false},"body":"This PR provides an error boundary at the tool level, meaning that if a crash happens during the render phase of a React component inside of a tool, the error is caught in default layout when it tries to render the tool, and instead of displaying a blank page, provides a more user-friendly error message.\r\n\r\nI took a stab at some design work since this wasn't really part of any sprint, but rather the result of some personal frustration. It seems to be working on desktop and mobile devices.\r\n\r\nWhen in production, it just displays an \"oops, tool x crashed\" with buttons to display error details and to retry mounting of the tool, whereas in development it will automatically display the error details to prevent unnecessary clicks.\r\n\r\n<img width=\"1094\" alt=\"screen shot 2018-04-29 at 22 23 20\" src=\"https://user-images.githubusercontent.com/48200/39410770-a344d4e2-4bfd-11e8-89c8-c2f53139b873.png\">\r\n\r\n<img width=\"1094\" alt=\"screen shot 2018-04-29 at 22 23 38\" src=\"https://user-images.githubusercontent.com/48200/39410773-a8fd5a08-4bfd-11e8-8186-416fc2685cc2.png\">\r\n\r\n<img width=\"402\" alt=\"screen shot 2018-04-29 at 22 39 57\" src=\"https://user-images.githubusercontent.com/48200/39410827-6350089c-4bfe-11e8-80ae-5b54b8c4d5f0.png\">\r\n","created_at":"2018-04-29T20:41:58Z","updated_at":"2018-05-01T10:45:12Z","closed_at":"2018-05-01T10:45:12Z","merged_at":"2018-05-01T10:45:12Z","merge_commit_sha":"b2f8124495b387a8ba837e5473a1896cfb13b0be","assignee":null,"assignees":[],"requested_reviewers":[{"login":"evenwestvang","id":172952,"avatar_url":"https://avatars1.githubusercontent.com/u/172952?v=4","gravatar_id":"","url":"https://api.github.com/users/evenwestvang","html_url":"https://github.com/evenwestvang","followers_url":"https://api.github.com/users/evenwestvang/followers","following_url":"https://api.github.com/users/evenwestvang/following{/other_user}","gists_url":"https://api.github.com/users/evenwestvang/gists{/gist_id}","starred_url":"https://api.github.com/users/evenwestvang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evenwestvang/subscriptions","organizations_url":"https://api.github.com/users/evenwestvang/orgs","repos_url":"https://api.github.com/users/evenwestvang/repos","events_url":"https://api.github.com/users/evenwestvang/events{/privacy}","received_events_url":"https://api.github.com/users/evenwestvang/received_events","type":"User","site_admin":false},{"login":"kristofferj","id":568562,"avatar_url":"https://avatars2.githubusercontent.com/u/568562?v=4","gravatar_id":"","url":"https://api.github.com/users/kristofferj","html_url":"https://github.com/kristofferj","followers_url":"https://api.github.com/users/kristofferj/followers","following_url":"https://api.github.com/users/kristofferj/following{/other_user}","gists_url":"https://api.github.com/users/kristofferj/gists{/gist_id}","starred_url":"https://api.github.com/users/kristofferj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristofferj/subscriptions","organizations_url":"https://api.github.com/users/kristofferj/orgs","repos_url":"https://api.github.com/users/kristofferj/repos","events_url":"https://api.github.com/users/kristofferj/events{/privacy}","received_events_url":"https://api.github.com/users/kristofferj/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sanity-io/sanity/pulls/766/commits","review_comments_url":"https://api.github.com/repos/sanity-io/sanity/pulls/766/comments","review_comment_url":"https://api.github.com/repos/sanity-io/sanity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sanity-io/sanity/issues/766/comments","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/a242439bc6a9d7064f85ae750926de3aea46c246","head":{"label":"sanity-io:tool-error-boundary","ref":"tool-error-boundary","sha":"a242439bc6a9d7064f85ae750926de3aea46c246","user":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"repo":{"id":79375056,"name":"sanity","full_name":"sanity-io/sanity","owner":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanity-io/sanity","description":"Sanity Content Studio – Collaborate in real-time on structured data","fork":false,"url":"https://api.github.com/repos/sanity-io/sanity","forks_url":"https://api.github.com/repos/sanity-io/sanity/forks","keys_url":"https://api.github.com/repos/sanity-io/sanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanity-io/sanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanity-io/sanity/teams","hooks_url":"https://api.github.com/repos/sanity-io/sanity/hooks","issue_events_url":"https://api.github.com/repos/sanity-io/sanity/issues/events{/number}","events_url":"https://api.github.com/repos/sanity-io/sanity/events","assignees_url":"https://api.github.com/repos/sanity-io/sanity/assignees{/user}","branches_url":"https://api.github.com/repos/sanity-io/sanity/branches{/branch}","tags_url":"https://api.github.com/repos/sanity-io/sanity/tags","blobs_url":"https://api.github.com/repos/sanity-io/sanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanity-io/sanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanity-io/sanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanity-io/sanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/{sha}","languages_url":"https://api.github.com/repos/sanity-io/sanity/languages","stargazers_url":"https://api.github.com/repos/sanity-io/sanity/stargazers","contributors_url":"https://api.github.com/repos/sanity-io/sanity/contributors","subscribers_url":"https://api.github.com/repos/sanity-io/sanity/subscribers","subscription_url":"https://api.github.com/repos/sanity-io/sanity/subscription","commits_url":"https://api.github.com/repos/sanity-io/sanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanity-io/sanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanity-io/sanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanity-io/sanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanity-io/sanity/contents/{+path}","compare_url":"https://api.github.com/repos/sanity-io/sanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanity-io/sanity/merges","archive_url":"https://api.github.com/repos/sanity-io/sanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanity-io/sanity/downloads","issues_url":"https://api.github.com/repos/sanity-io/sanity/issues{/number}","pulls_url":"https://api.github.com/repos/sanity-io/sanity/pulls{/number}","milestones_url":"https://api.github.com/repos/sanity-io/sanity/milestones{/number}","notifications_url":"https://api.github.com/repos/sanity-io/sanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanity-io/sanity/labels{/name}","releases_url":"https://api.github.com/repos/sanity-io/sanity/releases{/id}","deployments_url":"https://api.github.com/repos/sanity-io/sanity/deployments","created_at":"2017-01-18T19:19:02Z","updated_at":"2018-05-01T07:59:30Z","pushed_at":"2018-05-01T10:45:12Z","git_url":"git://github.com/sanity-io/sanity.git","ssh_url":"git@github.com:sanity-io/sanity.git","clone_url":"https://github.com/sanity-io/sanity.git","svn_url":"https://github.com/sanity-io/sanity","homepage":"https://sanity.io","size":23239,"stargazers_count":379,"watchers_count":379,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":25,"open_issues":83,"watchers":379,"default_branch":"next"}},"base":{"label":"sanity-io:next","ref":"next","sha":"c3ed67d9f65b738224cf7aacc851abc26150060e","user":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"repo":{"id":79375056,"name":"sanity","full_name":"sanity-io/sanity","owner":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanity-io/sanity","description":"Sanity Content Studio – Collaborate in real-time on structured data","fork":false,"url":"https://api.github.com/repos/sanity-io/sanity","forks_url":"https://api.github.com/repos/sanity-io/sanity/forks","keys_url":"https://api.github.com/repos/sanity-io/sanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanity-io/sanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanity-io/sanity/teams","hooks_url":"https://api.github.com/repos/sanity-io/sanity/hooks","issue_events_url":"https://api.github.com/repos/sanity-io/sanity/issues/events{/number}","events_url":"https://api.github.com/repos/sanity-io/sanity/events","assignees_url":"https://api.github.com/repos/sanity-io/sanity/assignees{/user}","branches_url":"https://api.github.com/repos/sanity-io/sanity/branches{/branch}","tags_url":"https://api.github.com/repos/sanity-io/sanity/tags","blobs_url":"https://api.github.com/repos/sanity-io/sanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanity-io/sanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanity-io/sanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanity-io/sanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/{sha}","languages_url":"https://api.github.com/repos/sanity-io/sanity/languages","stargazers_url":"https://api.github.com/repos/sanity-io/sanity/stargazers","contributors_url":"https://api.github.com/repos/sanity-io/sanity/contributors","subscribers_url":"https://api.github.com/repos/sanity-io/sanity/subscribers","subscription_url":"https://api.github.com/repos/sanity-io/sanity/subscription","commits_url":"https://api.github.com/repos/sanity-io/sanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanity-io/sanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanity-io/sanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanity-io/sanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanity-io/sanity/contents/{+path}","compare_url":"https://api.github.com/repos/sanity-io/sanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanity-io/sanity/merges","archive_url":"https://api.github.com/repos/sanity-io/sanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanity-io/sanity/downloads","issues_url":"https://api.github.com/repos/sanity-io/sanity/issues{/number}","pulls_url":"https://api.github.com/repos/sanity-io/sanity/pulls{/number}","milestones_url":"https://api.github.com/repos/sanity-io/sanity/milestones{/number}","notifications_url":"https://api.github.com/repos/sanity-io/sanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanity-io/sanity/labels{/name}","releases_url":"https://api.github.com/repos/sanity-io/sanity/releases{/id}","deployments_url":"https://api.github.com/repos/sanity-io/sanity/deployments","created_at":"2017-01-18T19:19:02Z","updated_at":"2018-05-01T07:59:30Z","pushed_at":"2018-05-01T10:45:12Z","git_url":"git://github.com/sanity-io/sanity.git","ssh_url":"git@github.com:sanity-io/sanity.git","clone_url":"https://github.com/sanity-io/sanity.git","svn_url":"https://github.com/sanity-io/sanity","homepage":"https://sanity.io","size":23239,"stargazers_count":379,"watchers_count":379,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":25,"open_issues":83,"watchers":379,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/766"},"html":{"href":"https://github.com/sanity-io/sanity/pull/766"},"issue":{"href":"https://api.github.com/repos/sanity-io/sanity/issues/766"},"comments":{"href":"https://api.github.com/repos/sanity-io/sanity/issues/766/comments"},"review_comments":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/766/comments"},"review_comment":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/766/commits"},"statuses":{"href":"https://api.github.com/repos/sanity-io/sanity/statuses/a242439bc6a9d7064f85ae750926de3aea46c246"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"rexxars","id":48200,"avatar_url":"https://avatars2.githubusercontent.com/u/48200?v=4","gravatar_id":"","url":"https://api.github.com/users/rexxars","html_url":"https://github.com/rexxars","followers_url":"https://api.github.com/users/rexxars/followers","following_url":"https://api.github.com/users/rexxars/following{/other_user}","gists_url":"https://api.github.com/users/rexxars/gists{/gist_id}","starred_url":"https://api.github.com/users/rexxars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexxars/subscriptions","organizations_url":"https://api.github.com/users/rexxars/orgs","repos_url":"https://api.github.com/users/rexxars/repos","events_url":"https://api.github.com/users/rexxars/events{/privacy}","received_events_url":"https://api.github.com/users/rexxars/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":1,"additions":146,"deletions":16,"changed_files":3}}
{"actor":{"display_login":"rexxars"}}