From 473eb695e626c02ebe06e53ed7ad4fafb92f99df Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 7 Sep 2021 14:25:23 +0530 Subject: [PATCH 01/49] Update style --- src/pages/signin/ResendValidationForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signin/ResendValidationForm.js b/src/pages/signin/ResendValidationForm.js index f494941421ba..a3fefd43e68d 100755 --- a/src/pages/signin/ResendValidationForm.js +++ b/src/pages/signin/ResendValidationForm.js @@ -83,7 +83,7 @@ class ResendValidationForm extends React.Component { return ( <> - + {this.props.translate('resendValidationForm.weSentYouMagicSignInLink', { loginType: (Str.isSMSLogin(this.props.credentials.login) ? this.props.translate('common.phoneNumber').toLowerCase() From c5e3aff9257a0ff909f28970985d0f5977124435 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 7 Sep 2021 14:30:14 +0530 Subject: [PATCH 02/49] Pass props to show welcome message --- src/pages/signin/SignInPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signin/SignInPage.js b/src/pages/signin/SignInPage.js index ce47478da5d3..05bc0feb6b40 100644 --- a/src/pages/signin/SignInPage.js +++ b/src/pages/signin/SignInPage.js @@ -92,7 +92,7 @@ class SignInPage extends Component { {showLoginForm && } From 154f465411029f98138a68fc3e57b98f2e3017b1 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 7 Sep 2021 14:33:24 +0530 Subject: [PATCH 03/49] Handle props in main layout --- src/pages/signin/SignInPageLayout/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/signin/SignInPageLayout/index.js b/src/pages/signin/SignInPageLayout/index.js index 1a5a88a4c7ad..87e43d249c93 100644 --- a/src/pages/signin/SignInPageLayout/index.js +++ b/src/pages/signin/SignInPageLayout/index.js @@ -13,11 +13,19 @@ const SignInPageLayout = props => ( {props.children} ) - : {props.children} + : ( + + {props.children} + + ) ); SignInPageLayout.propTypes = propTypes; From 2211940522b276d5125da02b0b7c59e10df4deb0 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 7 Sep 2021 14:34:04 +0530 Subject: [PATCH 04/49] Conditional welcome message on wide layout --- .../signin/SignInPageLayout/SignInPageLayoutWide.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js b/src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js index 947dfe41603f..67bc08fc244f 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js +++ b/src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js @@ -22,6 +22,8 @@ const propTypes = { /* Flag to check medium screen with device */ isMediumScreenWidth: PropTypes.bool.isRequired, + shouldShowWelcomeText: PropTypes.bool.isRequired, + ...withLocalizePropTypes, }; @@ -45,9 +47,11 @@ const SignInPageLayoutWide = props => ( height={variables.componentSizeLarge} /> - - {props.welcomeText} - + {props.shouldShowWelcomeText && ( + + {props.welcomeText} + + )} {props.children} From 8f850b1b4661b490eaf947c272bbfbf23150cee7 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 7 Sep 2021 14:34:27 +0530 Subject: [PATCH 05/49] Conditional welcome message on mobile layout --- .../signin/SignInPageLayout/SignInPageLayoutNarrow.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js b/src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js index 74d213eff0ca..4eb4b54b4d31 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js +++ b/src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js @@ -16,6 +16,8 @@ const propTypes = { * on form type (set password, sign in, etc.) */ welcomeText: PropTypes.string.isRequired, + shouldShowWelcomeText: PropTypes.bool.isRequired, + ...withLocalizePropTypes, }; @@ -47,9 +49,11 @@ const SignInPageLayoutNarrow = props => ( height={variables.componentSizeLarge} /> - - {props.welcomeText} - + {props.shouldShowWelcomeText && ( + + {props.welcomeText} + + )} {props.children} From 2385500e366bff5b5300a9867038d47164d71869 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Wed, 15 Sep 2021 00:34:43 +0530 Subject: [PATCH 06/49] fix(emoji-skintone): Fixed emoji border radius and width --- src/styles/styles.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/styles/styles.js b/src/styles/styles.js index a84ae33bf43e..f4fcb24e4e7a 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1177,6 +1177,9 @@ const styles = { emojiSkinToneItem: { width: 'auto', + minWidth: 36, + textAlign: 'center', + borderRadius: 8, ...spacing.ph1, }, From 85c6862088427661f3784674876fdbcfc1573ab1 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Wed, 15 Sep 2021 00:35:10 +0530 Subject: [PATCH 07/49] fix(emoji-skintone): Retain last selected emoji with default highlight --- src/pages/home/report/EmojiSkinToneList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/EmojiSkinToneList.js b/src/pages/home/report/EmojiSkinToneList.js index e88cdc7f3655..dfae05e7cd6d 100644 --- a/src/pages/home/report/EmojiSkinToneList.js +++ b/src/pages/home/report/EmojiSkinToneList.js @@ -45,7 +45,7 @@ class EmojiSkinToneList extends Component { * @param {object} skinToneEmoji */ updateSelectedSkinTone(skinToneEmoji) { - this.setState(prev => ({isSkinToneListVisible: !prev.isSkinToneListVisible})); + this.setState(prev => ({isSkinToneListVisible: !prev.isSkinToneListVisible, highlightedIndex: skinToneEmoji.skinTone})); this.props.updatePreferredSkinTone(skinToneEmoji.skinTone); } From fe30323d88bd5911a17a2df6dc7607a7db4bdfa8 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Wed, 15 Sep 2021 00:57:21 +0530 Subject: [PATCH 08/49] fix(emoji-skintone): Aligned skintone with other emojis --- src/pages/home/report/EmojiSkinToneList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/EmojiSkinToneList.js b/src/pages/home/report/EmojiSkinToneList.js index dfae05e7cd6d..18909c93cd97 100644 --- a/src/pages/home/report/EmojiSkinToneList.js +++ b/src/pages/home/report/EmojiSkinToneList.js @@ -52,7 +52,7 @@ class EmojiSkinToneList extends Component { render() { const selectedEmoji = getSkinToneEmojiFromIndex(this.props.preferredSkinTone); return ( - + { !this.state.isSkinToneListVisible && ( Date: Wed, 15 Sep 2021 02:06:07 +0530 Subject: [PATCH 09/49] fix(emoji-skintone): Fixed alignment for Emoji skintone picker --- src/pages/home/report/EmojiSkinToneList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/EmojiSkinToneList.js b/src/pages/home/report/EmojiSkinToneList.js index 18909c93cd97..d8409801b14d 100644 --- a/src/pages/home/report/EmojiSkinToneList.js +++ b/src/pages/home/report/EmojiSkinToneList.js @@ -68,7 +68,7 @@ class EmojiSkinToneList extends Component { styles.alignItemsCenter, ]} > - + {selectedEmoji.code} From 15a0b4149f53d6096df34c506138d3609a388834 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Fri, 17 Sep 2021 15:49:48 +0530 Subject: [PATCH 10/49] Update copy --- src/languages/en.js | 1 + src/languages/es.js | 1 + src/pages/signin/ResendValidationForm.js | 15 ++++++++++----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index efcb20b5b9cc..48938805c076 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -344,6 +344,7 @@ export default { linkHasBeenResent: 'Link has been re-sent', weSentYouMagicSignInLink: ({loginType}) => `We've sent a magic sign in link to your ${loginType}.`, resendLink: 'Resend link', + unvalidatedAccount: 'This account exists but isn\'t validated, please check your inbox for the validation link.', }, detailsPage: { localTime: 'Local time', diff --git a/src/languages/es.js b/src/languages/es.js index 6fbd8ab352cc..de94e74c7096 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -344,6 +344,7 @@ export default { linkHasBeenResent: 'El enlace se ha reenviado', weSentYouMagicSignInLink: ({loginType}) => `Hemos enviado un enlace mágico de inicio de sesión a tu ${loginType}.`, resendLink: 'Reenviar enlace', + unvalidatedAccount: 'Esta cuenta ya existe pero no está validada, por favor busca en tu email el link de validación.', }, detailsPage: { localTime: 'Hora local', diff --git a/src/pages/signin/ResendValidationForm.js b/src/pages/signin/ResendValidationForm.js index a3fefd43e68d..0844d820dbb7 100755 --- a/src/pages/signin/ResendValidationForm.js +++ b/src/pages/signin/ResendValidationForm.js @@ -84,11 +84,16 @@ class ResendValidationForm extends React.Component { <> - {this.props.translate('resendValidationForm.weSentYouMagicSignInLink', { - loginType: (Str.isSMSLogin(this.props.credentials.login) - ? this.props.translate('common.phoneNumber').toLowerCase() - : this.props.translate('common.email')).toLowerCase(), - })} + { + this.props.account.validated + ? this.props.translate('resendValidationForm.weSentYouMagicSignInLink', { + loginType: (Str.isSMSLogin(this.props.credentials.login) + ? this.props.translate('common.phoneNumber') + .toLowerCase() + : this.props.translate('common.email')).toLowerCase(), + }) + : this.props.translate('resendValidationForm.unvalidatedAccount') + } {!_.isEmpty(this.state.formSuccess) && ( From 2e698f30de0fff53e99140a08d10662068d3df11 Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Fri, 17 Sep 2021 18:07:56 +0530 Subject: [PATCH 11/49] Update resend link layout and style --- src/pages/signin/ResendValidationForm.js | 34 +++++++++++++++++++----- src/styles/utilities/positioning.js | 3 +++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/pages/signin/ResendValidationForm.js b/src/pages/signin/ResendValidationForm.js index 0844d820dbb7..76f026554b4e 100755 --- a/src/pages/signin/ResendValidationForm.js +++ b/src/pages/signin/ResendValidationForm.js @@ -1,5 +1,5 @@ import React from 'react'; -import {View} from 'react-native'; +import {TouchableOpacity, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import _ from 'underscore'; @@ -9,9 +9,13 @@ import Button from '../../components/Button'; import Text from '../../components/Text'; import {reopenAccount, resendValidationLink, resetPassword} from '../../libs/actions/Session'; import ONYXKEYS from '../../ONYXKEYS'; -import ChangeExpensifyLoginLink from './ChangeExpensifyLoginLink'; import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; import compose from '../../libs/compose'; +import redirectToSignIn from '../../libs/actions/SignInRedirect'; +import Avatar from '../../components/Avatar'; +import {getDefaultAvatar} from '../../libs/OptionsListUtils'; +import Icon from '../../components/Icon'; +import {BackArrow} from '../../components/Icon/Expensicons'; const propTypes = { /* Onyx Props */ @@ -82,8 +86,23 @@ class ResendValidationForm extends React.Component { render() { return ( <> + + redirectToSignIn()} + > + + + + + {Str.isSMSLogin(this.props.credentials.login) ? this.props.toLocalPhone(Str.removeSMSDomain(this.props.credentials.login)) : this.props.credentials.login} + + - + { this.props.account.validated ? this.props.translate('resendValidationForm.weSentYouMagicSignInLink', { @@ -101,15 +120,18 @@ class ResendValidationForm extends React.Component { {this.state.formSuccess} )} - + + redirectToSignIn()}> + + {this.props.translate('common.cancel')} + +