Skip to content

Commit

Permalink
Merge pull request #23222 from jscardona12/hotfix/20709
Browse files Browse the repository at this point in the history
#20709: Use windowHeight in getNavigationModalCardStyles
  • Loading branch information
johnmlee101 authored Jul 21, 2023
2 parents b55fd83 + df683c3 commit c225999
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/libs/Navigation/AppNavigator/AuthScreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import NAVIGATORS from '../../../NAVIGATORS';
import FullScreenNavigator from './Navigators/FullScreenNavigator';
import styles from '../../../styles/styles';
import * as SessionUtils from '../../SessionUtils';
import getNavigationModalCardStyle from '../../../styles/getNavigationModalCardStyles';

let currentUserEmail;
Onyx.connect({
Expand Down Expand Up @@ -210,7 +211,10 @@ class AuthScreens extends React.Component {
...commonScreenOptions,
// we want pop in RHP since there are some flows that would work weird otherwise
animationTypeForReplace: 'pop',
cardStyle: styles.navigationModalCard(this.props.isSmallScreenWidth),
cardStyle: getNavigationModalCardStyle({
windowHeight: this.props.windowHeight,
isSmallScreenWidth: this.props.isSmallScreenWidth,
}),
};

return (
Expand Down
3 changes: 3 additions & 0 deletions src/styles/getNavigationModalCardStyles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import getBaseNavigationModalCardStyles from './getBaseNavigationModalCardStyles';

export default getBaseNavigationModalCardStyles;
3 changes: 3 additions & 0 deletions src/styles/getNavigationModalCardStyles/index.website.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ export default ({windowHeight, isSmallScreenWidth}) => ({
// Safari issues:
// https://github.com/Expensify/App/issues/12005
// https://github.com/Expensify/App/issues/17824
// https://github.com/Expensify/App/issues/20709

height: `${windowHeight}px`,
minHeight: `${windowHeight}px`,
});
9 changes: 0 additions & 9 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1770,15 +1770,6 @@ const styles = {
marginRight: 4,
},

navigationModalCard: (isSmallScreenWidth) => ({
position: 'absolute',
top: 0,
right: 0,
width: isSmallScreenWidth ? '100%' : variables.sideBarWidth,
backgroundColor: 'transparent',
height: '100%',
}),

navigationModalOverlay: {
...userSelect.userSelectNone,
position: 'absolute',
Expand Down

0 comments on commit c225999

Please sign in to comment.