Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#20709: Use windowHeight in getNavigationModalCardStyles #23222

Merged
merged 6 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.website.js
jscardona12 marked this conversation as resolved.
Show resolved Hide resolved
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a link to the issue we are fixing as well

// https://github.com/Expensify/App/issues/20709

height: `${windowHeight}px`,
minHeight: `${windowHeight}px`,
Comment on lines 12 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused a regression on Safari where the window height is not reliable.

});
9 changes: 0 additions & 9 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1763,15 +1763,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