From 3f45414846336850a748aae936d24ea2f290a483 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Fri, 31 Jan 2020 05:07:44 -0800 Subject: [PATCH] Make sure important errors are always shown to the user Summary: This diff makes sure that important errors are always shown to the user, such as an xcode version mismatch. Also made some small styling improvements Reviewed By: jknoxville Differential Revision: D19660337 fbshipit-source-id: 24dfb4d98bfdd1666164403f87b6a4e1dc915ddb --- src/chrome/ErrorBar.tsx | 44 +++++++++++++++++++++++------------- src/dispatcher/iOSDevice.tsx | 1 + src/dispatcher/server.tsx | 2 ++ src/reducers/connections.tsx | 1 + src/utils/argvUtils.tsx | 1 - 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/chrome/ErrorBar.tsx b/src/chrome/ErrorBar.tsx index 9d62bbae9..d451cd097 100644 --- a/src/chrome/ErrorBar.tsx +++ b/src/chrome/ErrorBar.tsx @@ -37,10 +37,13 @@ const ErrorBar = memo(function ErrorBar(props: Props) { 0, ); + const urgentErrors = props.errors.filter(e => e.urgent); + return ( - - {props.errors.map((error, index) => ( + + {(collapsed ? urgentErrors : props.errors).map((error, index) => ( props.dismissError(index)} key={index} @@ -81,16 +84,18 @@ function ErrorTile({ }) { const [collapsed, setCollapsed] = useState(true); return ( - + {(error.details || error.error) && ( - + +