From 903476bdadcbfe12b35b7d723c2cbe8d376455f4 Mon Sep 17 00:00:00 2001 From: Simek Date: Wed, 26 Jan 2022 04:10:22 -0800 Subject: [PATCH] use `centered` prop for variable height modals (#3334) Summary: Currently all of the modals are displayed using default positioning, which works fine for small modals and large app windows, but it cause small UI/UX issues (double scroll bars) when app window is quite small. Adding [`centered` prop](https://ant.design/components/modal/#API) for variable height modals improves this situation a bit, but it also changes a bit the modal position when using maximised window, but I think this is bearable looking at improvements gained when window size is reduced. ## Changelog * use `centered` prop for variable height modals to improve UI in small app window Pull Request resolved: https://github.com/facebook/flipper/pull/3334 Test Plan: The change has been testes by running the desktop Flipper app locally from source. ## Preview (before & after) #### Small App Window Screenshot 2022-01-24 at 11 58 40 Screenshot 2022-01-24 at 11 58 37 Screenshot 2022-01-24 at 12 00 13 Screenshot 2022-01-24 at 12 00 10 #### Maximised App Window Screenshot 2022-01-24 at 12 12 12 Screenshot 2022-01-24 at 12 12 29 Reviewed By: mweststrate Differential Revision: D33741484 Pulled By: lblasa fbshipit-source-id: 0c3ca883d051cf4fcce9f9c1b6688974b66fd0d8 --- desktop/flipper-ui-core/src/chrome/PlatformSelectWizard.tsx | 1 + desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx | 1 + .../flipper-ui-core/src/chrome/plugin-manager/PluginManager.tsx | 2 +- desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx | 1 + desktop/flipper-ui-core/src/sandy-chrome/WelcomeScreen.tsx | 1 + .../src/sandy-chrome/appinspect/LaunchEmulator.tsx | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-ui-core/src/chrome/PlatformSelectWizard.tsx b/desktop/flipper-ui-core/src/chrome/PlatformSelectWizard.tsx index 828eee8a2..5831a2682 100644 --- a/desktop/flipper-ui-core/src/chrome/PlatformSelectWizard.tsx +++ b/desktop/flipper-ui-core/src/chrome/PlatformSelectWizard.tsx @@ -123,6 +123,7 @@ class PlatformSelectWizard extends Component { return ( { this.props.onHide(); markWizardAsCompleted(); diff --git a/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx b/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx index e42de8536..f824ad148 100644 --- a/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx +++ b/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx @@ -93,6 +93,7 @@ class SettingsSheet extends Component { return ( any}) { return ( - + diff --git a/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx b/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx index 99194c3bf..687b0861e 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx @@ -257,6 +257,7 @@ export default function SetupDoctorScreen(props: { return (