From 0ae29a5f793700b886f95916128724933533106e Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Tue, 31 Aug 2021 14:05:07 -0700 Subject: [PATCH 1/5] Get rid of pointless TermsWithLicenses module --- .../TermsWithLicenses/index.js | 55 ------------------ .../{TermsWithLicenses => }/index.android.js | 18 +++--- .../{TermsWithLicenses => }/index.ios.js | 18 +++--- src/pages/signin/TermsAndLicenses/index.js | 56 ++++++++++++++++++- 4 files changed, 72 insertions(+), 75 deletions(-) delete mode 100755 src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.js rename src/pages/signin/TermsAndLicenses/{TermsWithLicenses => }/index.android.js (81%) rename src/pages/signin/TermsAndLicenses/{TermsWithLicenses => }/index.ios.js (84%) mode change 100644 => 100755 src/pages/signin/TermsAndLicenses/index.js diff --git a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.js b/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.js deleted file mode 100755 index a022e771f31b..000000000000 --- a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.js +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import {Text, View} from 'react-native'; -import styles from '../../../../styles/styles'; -import CONST from '../../../../CONST'; -import TextLink from '../../../../components/TextLink'; -import withLocalize, { - withLocalizePropTypes, -} from '../../../../components/withLocalize'; -import LogoWordmark from '../../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../../components/LocalePicker'; - -const TermsWithLicenses = ({translate}) => ( - - - {translate('termsOfUse.phrase1')} - {' '} - - {translate('termsOfUse.phrase2')} - - {' '} - {translate('termsOfUse.phrase3')} - {' '} - - {translate('termsOfUse.phrase4')} - - . - {'\n'} - {translate('termsOfUse.phrase5')} - {' '} - {translate('termsOfUse.phrase6')} - {' '} - - {translate('termsOfUse.phrase7')} - - . - - - - - - -); - -TermsWithLicenses.propTypes = {...withLocalizePropTypes}; - -export default withLocalize(TermsWithLicenses); diff --git a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.android.js b/src/pages/signin/TermsAndLicenses/index.android.js similarity index 81% rename from src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.android.js rename to src/pages/signin/TermsAndLicenses/index.android.js index 4ef064130e71..9d548108120a 100644 --- a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.android.js +++ b/src/pages/signin/TermsAndLicenses/index.android.js @@ -1,15 +1,15 @@ import React from 'react'; import {Text, View} from 'react-native'; -import styles from '../../../../styles/styles'; -import CONST from '../../../../CONST'; -import TextLink from '../../../../components/TextLink'; +import styles from '../../../styles/styles'; +import CONST from '../../../CONST'; +import TextLink from '../../../components/TextLink'; import withLocalize, { withLocalizePropTypes, -} from '../../../../components/withLocalize'; -import LogoWordmark from '../../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../../components/LocalePicker'; +} from '../../../components/withLocalize'; +import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import LocalePicker from '../../../components/LocalePicker'; -const TermsWithLicenses = ({translate}) => ( +const TermsAndLicenses = ({translate}) => ( ( ); -TermsWithLicenses.propTypes = {...withLocalizePropTypes}; +TermsAndLicenses.propTypes = {...withLocalizePropTypes}; -export default withLocalize(TermsWithLicenses); +export default withLocalize(TermsAndLicenses); diff --git a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.ios.js b/src/pages/signin/TermsAndLicenses/index.ios.js similarity index 84% rename from src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.ios.js rename to src/pages/signin/TermsAndLicenses/index.ios.js index 6314e7ae4485..bc1208ce9411 100644 --- a/src/pages/signin/TermsAndLicenses/TermsWithLicenses/index.ios.js +++ b/src/pages/signin/TermsAndLicenses/index.ios.js @@ -1,15 +1,15 @@ import React from 'react'; import {Text, View} from 'react-native'; -import styles from '../../../../styles/styles'; -import CONST from '../../../../CONST'; -import TextLink from '../../../../components/TextLink'; +import styles from '../../../styles/styles'; +import CONST from '../../../CONST'; +import TextLink from '../../../components/TextLink'; import withLocalize, { withLocalizePropTypes, -} from '../../../../components/withLocalize'; -import LogoWordmark from '../../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../../components/LocalePicker'; +} from '../../../components/withLocalize'; +import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import LocalePicker from '../../../components/LocalePicker'; -const TermsWithLicenses = ({translate}) => ( +const TermsAndLicenses = ({translate}) => ( ( ); -TermsWithLicenses.propTypes = {...withLocalizePropTypes}; +TermsAndLicenses.propTypes = {...withLocalizePropTypes}; -export default withLocalize(TermsWithLicenses); +export default withLocalize(TermsAndLicenses); diff --git a/src/pages/signin/TermsAndLicenses/index.js b/src/pages/signin/TermsAndLicenses/index.js old mode 100644 new mode 100755 index 77d96e01f64c..d2af1e6ea64a --- a/src/pages/signin/TermsAndLicenses/index.js +++ b/src/pages/signin/TermsAndLicenses/index.js @@ -1,3 +1,55 @@ -import TermsWithLicenses from './TermsWithLicenses'; +import React from 'react'; +import {Text, View} from 'react-native'; +import styles from '../../../styles/styles'; +import CONST from '../../../CONST'; +import TextLink from '../../../components/TextLink'; +import withLocalize, { + withLocalizePropTypes, +} from '../../../components/withLocalize'; +import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import LocalePicker from '../../../components/LocalePicker'; -export default TermsWithLicenses; +const TermsAndLicenses = ({translate}) => ( + + + {translate('termsOfUse.phrase1')} + {' '} + + {translate('termsOfUse.phrase2')} + + {' '} + {translate('termsOfUse.phrase3')} + {' '} + + {translate('termsOfUse.phrase4')} + + . + {'\n'} + {translate('termsOfUse.phrase5')} + {' '} + {translate('termsOfUse.phrase6')} + {' '} + + {translate('termsOfUse.phrase7')} + + . + + + + + + +); + +TermsAndLicenses.propTypes = {...withLocalizePropTypes}; + +export default withLocalize(TermsAndLicenses); From 8e8e3f7460346237ff43da38a3cca5a4e67e2166 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Tue, 31 Aug 2021 14:26:33 -0700 Subject: [PATCH 2/5] Extract common footer from TermsAndLicenses --- .../TermsAndLicenses/TermsAndLicensesFooter.js | 16 ++++++++++++++++ .../signin/TermsAndLicenses/index.android.js | 11 +++-------- src/pages/signin/TermsAndLicenses/index.ios.js | 11 +++-------- src/pages/signin/TermsAndLicenses/index.js | 9 +++------ 4 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js diff --git a/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js b/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js new file mode 100644 index 000000000000..f454cd1cdb79 --- /dev/null +++ b/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js @@ -0,0 +1,16 @@ +import React from 'react'; +import {View} from 'react-native'; +import styles from '../../../styles/styles'; +import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import LocalePicker from '../../../components/LocalePicker'; + +const TermsAndLicensesFooter = () => ( + + + + +); + +TermsAndLicensesFooter.displayName = 'TermsAndLicensesFooter'; + +export default TermsAndLicensesFooter; diff --git a/src/pages/signin/TermsAndLicenses/index.android.js b/src/pages/signin/TermsAndLicenses/index.android.js index 9d548108120a..468a1ce40427 100644 --- a/src/pages/signin/TermsAndLicenses/index.android.js +++ b/src/pages/signin/TermsAndLicenses/index.android.js @@ -6,8 +6,7 @@ import TextLink from '../../../components/TextLink'; import withLocalize, { withLocalizePropTypes, } from '../../../components/withLocalize'; -import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../components/LocalePicker'; +import TermsAndLicensesFooter from './TermsAndLicensesFooter'; const TermsAndLicenses = ({translate}) => ( @@ -58,15 +57,11 @@ const TermsAndLicenses = ({translate}) => ( . - - - - + ); TermsAndLicenses.propTypes = {...withLocalizePropTypes}; +TermsAndLicenses.displayName = 'TermsAndLicenses'; export default withLocalize(TermsAndLicenses); diff --git a/src/pages/signin/TermsAndLicenses/index.ios.js b/src/pages/signin/TermsAndLicenses/index.ios.js index bc1208ce9411..281c7f39f88a 100644 --- a/src/pages/signin/TermsAndLicenses/index.ios.js +++ b/src/pages/signin/TermsAndLicenses/index.ios.js @@ -6,8 +6,7 @@ import TextLink from '../../../components/TextLink'; import withLocalize, { withLocalizePropTypes, } from '../../../components/withLocalize'; -import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../components/LocalePicker'; +import TermsAndLicensesFooter from './TermsAndLicensesFooter'; const TermsAndLicenses = ({translate}) => ( @@ -64,15 +63,11 @@ const TermsAndLicenses = ({translate}) => ( . - - - - + ); TermsAndLicenses.propTypes = {...withLocalizePropTypes}; +TermsAndLicenses.displayName = 'TermsAndLicenses'; export default withLocalize(TermsAndLicenses); diff --git a/src/pages/signin/TermsAndLicenses/index.js b/src/pages/signin/TermsAndLicenses/index.js index d2af1e6ea64a..33c8d1936612 100755 --- a/src/pages/signin/TermsAndLicenses/index.js +++ b/src/pages/signin/TermsAndLicenses/index.js @@ -6,8 +6,7 @@ import TextLink from '../../../components/TextLink'; import withLocalize, { withLocalizePropTypes, } from '../../../components/withLocalize'; -import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../components/LocalePicker'; +import TermsAndLicensesFooter from './TermsAndLicensesFooter'; const TermsAndLicenses = ({translate}) => ( @@ -43,13 +42,11 @@ const TermsAndLicenses = ({translate}) => ( . - - - - + ); TermsAndLicenses.propTypes = {...withLocalizePropTypes}; +TermsAndLicenses.displayName = 'TermsAndLicenses'; export default withLocalize(TermsAndLicenses); From d79bca9d300c78e22c9e5644e1f327e29db6ef46 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Tue, 31 Aug 2021 14:52:58 -0700 Subject: [PATCH 3/5] Get rid of unnecessary platform-split files --- .../index.android.js => TermsAndLicenses.js} | 25 ++++--- .../TermsAndLicensesFooter.js | 16 ---- .../signin/TermsAndLicenses/index.ios.js | 73 ------------------- src/pages/signin/TermsAndLicenses/index.js | 52 ------------- 4 files changed, 14 insertions(+), 152 deletions(-) rename src/pages/signin/{TermsAndLicenses/index.android.js => TermsAndLicenses.js} (75%) delete mode 100644 src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js delete mode 100644 src/pages/signin/TermsAndLicenses/index.ios.js delete mode 100755 src/pages/signin/TermsAndLicenses/index.js diff --git a/src/pages/signin/TermsAndLicenses/index.android.js b/src/pages/signin/TermsAndLicenses.js similarity index 75% rename from src/pages/signin/TermsAndLicenses/index.android.js rename to src/pages/signin/TermsAndLicenses.js index 468a1ce40427..a194ae98d3ae 100644 --- a/src/pages/signin/TermsAndLicenses/index.android.js +++ b/src/pages/signin/TermsAndLicenses.js @@ -1,15 +1,15 @@ import React from 'react'; -import {Text, View} from 'react-native'; -import styles from '../../../styles/styles'; -import CONST from '../../../CONST'; -import TextLink from '../../../components/TextLink'; -import withLocalize, { - withLocalizePropTypes, -} from '../../../components/withLocalize'; -import TermsAndLicensesFooter from './TermsAndLicensesFooter'; +import {View} from 'react-native'; +import styles from '../../styles/styles'; +import CONST from '../../CONST'; +import Text from '../../components/Text'; +import TextLink from '../../components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; +import LogoWordmark from '../../../assets/images/expensify-wordmark.svg'; +import LocalePicker from '../../components/LocalePicker'; const TermsAndLicenses = ({translate}) => ( - + <> ( . - - + + + + + ); TermsAndLicenses.propTypes = {...withLocalizePropTypes}; diff --git a/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js b/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js deleted file mode 100644 index f454cd1cdb79..000000000000 --- a/src/pages/signin/TermsAndLicenses/TermsAndLicensesFooter.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import {View} from 'react-native'; -import styles from '../../../styles/styles'; -import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; -import LocalePicker from '../../../components/LocalePicker'; - -const TermsAndLicensesFooter = () => ( - - - - -); - -TermsAndLicensesFooter.displayName = 'TermsAndLicensesFooter'; - -export default TermsAndLicensesFooter; diff --git a/src/pages/signin/TermsAndLicenses/index.ios.js b/src/pages/signin/TermsAndLicenses/index.ios.js deleted file mode 100644 index 281c7f39f88a..000000000000 --- a/src/pages/signin/TermsAndLicenses/index.ios.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react'; -import {Text, View} from 'react-native'; -import styles from '../../../styles/styles'; -import CONST from '../../../CONST'; -import TextLink from '../../../components/TextLink'; -import withLocalize, { - withLocalizePropTypes, -} from '../../../components/withLocalize'; -import TermsAndLicensesFooter from './TermsAndLicensesFooter'; - -const TermsAndLicenses = ({translate}) => ( - - - - - {translate('termsOfUse.phrase1')} - - - {' '} - {translate('termsOfUse.phrase2')} - {' '} - - - {translate('termsOfUse.phrase3')} - - - {' '} - {translate('termsOfUse.phrase4')} - - - . - - - - {translate('termsOfUse.phrase5')} - {' '} - - - - {translate('termsOfUse.phrase6')} - {' '} - - - {translate('termsOfUse.phrase7')} - - . - - - - -); - -TermsAndLicenses.propTypes = {...withLocalizePropTypes}; -TermsAndLicenses.displayName = 'TermsAndLicenses'; - -export default withLocalize(TermsAndLicenses); diff --git a/src/pages/signin/TermsAndLicenses/index.js b/src/pages/signin/TermsAndLicenses/index.js deleted file mode 100755 index 33c8d1936612..000000000000 --- a/src/pages/signin/TermsAndLicenses/index.js +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import {Text, View} from 'react-native'; -import styles from '../../../styles/styles'; -import CONST from '../../../CONST'; -import TextLink from '../../../components/TextLink'; -import withLocalize, { - withLocalizePropTypes, -} from '../../../components/withLocalize'; -import TermsAndLicensesFooter from './TermsAndLicensesFooter'; - -const TermsAndLicenses = ({translate}) => ( - - - {translate('termsOfUse.phrase1')} - {' '} - - {translate('termsOfUse.phrase2')} - - {' '} - {translate('termsOfUse.phrase3')} - {' '} - - {translate('termsOfUse.phrase4')} - - . - {'\n'} - {translate('termsOfUse.phrase5')} - {' '} - {translate('termsOfUse.phrase6')} - {' '} - - {translate('termsOfUse.phrase7')} - - . - - - -); - -TermsAndLicenses.propTypes = {...withLocalizePropTypes}; -TermsAndLicenses.displayName = 'TermsAndLicenses'; - -export default withLocalize(TermsAndLicenses); From e2f157b019c4ceb0a4dc105646137cb57dc37c6f Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Tue, 31 Aug 2021 15:01:29 -0700 Subject: [PATCH 4/5] Get rid of unnecessary one-off styles --- src/pages/signin/TermsAndLicenses.js | 18 +++++++++--------- src/styles/styles.js | 21 ++++++--------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/pages/signin/TermsAndLicenses.js b/src/pages/signin/TermsAndLicenses.js index a194ae98d3ae..8cfd5df12a7d 100644 --- a/src/pages/signin/TermsAndLicenses.js +++ b/src/pages/signin/TermsAndLicenses.js @@ -19,43 +19,43 @@ const TermsAndLicenses = ({translate}) => ( styles.alignItemsCenter, ]} > - + {translate('termsOfUse.phrase1')} {' '} {translate('termsOfUse.phrase2')} {' '} - + {translate('termsOfUse.phrase3')} {' '} {translate('termsOfUse.phrase4')} - . - + . + {translate('termsOfUse.phrase5')} {' '} - + {translate('termsOfUse.phrase6')} {' '} {translate('termsOfUse.phrase7')} - . + . diff --git a/src/styles/styles.js b/src/styles/styles.js index 2691418ccb39..0b9bbc829e9a 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -113,6 +113,12 @@ const styles = { lineHeight: 14, }, + textExtraSmallSupporting: { + color: themeColors.textSupporting, + fontFamily: fontFamily.GTA, + fontSize: variables.fontSizeExtraSmall, + }, + textLarge: { fontSize: variables.fontSizeLarge, }, @@ -730,21 +736,6 @@ const styles = { ...wordBreak.breakWord, }, - loginTermsText: { - color: themeColors.textSupporting, - fontFamily: fontFamily.GTA, - fontSize: variables.fontSizeExtraSmall, - }, - - termsLink: { - color: themeColors.link, - }, - - termsLinkNative: { - color: themeColors.link, - margin: 0, - }, - // Sidebar Styles sidebar: { backgroundColor: themeColors.sidebar, From 2b7fb558ef99d4f63fcbdfeaf957ecc4a63f26f8 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Tue, 31 Aug 2021 15:51:27 -0700 Subject: [PATCH 5/5] Get rid of unnecessary platform-split SignInPageLayout --- src/pages/signin/SignInPageLayout/index.native.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 src/pages/signin/SignInPageLayout/index.native.js diff --git a/src/pages/signin/SignInPageLayout/index.native.js b/src/pages/signin/SignInPageLayout/index.native.js deleted file mode 100644 index 775b3cd9fc53..000000000000 --- a/src/pages/signin/SignInPageLayout/index.native.js +++ /dev/null @@ -1,3 +0,0 @@ -import SignInPageLayoutNarrow from './SignInPageLayoutNarrow'; - -export default SignInPageLayoutNarrow;