Skip to content

Commit

Permalink
Merge pull request #26150 from bernhardoj/fix/26063
Browse files Browse the repository at this point in the history
Fix sign in top content scroll conflict with the sign in page
  • Loading branch information
robertjchen authored Aug 30, 2023
2 parents bb432aa + 99f818c commit 6e17b64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/pages/signin/SignInPageLayout/SignInPageContent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View, ScrollView} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import {withSafeAreaInsets} from 'react-native-safe-area-context';
import styles from '../../../styles/styles';
Expand Down Expand Up @@ -38,11 +38,7 @@ const propTypes = {

function SignInPageContent(props) {
return (
<ScrollView
contentContainerStyle={[styles.flex1, styles.signInPageLeftContainer]}
keyboardShouldPersistTaps="handled"
style={[!props.isSmallScreenWidth && styles.signInPageLeftContainerWide, styles.flex1]}
>
<View style={[styles.flex1, styles.signInPageLeftContainer]}>
<View style={[styles.flex1, styles.alignSelfCenter, styles.signInPageWelcomeFormContainer]}>
{/* This empty view creates margin on the top of the sign in form which will shrink and grow depending on if the keyboard is open or not */}
<View style={[styles.flexGrow1, props.isSmallScreenWidth ? styles.signInPageContentTopSpacerSmallScreens : styles.signInPageContentTopSpacer]} />
Expand Down Expand Up @@ -82,7 +78,7 @@ function SignInPageContent(props) {
) : null}
</View>
</View>
</ScrollView>
</View>
);
}

Expand Down
20 changes: 13 additions & 7 deletions src/pages/signin/SignInPageLayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,20 @@ function SignInPageLayout(props) {
<View style={containerStyles}>
{!shouldShowSmallScreen ? (
<View style={contentContainerStyles}>
<SignInPageContent
welcomeHeader={props.welcomeHeader}
welcomeText={props.welcomeText}
shouldShowWelcomeText={props.shouldShowWelcomeText}
shouldShowWelcomeHeader={props.shouldShowWelcomeHeader}
<ScrollView
keyboardShouldPersistTaps="handled"
style={[styles.signInPageLeftContainerWide, styles.flex1]}
contentContainerStyle={[styles.flex1]}
>
{props.children}
</SignInPageContent>
<SignInPageContent
welcomeHeader={props.welcomeHeader}
welcomeText={props.welcomeText}
shouldShowWelcomeText={props.shouldShowWelcomeText}
shouldShowWelcomeHeader={props.shouldShowWelcomeHeader}
>
{props.children}
</SignInPageContent>
</ScrollView>
<ScrollView
style={[styles.flex1, StyleUtils.getBackgroundColorStyle(themeColors.signInPage)]}
contentContainerStyle={[styles.flex1]}
Expand Down

0 comments on commit 6e17b64

Please sign in to comment.