Skip to content

Commit

Permalink
Merge pull request #12366 from aimane-chnaif/fix-11336
Browse files Browse the repository at this point in the history
refactor navigation modal card styles
  • Loading branch information
marcochavezf authored Nov 21, 2022
2 parents e480519 + d2a6919 commit 5a03b50
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
11 changes: 8 additions & 3 deletions src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ export default (
cardStyle.transform = [{translateX}];
}

return ({
containerStyle: {
let containerStyle;
if (!isSmallScreenWidth) {
containerStyle = {
overflow: 'hidden',
},
};
}

return ({
containerStyle,
cardStyle,
overlayStyle: {
opacity: progress.interpolate({
Expand Down
1 change: 1 addition & 0 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class SearchPage extends Component {
hideAdditionalOptionStates
showTitleTooltip
shouldShowOptions={didScreenTransitionEnd}
shouldDelayFocus
/>
</View>
</>
Expand Down
1 change: 1 addition & 0 deletions src/pages/iou/IOUCurrencySelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class IOUCurrencySelection extends Component {
onChangeText={this.changeSearchValue}
placeholderText={this.props.translate('common.search')}
headerMessage={headerMessage}
shouldDelayFocus
/>
</ScreenWrapper>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class IOUParticipantsRequest extends Component {
headerMessage={headerMessage}
hideAdditionalOptionStates
forceTextUnreadStyle
shouldDelayFocus
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class IOUParticipantsSplit extends Component {
shouldShowConfirmButton
confirmButtonText={this.props.translate('common.next')}
onConfirmSelection={this.finalizeParticipants}
shouldDelayFocus
/>
</View>
</>
Expand Down
4 changes: 1 addition & 3 deletions src/styles/cardStyles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import variables from '../variables';
*/
export default function getCardStyles(isSmallScreenWidth, screenWidth) {
return {
position: 'fixed',
width: isSmallScreenWidth ? screenWidth : variables.sideBarWidth,
right: 0,
height: '100%',
alignSelf: 'flex-end',
};
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import variables from '../variables';

export default isSmallScreenWidth => ({
position: 'absolute',
top: 0,
right: 0,
width: isSmallScreenWidth ? '100%' : variables.sideBarWidth,
backgroundColor: 'transparent',
height: '100%',
alignSelf: 'flex-end',
});
1 change: 0 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,6 @@ const styles = {

navigationScreenCardStyle: {
backgroundColor: themeColors.appBG,
height: '100%',
},

navigationSceneFullScreenWrapper: {
Expand Down

0 comments on commit 5a03b50

Please sign in to comment.