From b548a3e50923e0eac84df0735176be7c91c8d78c Mon Sep 17 00:00:00 2001 From: David Bondy Date: Thu, 4 May 2023 15:41:56 -0600 Subject: [PATCH 01/19] change LHN header to Expensify --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 7b45cca7cce8..948779a63942 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -295,7 +295,7 @@ export default { newChat: 'New chat', newGroup: 'New group', newRoom: 'New room', - headerChat: 'Chats', + headerChat: 'Expensify', buttonSearch: 'Search', buttonMySettings: 'My settings', fabNewChat: 'New chat (Floating action)', diff --git a/src/languages/es.js b/src/languages/es.js index 001687c1df06..6daf7cbbc901 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -294,7 +294,7 @@ export default { newChat: 'Nuevo chat', newGroup: 'Nuevo grupo', newRoom: 'Nueva sala de chat', - headerChat: 'Chats', + headerChat: 'Expensify', buttonSearch: 'Buscar', buttonMySettings: 'Mi configuraciĆ³n', fabNewChat: 'Nuevo chat', From 3b461e23899c6ee5b1cefc5caab4d51ab0218f87 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 5 May 2023 15:30:58 -0600 Subject: [PATCH 02/19] update the header component so it can accept react components (or anything really) to be rendered inside the header --- src/components/Header.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/Header.js b/src/components/Header.js index 01752e8e0740..c97a948ca0ce 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -8,7 +8,10 @@ import EnvironmentBadge from './EnvironmentBadge'; const propTypes = { /** Title of the Header */ - title: PropTypes.string.isRequired, + title: PropTypes.string, + + /** Things to be rendered inside the header*/ + children: PropTypes.node, /** Subtitle of the header */ subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), @@ -22,6 +25,8 @@ const propTypes = { }; const defaultProps = { + title: '', + children: '', shouldShowEnvironmentBadge: false, subtitle: '', textStyles: [], @@ -29,9 +34,9 @@ const defaultProps = { const Header = props => ( - - {props.title} - + {!_.isEmpty(props.children) + ? props.children + : {props.title}} {/* If there's no subtitle then display a fragment to avoid an empty space which moves the main title */} {_.isString(props.subtitle) ? Boolean(props.subtitle) && {props.subtitle} From 735725c87039a142577550ea64788fdd9c93a586 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 5 May 2023 15:31:28 -0600 Subject: [PATCH 03/19] import the wordmark logo and render it in the header --- src/pages/home/sidebar/SidebarLinks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 65329cebc1f4..77493c5151e1 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -31,6 +31,8 @@ import SidebarUtils from '../../../libs/SidebarUtils'; import reportPropTypes from '../../reportPropTypes'; import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; import LHNSkeletonView from '../../../components/LHNSkeletonView'; +import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import defaultTheme from '../../../styles/themes/default'; const propTypes = { /** Toggles the navigation menu open and closed */ @@ -159,6 +161,7 @@ class SidebarLinks extends React.Component { accessibilityRole="text" shouldShowEnvironmentBadge textStyles={[styles.textHeadline]} + children={} /> Date: Fri, 5 May 2023 16:13:54 -0600 Subject: [PATCH 04/19] fix style --- src/components/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Header.js b/src/components/Header.js index c97a948ca0ce..faff46ae1aa7 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -10,7 +10,7 @@ const propTypes = { /** Title of the Header */ title: PropTypes.string, - /** Things to be rendered inside the header*/ + /** Things to be rendered inside the header */ children: PropTypes.node, /** Subtitle of the header */ From 1fa9eedebf003bec3fe95b134e4fc887609c4dfc Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 5 May 2023 16:38:46 -0600 Subject: [PATCH 05/19] create new component for imageheader to properly use children to render content --- src/components/Header.js | 13 +++----- src/components/ImageHeader.js | 45 ++++++++++++++++++++++++++ src/pages/home/sidebar/SidebarLinks.js | 11 +++---- 3 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 src/components/ImageHeader.js diff --git a/src/components/Header.js b/src/components/Header.js index faff46ae1aa7..01752e8e0740 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -8,10 +8,7 @@ import EnvironmentBadge from './EnvironmentBadge'; const propTypes = { /** Title of the Header */ - title: PropTypes.string, - - /** Things to be rendered inside the header */ - children: PropTypes.node, + title: PropTypes.string.isRequired, /** Subtitle of the header */ subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), @@ -25,8 +22,6 @@ const propTypes = { }; const defaultProps = { - title: '', - children: '', shouldShowEnvironmentBadge: false, subtitle: '', textStyles: [], @@ -34,9 +29,9 @@ const defaultProps = { const Header = props => ( - {!_.isEmpty(props.children) - ? props.children - : {props.title}} + + {props.title} + {/* If there's no subtitle then display a fragment to avoid an empty space which moves the main title */} {_.isString(props.subtitle) ? Boolean(props.subtitle) && {props.subtitle} diff --git a/src/components/ImageHeader.js b/src/components/ImageHeader.js new file mode 100644 index 000000000000..8f086e1fecf5 --- /dev/null +++ b/src/components/ImageHeader.js @@ -0,0 +1,45 @@ +import React from 'react'; +import {View} from 'react-native'; +import PropTypes from 'prop-types'; +import _ from 'underscore'; +import styles from '../styles/styles'; +import EnvironmentBadge from './EnvironmentBadge'; + +const propTypes = { + children: PropTypes.node.isRequired, + + /** Subtitle of the header */ + subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), + + /** Should we show the environment badge (dev/stg)? */ + shouldShowEnvironmentBadge: PropTypes.bool, + + /** Additional text styles */ + // eslint-disable-next-line react/forbid-prop-types + textStyles: PropTypes.arrayOf(PropTypes.object), +}; + +const defaultProps = { + shouldShowEnvironmentBadge: false, + subtitle: '', + textStyles: [], +}; +const ImageHeader = props => ( + + + {props.children} + {/* If there's no subtitle then display a fragment to avoid an empty space which moves the main title */} + {_.isString(props.subtitle) + ? Boolean(props.subtitle) && {props.subtitle} + : props.subtitle} + + {props.shouldShowEnvironmentBadge && ( + + )} + +); + +ImageHeader.displayName = 'ImageHeader'; +ImageHeader.propTypes = propTypes; +ImageHeader.defaultProps = defaultProps; +export default ImageHeader; diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 77493c5151e1..a7ec9afa6f1c 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -14,7 +14,7 @@ import compose from '../../../libs/compose'; import Navigation from '../../../libs/Navigation/Navigation'; import ROUTES from '../../../ROUTES'; import Icon from '../../../components/Icon'; -import Header from '../../../components/Header'; +import ImageHeader from '../../../components/ImageHeader'; import * as Expensicons from '../../../components/Icon/Expensicons'; import AvatarWithIndicator from '../../../components/AvatarWithIndicator'; import Tooltip from '../../../components/Tooltip'; @@ -155,14 +155,13 @@ class SidebarLinks extends React.Component { ]} nativeID="drag-area" > -
} - /> + > + + Date: Fri, 5 May 2023 16:41:58 -0600 Subject: [PATCH 06/19] remove unused props --- src/components/ImageHeader.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/ImageHeader.js b/src/components/ImageHeader.js index 8f086e1fecf5..5c82006e392a 100644 --- a/src/components/ImageHeader.js +++ b/src/components/ImageHeader.js @@ -13,16 +13,11 @@ const propTypes = { /** Should we show the environment badge (dev/stg)? */ shouldShowEnvironmentBadge: PropTypes.bool, - - /** Additional text styles */ - // eslint-disable-next-line react/forbid-prop-types - textStyles: PropTypes.arrayOf(PropTypes.object), }; const defaultProps = { shouldShowEnvironmentBadge: false, subtitle: '', - textStyles: [], }; const ImageHeader = props => ( From 0bc7607bf37e760b83eaf954f3b149d272dfb6c6 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 5 May 2023 16:53:19 -0600 Subject: [PATCH 07/19] removing unneeded string --- src/languages/en.js | 1 - src/languages/es.js | 1 - src/pages/home/sidebar/SidebarLinks.js | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 948779a63942..9cbf6954b15e 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -295,7 +295,6 @@ export default { newChat: 'New chat', newGroup: 'New group', newRoom: 'New room', - headerChat: 'Expensify', buttonSearch: 'Search', buttonMySettings: 'My settings', fabNewChat: 'New chat (Floating action)', diff --git a/src/languages/es.js b/src/languages/es.js index 6daf7cbbc901..508555cba1a7 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -294,7 +294,6 @@ export default { newChat: 'Nuevo chat', newGroup: 'Nuevo grupo', newRoom: 'Nueva sala de chat', - headerChat: 'Expensify', buttonSearch: 'Buscar', buttonMySettings: 'Mi configuraciĆ³n', fabNewChat: 'Nuevo chat', diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index a7ec9afa6f1c..57f2df7b2c18 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -156,7 +156,7 @@ class SidebarLinks extends React.Component { nativeID="drag-area" > From 398546cb2709445448e9ac08915011c569a6ce64 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:43:56 -0600 Subject: [PATCH 08/19] remove unnecessary new component since we have a wordmark that we can update and use --- src/components/ImageHeader.js | 40 -------------------------- src/pages/home/sidebar/SidebarLinks.js | 15 ++++------ 2 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 src/components/ImageHeader.js diff --git a/src/components/ImageHeader.js b/src/components/ImageHeader.js deleted file mode 100644 index 5c82006e392a..000000000000 --- a/src/components/ImageHeader.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; -import styles from '../styles/styles'; -import EnvironmentBadge from './EnvironmentBadge'; - -const propTypes = { - children: PropTypes.node.isRequired, - - /** Subtitle of the header */ - subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), - - /** Should we show the environment badge (dev/stg)? */ - shouldShowEnvironmentBadge: PropTypes.bool, -}; - -const defaultProps = { - shouldShowEnvironmentBadge: false, - subtitle: '', -}; -const ImageHeader = props => ( - - - {props.children} - {/* If there's no subtitle then display a fragment to avoid an empty space which moves the main title */} - {_.isString(props.subtitle) - ? Boolean(props.subtitle) && {props.subtitle} - : props.subtitle} - - {props.shouldShowEnvironmentBadge && ( - - )} - -); - -ImageHeader.displayName = 'ImageHeader'; -ImageHeader.propTypes = propTypes; -ImageHeader.defaultProps = defaultProps; -export default ImageHeader; diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 57f2df7b2c18..6630aacd52c2 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -14,7 +14,6 @@ import compose from '../../../libs/compose'; import Navigation from '../../../libs/Navigation/Navigation'; import ROUTES from '../../../ROUTES'; import Icon from '../../../components/Icon'; -import ImageHeader from '../../../components/ImageHeader'; import * as Expensicons from '../../../components/Icon/Expensicons'; import AvatarWithIndicator from '../../../components/AvatarWithIndicator'; import Tooltip from '../../../components/Tooltip'; @@ -31,7 +30,7 @@ import SidebarUtils from '../../../libs/SidebarUtils'; import reportPropTypes from '../../reportPropTypes'; import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; import LHNSkeletonView from '../../../components/LHNSkeletonView'; -import LogoWordmark from '../../../../assets/images/expensify-wordmark.svg'; +import ExpensifyWordmark from '../../../components/ExpensifyWordmark'; import defaultTheme from '../../../styles/themes/default'; const propTypes = { @@ -155,13 +154,11 @@ class SidebarLinks extends React.Component { ]} nativeID="drag-area" > - - - + + + Date: Mon, 8 May 2023 15:47:54 -0600 Subject: [PATCH 09/19] remove in-svg styles so we can modify them via props --- assets/images/expensify-logo--dev.svg | 19 +++++++++---------- assets/images/expensify-logo--staging.svg | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/assets/images/expensify-logo--dev.svg b/assets/images/expensify-logo--dev.svg index 42a0f1d8e952..f68fafbad806 100644 --- a/assets/images/expensify-logo--dev.svg +++ b/assets/images/expensify-logo--dev.svg @@ -4,7 +4,6 @@ viewBox="0 0 162 34" style="enable-background:new 0 0 162 34;" xml:space="preserve"> @@ -16,22 +15,22 @@ - - - + + - - - - - + + - diff --git a/assets/images/expensify-logo--staging.svg b/assets/images/expensify-logo--staging.svg index 335c41a294e3..12b0b9bf6e79 100644 --- a/assets/images/expensify-logo--staging.svg +++ b/assets/images/expensify-logo--staging.svg @@ -4,7 +4,6 @@ viewBox="0 0 162 34" style="enable-background:new 0 0 162 34;" xml:space="preserve"> @@ -16,22 +15,22 @@ - - - + + - - - - - + + - From 9968ab733c64201273cc96e67a271930f3136d7b Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:48:31 -0600 Subject: [PATCH 10/19] update the wordmark component to accept more customization so it can be re-used in various places --- src/components/ExpensifyWordmark.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 11999dad22d2..489675cd8125 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -1,5 +1,6 @@ import React from 'react'; import {View} from 'react-native'; +import PropTypes from 'prop-types'; import ProductionLogo from '../../assets/images/expensify-wordmark.svg'; import DevLogo from '../../assets/images/expensify-logo--dev.svg'; import StagingLogo from '../../assets/images/expensify-logo--staging.svg'; @@ -16,6 +17,18 @@ import variables from '../styles/variables'; const propTypes = { ...environmentPropTypes, ...windowDimensionsPropTypes, + + /** The styles to apply for the View wrapping the svg */ + containerStyles: PropTypes.array, + + /** Fill color of the svg */ + color: PropTypes.string, +}; + + +const defaultProps = { + containerStyles: [], + color: themeColors.success, }; const logoComponents = { @@ -32,10 +45,10 @@ const ExpensifyWordmark = (props) => { - + ); From 8a14e2e514e63f6fff39adf0b63f60e5867764bc Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:49:10 -0600 Subject: [PATCH 11/19] fix typo --- src/components/ExpensifyWordmark.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 489675cd8125..0187d0905189 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -56,6 +56,7 @@ const ExpensifyWordmark = (props) => { ExpensifyWordmark.displayName = 'ExpensifyWordmark'; ExpensifyWordmark.propTypes = propTypes; +ExpensifyWordmark.defaultProps = defaultProps; export default compose( withEnvironment, withWindowDimensions, From 4843a61b63e1870fead3959ce42db561f46446f6 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:49:58 -0600 Subject: [PATCH 12/19] update usage of wordmark component based on new api --- src/pages/signin/SignInPageLayout/SignInPageContent.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/signin/SignInPageLayout/SignInPageContent.js b/src/pages/signin/SignInPageLayout/SignInPageContent.js index 9991cac126c2..3e0bdb6d3421 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageContent.js +++ b/src/pages/signin/SignInPageLayout/SignInPageContent.js @@ -13,6 +13,7 @@ import OfflineIndicator from '../../../components/OfflineIndicator'; import SignInHeroImage from '../SignInHeroImage'; import * as StyleUtils from '../../../styles/StyleUtils'; import variables from '../../../styles/variables'; +import withEnvironment, {environmentPropTypes} from '../../../components/withEnvironment'; const propTypes = { /** The children to show inside the layout */ @@ -34,6 +35,7 @@ const propTypes = { ...withLocalizePropTypes, ...windowDimensionsPropTypes, + ...environmentPropTypes, }; const SignInPageContent = props => ( @@ -49,7 +51,9 @@ const SignInPageContent = props => ( - + {(props.shouldShowWelcomeHeader && props.welcomeHeader) ? ( @@ -92,4 +96,5 @@ export default compose( withWindowDimensions, withLocalize, withSafeAreaInsets, + withEnvironment, )(SignInPageContent); From 8920c49e498f90dfa8db1173bc98c397ec4d6015 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:55:45 -0600 Subject: [PATCH 13/19] linter fixes --- src/components/ExpensifyWordmark.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 0187d0905189..109af767341b 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -10,7 +10,6 @@ import withEnvironment, {environmentPropTypes} from './withEnvironment'; import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; import compose from '../libs/compose'; import themeColors from '../styles/themes/default'; -import styles from '../styles/styles'; import * as StyleUtils from '../styles/StyleUtils'; import variables from '../styles/variables'; @@ -19,13 +18,12 @@ const propTypes = { ...windowDimensionsPropTypes, /** The styles to apply for the View wrapping the svg */ - containerStyles: PropTypes.array, + containerStyles: PropTypes.arrayOf(PropTypes.object), /** Fill color of the svg */ color: PropTypes.string, }; - const defaultProps = { containerStyles: [], color: themeColors.success, From 64de69bae63e91dff1ccc3dab8ff8e96daacd85e Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 15:59:16 -0600 Subject: [PATCH 14/19] fixing proptypes b/c linter complains --- src/components/ExpensifyWordmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 109af767341b..1bcc02e1a82d 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -18,7 +18,7 @@ const propTypes = { ...windowDimensionsPropTypes, /** The styles to apply for the View wrapping the svg */ - containerStyles: PropTypes.arrayOf(PropTypes.object), + containerStyles: PropTypes.arrayOf(PropTypes.objectOf(PropTypes.string)), /** Fill color of the svg */ color: PropTypes.string, From 2d1eb9b90a6b8b120a91af484c79902bd9d98d13 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 16:07:17 -0600 Subject: [PATCH 15/19] remove the unneeded badge component from header component --- src/components/Header.js | 7 ------- src/stories/Header.stories.js | 1 - 2 files changed, 8 deletions(-) diff --git a/src/components/Header.js b/src/components/Header.js index 01752e8e0740..7016631b95a8 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -13,16 +13,12 @@ const propTypes = { /** Subtitle of the header */ subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), - /** Should we show the environment badge (dev/stg)? */ - shouldShowEnvironmentBadge: PropTypes.bool, - /** Additional text styles */ // eslint-disable-next-line react/forbid-prop-types textStyles: PropTypes.arrayOf(PropTypes.object), }; const defaultProps = { - shouldShowEnvironmentBadge: false, subtitle: '', textStyles: [], }; @@ -37,9 +33,6 @@ const Header = props => ( ? Boolean(props.subtitle) && {props.subtitle} : props.subtitle} - {props.shouldShowEnvironmentBadge && ( - - )} ); diff --git a/src/stories/Header.stories.js b/src/stories/Header.stories.js index 09c13b54d7d6..1cdc1d7c9c37 100644 --- a/src/stories/Header.stories.js +++ b/src/stories/Header.stories.js @@ -19,7 +19,6 @@ const Template = args =>
; const Default = Template.bind({}); Default.args = { title: 'Chats', - shouldShowEnvironmentBadge: true, }; export default story; From 8d25d70a66956699794d3345d7d548c5d1fd85e1 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 16:07:28 -0600 Subject: [PATCH 16/19] include const lib --- src/pages/signin/SignInPageLayout/SignInPageContent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/signin/SignInPageLayout/SignInPageContent.js b/src/pages/signin/SignInPageLayout/SignInPageContent.js index 3e0bdb6d3421..9904e478f4b0 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageContent.js +++ b/src/pages/signin/SignInPageLayout/SignInPageContent.js @@ -14,6 +14,7 @@ import SignInHeroImage from '../SignInHeroImage'; import * as StyleUtils from '../../../styles/StyleUtils'; import variables from '../../../styles/variables'; import withEnvironment, {environmentPropTypes} from '../../../components/withEnvironment'; +import CONST from '../../../CONST'; const propTypes = { /** The children to show inside the layout */ From b4aee41a456f53fa701982a7423cfcb2daf88eb0 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 16:11:07 -0600 Subject: [PATCH 17/19] remove unneeded import --- src/components/Header.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Header.js b/src/components/Header.js index 7016631b95a8..77dd4e60f5a1 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; import styles from '../styles/styles'; import Text from './Text'; -import EnvironmentBadge from './EnvironmentBadge'; const propTypes = { /** Title of the Header */ From 24c325926bed24491cf50f59e2aa2cbb4ef297af Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 8 May 2023 16:21:06 -0600 Subject: [PATCH 18/19] linter be damned this is what works --- src/components/ExpensifyWordmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 1bcc02e1a82d..109af767341b 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -18,7 +18,7 @@ const propTypes = { ...windowDimensionsPropTypes, /** The styles to apply for the View wrapping the svg */ - containerStyles: PropTypes.arrayOf(PropTypes.objectOf(PropTypes.string)), + containerStyles: PropTypes.arrayOf(PropTypes.object), /** Fill color of the svg */ color: PropTypes.string, From a29631b947530833f4722adf56fa9e267850176b Mon Sep 17 00:00:00 2001 From: David Bondy Date: Tue, 9 May 2023 13:52:19 -0600 Subject: [PATCH 19/19] import style props to appease linter --- src/components/ExpensifyWordmark.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index 109af767341b..942ee58f9c8b 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -12,13 +12,14 @@ import compose from '../libs/compose'; import themeColors from '../styles/themes/default'; import * as StyleUtils from '../styles/StyleUtils'; import variables from '../styles/variables'; +import stylePropTypes from '../styles/stylePropTypes'; const propTypes = { ...environmentPropTypes, ...windowDimensionsPropTypes, /** The styles to apply for the View wrapping the svg */ - containerStyles: PropTypes.arrayOf(PropTypes.object), + containerStyles: stylePropTypes, /** Fill color of the svg */ color: PropTypes.string,