Skip to content

Commit b0c61d6

Browse files
committed
Migrate POPOVER modals to use the Reanimated modal
1 parent 33a40cb commit b0c61d6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/Modal/BaseModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import ReanimatedModal from './ReanimatedModal';
3232
import type ReanimatedModalProps from './ReanimatedModal/types';
3333
import type BaseModalProps from './types';
3434

35-
const REANIMATED_MODAL_TYPES: Array<ValueOf<typeof CONST.MODAL.MODAL_TYPE>> = [CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED, CONST.MODAL.MODAL_TYPE.FULLSCREEN];
35+
const REANIMATED_MODAL_TYPES: Array<ValueOf<typeof CONST.MODAL.MODAL_TYPE>> = [CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED, CONST.MODAL.MODAL_TYPE.FULLSCREEN, CONST.MODAL.MODAL_TYPE.POPOVER];
3636

3737
type ModalComponentProps = (ReactNativeModalProps | ReanimatedModalProps) & {
3838
type?: ValueOf<typeof CONST.MODAL.MODAL_TYPE>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function Container({
4646

4747
return (
4848
<Animated.View
49-
style={[style, styles.modalContainer, type !== CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED && styles.modalAnimatedContainer, animatedStyles, {zIndex: 1}]}
49+
style={[style, type === CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED && [styles.modalContainer, styles.modalAnimatedContainer], animatedStyles, {zIndex: 1}]}
5050
exiting={Exiting}
5151
// eslint-disable-next-line react/jsx-props-no-spreading
5252
{...props}

src/components/PopoverWithMeasuredContent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {PopoverWithMeasuredContentProps} from './types';
88

99
/**
1010
* Logic for PopoverWithMeasuredContent is in PopoverWithMeasuredContentBase.
11-
* This component is a perf optimization, it return BOTTOM_DOCKED early, for small screens avoiding Popover measurement logic calculations.
11+
* This component is a perf optimization, it returns BOTTOM_DOCKED early, for small screens avoiding Popover measurement logic calculations.
1212
*/
1313
function PopoverWithMeasuredContent({...props}: PopoverWithMeasuredContentProps) {
1414
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth

0 commit comments

Comments
 (0)