Skip to content

Commit 587c40b

Browse files
committed
Revert automatic backdrop hiding when in RHP
1 parent 17e2cb7 commit 587c40b

4 files changed

Lines changed: 4 additions & 15 deletions

File tree

src/components/DatePicker/CalendarPicker/YearPickerModal.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ type YearPickerModalProps = {
1414
/** Whether the modal is visible */
1515
isVisible: boolean;
1616

17-
/** Whether the picker is displayed over RHP */
18-
isRHPVisible: boolean;
19-
2017
/** The list of years to render */
2118
years: CalendarPickerListItem[];
2219

@@ -30,7 +27,7 @@ type YearPickerModalProps = {
3027
onClose?: () => void;
3128
};
3229

33-
function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear(), onYearChange, onClose, isRHPVisible}: YearPickerModalProps) {
30+
function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear(), onYearChange, onClose}: YearPickerModalProps) {
3431
const styles = useThemeStyles();
3532
const {translate} = useLocalize();
3633
const [searchText, setSearchText] = useState('');
@@ -62,7 +59,6 @@ function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear
6259
onBackdropPress={onClose}
6360
enableEdgeToEdgeBottomSafeAreaPadding
6461
shouldUseReanimatedModal
65-
backdropOpacity={isRHPVisible ? 0 : undefined}
6662
>
6763
<ScreenWrapper
6864
style={[styles.pb0]}

src/components/DatePicker/CalendarPicker/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
77
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback';
88
import Text from '@components/Text';
99
import useLocalize from '@hooks/useLocalize';
10-
import useOnyx from '@hooks/useOnyx';
1110
import useResponsiveLayout from '@hooks/useResponsiveLayout';
1211
import useThemeStyles from '@hooks/useThemeStyles';
1312
import DateUtils from '@libs/DateUtils';
1413
import CONST from '@src/CONST';
15-
import ONYXKEYS from '@src/ONYXKEYS';
1614
import ArrowIcon from './ArrowIcon';
1715
import Day from './Day';
1816
import generateMonthMatrix from './generateMonthMatrix';
@@ -69,9 +67,6 @@ function CalendarPicker({
6967
const [isYearPickerVisible, setIsYearPickerVisible] = useState(false);
7068
const isFirstRender = useRef(true);
7169

72-
const [isRHPVisible = false] = useOnyx(ONYXKEYS.MODAL, {selector: (modal) => modal?.type === CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED, canBeMissing: true});
73-
const isRHPVisibleWhenOpened = useRef(isRHPVisible).current;
74-
7570
const currentMonthView = currentDateView.getMonth();
7671
const currentYearView = currentDateView.getFullYear();
7772
const calendarDaysMatrix = generateMonthMatrix(currentYearView, currentMonthView);
@@ -306,7 +301,6 @@ function CalendarPicker({
306301
years={years}
307302
currentYear={currentYearView}
308303
onYearChange={onYearSelected}
309-
isRHPVisible={isRHPVisibleWhenOpened}
310304
onClose={() => setIsYearPickerVisible(false)}
311305
/>
312306
</View>

src/components/Modal/ReanimatedModal/Backdrop/index.web.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import noop from 'lodash/noop';
21
import React, {useMemo} from 'react';
32
import {View} from 'react-native';
43
import Animated, {Easing, Keyframe} from 'react-native-reanimated';
@@ -60,7 +59,7 @@ function Backdrop({
6059
accessible
6160
accessibilityLabel={translate('modal.backdropLabel')}
6261
onPress={onBackdropPress}
63-
style={[styles.userSelectNone, onBackdropPress && onBackdropPress !== noop ? styles.cursorPointer : styles.cursorAuto]}
62+
style={[styles.userSelectNone, styles.cursorAuto]}
6463
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
6564
>
6665
{isBackdropVisible && (

src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ function BaseOverlay({onPress, isModalOnTheLeft = false}: BaseOverlayProps) {
3131
we have 30px draggable ba at the top and the rest of the dimmed area is clickable. On other devices,
3232
everything behaves normally like one big pressable */}
3333
<PressableWithoutFeedback
34-
style={[styles.draggableTopBar, styles.boxShadowNone]}
34+
style={[styles.draggableTopBar, styles.boxShadowNone, styles.cursorAuto]}
3535
onPress={onPress}
3636
accessibilityLabel={translate('common.close')}
3737
role={CONST.ROLE.BUTTON}
3838
id={CONST.OVERLAY.TOP_BUTTON_NATIVE_ID}
3939
tabIndex={-1}
4040
/>
4141
<PressableWithoutFeedback
42-
style={[styles.flex1, styles.boxShadowNone]}
42+
style={[styles.flex1, styles.boxShadowNone, styles.cursorAuto]}
4343
onPress={onPress}
4444
accessibilityLabel={translate('common.close')}
4545
role={CONST.ROLE.BUTTON}

0 commit comments

Comments
 (0)