From a73aa08e68b300a4e2d30b067cc4b41051d232fa Mon Sep 17 00:00:00 2001 From: Samuel Holmes Date: Wed, 24 Jan 2024 15:58:54 -0800 Subject: [PATCH] Move NotificationView render location to no longer avoid keyboard The NotificationView should be rendered outside of the keyboard tracking so it doesn't move when the keyboard is open. --- .../__snapshots__/SendScene2.ui.test.tsx.snap | 200 +++++++++--------- src/components/common/SceneWrapper.tsx | 54 +++-- 2 files changed, 126 insertions(+), 128 deletions(-) diff --git a/src/__tests__/scenes/__snapshots__/SendScene2.ui.test.tsx.snap b/src/__tests__/scenes/__snapshots__/SendScene2.ui.test.tsx.snap index cd585282378..38eb99a1fd3 100644 --- a/src/__tests__/scenes/__snapshots__/SendScene2.ui.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/SendScene2.ui.test.tsx.snap @@ -1307,6 +1307,16 @@ exports[`SendScene2 1 spendTarget 1`] = ` , + , , - , ] `; @@ -2838,6 +2838,16 @@ exports[`SendScene2 1 spendTarget with info tiles 1`] = ` , + , , - , ] `; @@ -4346,6 +4346,16 @@ exports[`SendScene2 2 spendTargets 1`] = ` , + , , - , ] `; @@ -5555,6 +5555,16 @@ exports[`SendScene2 2 spendTargets hide tiles 1`] = ` , + , , - , ] `; @@ -6740,6 +6740,16 @@ exports[`SendScene2 2 spendTargets hide tiles 2`] = ` , + , , - , ] `; @@ -7764,6 +7764,16 @@ exports[`SendScene2 2 spendTargets hide tiles 3`] = ` , + , , - , ] `; @@ -9093,6 +9093,16 @@ exports[`SendScene2 2 spendTargets lock tiles 1`] = ` , + , , - , ] `; @@ -10357,6 +10357,16 @@ exports[`SendScene2 2 spendTargets lock tiles 2`] = ` , + , , - , ] `; @@ -11580,6 +11580,16 @@ exports[`SendScene2 2 spendTargets lock tiles 3`] = ` , + , , - , ] `; @@ -12788,6 +12788,16 @@ exports[`SendScene2 Render SendScene 1`] = ` } /> , + , , - , ] `; diff --git a/src/components/common/SceneWrapper.tsx b/src/components/common/SceneWrapper.tsx index 6f726ec3f7e..c7c0ef25f5d 100644 --- a/src/components/common/SceneWrapper.tsx +++ b/src/components/common/SceneWrapper.tsx @@ -192,34 +192,32 @@ export function SceneWrapper(props: SceneWrapperProps): JSX.Element { const info: SceneWrapperInfo = { insets, insetStyle, undoInsetStyle, hasTabs, isKeyboardOpen } return ( - - - {}} - // Fixes middle-floating scrollbar issue - scrollIndicatorInsets={{ right: 1 }} - > - - {isFuncChildren ? children(info) : children} - - - {renderFooter != null || hasNotifications ? ( - <> - {hasNotifications ? : null} - {renderFooter != null && !hasTabs ? {renderFooter(info)} : null} - - ) : null} - + <> + + + {}} + // Fixes middle-floating scrollbar issue + scrollIndicatorInsets={{ right: 1 }} + > + + {isFuncChildren ? children(info) : children} + + + {renderFooter != null && !hasTabs ? {renderFooter(info)} : null} + + {hasNotifications ? : null} + ) }