From 18b15c095fc848e207476996ad7e47f46a458439 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Tue, 1 Jun 2021 16:27:20 +0200 Subject: [PATCH 1/3] Add ability to disable optionRow interactivity --- src/components/IOUConfirmationList.js | 1 + src/components/OptionsList.js | 5 +++++ src/pages/home/sidebar/OptionRow.js | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js index a7ef2f9ac307..0dcecf63a326 100755 --- a/src/components/IOUConfirmationList.js +++ b/src/components/IOUConfirmationList.js @@ -252,6 +252,7 @@ class IOUConfirmationList extends Component { }]} sections={this.getSections()} disableArrowKeysActions + disableRowInteractivity hideAdditionalOptionStates forceTextUnreadStyle canSelectMultipleOptions={this.props.hasMultipleParticipants} diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 96c06425fbb9..9f21639d82bd 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -74,6 +74,9 @@ const propTypes = { /** Toggle between compact and default view of the option */ optionMode: PropTypes.oneOf(['compact', 'default']), + + /** Whether to disable the interactivity of the list's option row(s) */ + disableRowInteractivity: PropTypes.bool, }; const defaultProps = { @@ -94,6 +97,7 @@ const defaultProps = { innerRef: null, showTitleTooltip: false, optionMode: undefined, + disableRowInteractivity: false, }; class OptionsList extends Component { @@ -170,6 +174,7 @@ class OptionsList extends Component { showSelectedState={this.props.canSelectMultipleOptions} hideAdditionalOptionStates={this.props.hideAdditionalOptionStates} forceTextUnreadStyle={this.props.forceTextUnreadStyle} + disableRowInteractivity={this.props.disableRowInteractivity} /> ); } diff --git a/src/pages/home/sidebar/OptionRow.js b/src/pages/home/sidebar/OptionRow.js index f8e282bf8f6f..320d40bef503 100644 --- a/src/pages/home/sidebar/OptionRow.js +++ b/src/pages/home/sidebar/OptionRow.js @@ -54,8 +54,11 @@ const propTypes = { /** Toggle between compact and default view */ mode: PropTypes.oneOf(['compact', 'default']), - // Whether this option should be disabled + /** Whether this option should be disabled */ isDisabled: PropTypes.bool, + + /** Whether to disable the interactivity of this row */ + disableRowInteractivity: PropTypes.bool, }; const defaultProps = { @@ -70,6 +73,7 @@ const defaultProps = { onSelectRow: null, isDisabled: false, optionIsFocused: false, + disableRowInteractivity: false, }; const OptionRow = ({ @@ -85,6 +89,7 @@ const OptionRow = ({ showTitleTooltip, isDisabled, mode, + disableRowInteractivity, }) => { const textStyle = optionIsFocused ? styles.sidebarLinkActiveText @@ -129,6 +134,7 @@ const OptionRow = ({ {hovered => ( onSelectRow(option)} + disabled={disableRowInteractivity} activeOpacity={0.8} style={[ styles.flexRow, From cfa95a9ece8a811f46ee314ae0a938a65b63faec Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Wed, 2 Jun 2021 15:51:39 +0200 Subject: [PATCH 2/3] Remove merge conflict --- src/pages/home/sidebar/OptionRow.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/home/sidebar/OptionRow.js b/src/pages/home/sidebar/OptionRow.js index 93b1209a367d..c75b7dd5e2f1 100644 --- a/src/pages/home/sidebar/OptionRow.js +++ b/src/pages/home/sidebar/OptionRow.js @@ -93,11 +93,8 @@ const OptionRow = ({ showTitleTooltip, isDisabled, mode, -<<<<<<< HEAD disableRowInteractivity, -======= toLocalPhone, ->>>>>>> 4d3eff3da347fa1c6def3d19c6e986349c03c4e2 }) => { const textStyle = optionIsFocused ? styles.sidebarLinkActiveText From 3b9902c31cd3814a645d3aef8d002f5777336d5d Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 3 Jun 2021 14:28:58 +0000 Subject: [PATCH 3/3] Update version to 1.0.61-9 --- android/app/build.gradle | 4 ++-- ios/ExpensifyCash/Info.plist | 2 +- ios/ExpensifyCashTests/Info.plist | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 04da8a7e2859..497fa03c8de8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -148,8 +148,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001006108 - versionName "1.0.61-8" + versionCode 1001006109 + versionName "1.0.61-9" } splits { abi { diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index 4ba5a81addaa..9d5e01946ffe 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 1.0.61.8 + 1.0.61.9 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/ExpensifyCashTests/Info.plist b/ios/ExpensifyCashTests/Info.plist index 0c02bf065f66..31ec8d932242 100644 --- a/ios/ExpensifyCashTests/Info.plist +++ b/ios/ExpensifyCashTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.0.61.8 + 1.0.61.9 diff --git a/package-lock.json b/package-lock.json index a6fac51a7bff..3c7f4ed31dc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.61-8", + "version": "1.0.61-9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 86741374fcd0..a952c96df60f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.61-8", + "version": "1.0.61-9", "author": "Expensify, Inc.", "homepage": "https://expensify.cash", "description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",