From fe1cb181ac4e13ac649cd362d1ee24f377daabf3 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 12 Dec 2023 10:01:24 -1000 Subject: [PATCH] Merge pull request #32887 from Expensify/marcaaron-fixScreenWrapper [CP Staging] Enable KB Avoiding View + remove padding bottom (cherry picked from commit f28ac760ea51a3495161251827bf0cc81ebfc235) --- src/pages/iou/request/step/IOURequestStepAmount.js | 1 + .../iou/request/step/IOURequestStepParticipants.js | 1 + src/pages/iou/request/step/StepScreenWrapper.js | 11 +++++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepAmount.js b/src/pages/iou/request/step/IOURequestStepAmount.js index 913912fcf05c..8f89703e6efd 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.js +++ b/src/pages/iou/request/step/IOURequestStepAmount.js @@ -99,6 +99,7 @@ function IOURequestStepAmount({ onBackButtonPress={navigateBack} testID={IOURequestStepAmount.displayName} shouldShowWrapper={Boolean(backTo)} + includeSafeAreaPaddingBottom > optionsSelectorRef.current && optionsSelectorRef.current.focus()} + includeSafeAreaPaddingBottom > (optionsSelectorRef.current = el)} diff --git a/src/pages/iou/request/step/StepScreenWrapper.js b/src/pages/iou/request/step/StepScreenWrapper.js index 000beb8432c5..5131a9c60dc6 100644 --- a/src/pages/iou/request/step/StepScreenWrapper.js +++ b/src/pages/iou/request/step/StepScreenWrapper.js @@ -25,13 +25,17 @@ const propTypes = { /** An ID used for unit testing */ testID: PropTypes.string.isRequired, + + /** Whether or not to include safe area padding */ + includeSafeAreaPaddingBottom: PropTypes.bool, }; const defaultProps = { onEntryTransitionEnd: () => {}, + includeSafeAreaPaddingBottom: false, }; -function StepScreenWrapper({testID, headerTitle, onBackButtonPress, onEntryTransitionEnd, children, shouldShowWrapper}) { +function StepScreenWrapper({testID, headerTitle, onBackButtonPress, onEntryTransitionEnd, children, shouldShowWrapper, includeSafeAreaPaddingBottom}) { const styles = useThemeStyles(); if (!shouldShowWrapper) { @@ -40,14 +44,13 @@ function StepScreenWrapper({testID, headerTitle, onBackButtonPress, onEntryTrans return ( {({insets, safeAreaPaddingBottomStyle, didScreenTransitionEnd}) => ( - +