From 3f8ba25fe78de308350875f628061723f21fa8e7 Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Wed, 13 Sep 2023 12:29:28 +0700 Subject: [PATCH 1/9] Web - The horizontal line separating the header and the messages --- src/pages/home/report/ReportActionsList.js | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index 7f897ee825fb..4b4a75362b7f 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -109,7 +109,7 @@ function ReportActionsList({ const {isOffline} = useNetwork(); const opacity = useSharedValue(0); const userActiveSince = useRef(null); - const currentUnreadMarker = useRef(null); + const [currentUnreadMarker, setCurrentUnreadMarker] = useState(null); const scrollingVerticalOffset = useRef(0); const readActionSkipped = useRef(false); const reportActionSize = useRef(sortedReportActions.length); @@ -152,12 +152,12 @@ function ReportActionsList({ } } - if (currentUnreadMarker.current || reportActionSize.current === sortedReportActions.length) { + if (currentUnreadMarker || reportActionSize.current === sortedReportActions.length) { return; } reportActionSize.current = sortedReportActions.length; - currentUnreadMarker.current = null; + setCurrentUnreadMarker(null); // eslint-disable-next-line react-hooks/exhaustive-deps }, [sortedReportActions.length, report.reportID]); @@ -169,7 +169,7 @@ function ReportActionsList({ } // Clearing the current unread marker so that it can be recalculated - currentUnreadMarker.current = null; + setCurrentUnreadMarker(null); setMessageManuallyMarked({read: true}); // We only care when a new lastReadTime is set in the report @@ -180,7 +180,7 @@ function ReportActionsList({ * Show/hide the new floating message counter when user is scrolling back/forth in the history of messages. */ const handleUnreadFloatingButton = () => { - if (scrollingVerticalOffset.current > VERTICAL_OFFSET_THRESHOLD && !isFloatingMessageCounterVisible && !!currentUnreadMarker.current) { + if (scrollingVerticalOffset.current > VERTICAL_OFFSET_THRESHOLD && !isFloatingMessageCounterVisible && !!currentUnreadMarker) { setIsFloatingMessageCounterVisible(true); } @@ -216,6 +216,14 @@ function ReportActionsList({ return Math.ceil(availableHeight / minimumReportActionHeight); }, [windowHeight]); + /** + * Thread's divider line should hide when the first chat in the thread is marked as unread. + * This is so that it will not be conflicting with header's separator line. + */ + const shouldHideThreadDividerLine = useMemo(() => { + return sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker + }, [sortedReportActions, currentUnreadMarker]) + /** * @param {Object} args * @param {Number} args.index @@ -225,7 +233,7 @@ function ReportActionsList({ ({item: reportAction, index}) => { let shouldDisplayNewMarker = false; - if (!currentUnreadMarker.current) { + if (!currentUnreadMarker) { const nextMessage = sortedReportActions[index + 1]; const isCurrentMessageUnread = isMessageUnread(reportAction, report.lastReadTime); shouldDisplayNewMarker = isCurrentMessageUnread && !isMessageUnread(nextMessage, report.lastReadTime); @@ -235,18 +243,17 @@ function ReportActionsList({ } const canDisplayMarker = scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD ? reportAction.created < userActiveSince.current : true; - if (!currentUnreadMarker.current && shouldDisplayNewMarker && canDisplayMarker) { - currentUnreadMarker.current = reportAction.reportActionID; + if (!currentUnreadMarker && shouldDisplayNewMarker && canDisplayMarker) { + setCurrentUnreadMarker(reportAction.reportActionID); } } else { - shouldDisplayNewMarker = reportAction.reportActionID === currentUnreadMarker.current; + shouldDisplayNewMarker = reportAction.reportActionID === currentUnreadMarker; } const shouldDisplayParentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && ReportUtils.isChatThread(report) && !ReportActionsUtils.isTransactionThread(ReportActionsUtils.getParentReportAction(report)); - const shouldHideThreadDividerLine = sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker.current; return shouldDisplayParentAction ? ( ); }, - [report, hasOutstandingIOU, sortedReportActions, mostRecentIOUReportActionID, messageManuallyMarked], + [report, hasOutstandingIOU, sortedReportActions, mostRecentIOUReportActionID, messageManuallyMarked, shouldHideThreadDividerLine], ); // Native mobile does not render updates flatlist the changes even though component did update called. // To notify there something changes we can use extraData prop to flatlist - const extraData = [isSmallScreenWidth ? currentUnreadMarker.current : undefined, ReportUtils.isArchivedRoom(report)]; + const extraData = [isSmallScreenWidth ? currentUnreadMarker : undefined, ReportUtils.isArchivedRoom(report)]; const hideComposer = ReportUtils.shouldDisableWriteActions(report); const shouldShowReportRecipientLocalTime = ReportUtils.canShowReportRecipientLocalTime(personalDetailsList, report, currentUserPersonalDetails.accountID) && !isComposerFullSize; return ( <> From bf39390bf2f5bb01e0639c870c660d9ba279e041 Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Thu, 14 Sep 2023 11:11:08 +0700 Subject: [PATCH 2/9] Add animated spacer view --- .../ReportActionItem/MoneyReportView.js | 3 +- .../ReportActionItem/MoneyRequestView.js | 3 +- src/components/ReportActionItem/TaskView.js | 3 +- src/components/SpacerView.js | 48 +++++++++++++++++++ src/styles/styles.js | 2 - 5 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 src/components/SpacerView.js diff --git a/src/components/ReportActionItem/MoneyReportView.js b/src/components/ReportActionItem/MoneyReportView.js index 5b4eaaa37884..520c382cb920 100644 --- a/src/components/ReportActionItem/MoneyReportView.js +++ b/src/components/ReportActionItem/MoneyReportView.js @@ -14,6 +14,7 @@ import variables from '../../styles/variables'; import * as CurrencyUtils from '../../libs/CurrencyUtils'; import EmptyStateBackgroundImage from '../../../assets/images/empty-state_background-fade.png'; import useLocalize from '../../hooks/useLocalize'; +import SpacerView from '../SpacerView' const propTypes = { /** The report currently being looked at */ @@ -65,7 +66,7 @@ function MoneyReportView(props) { - {props.shouldShowHorizontalRule && } + ); } diff --git a/src/components/ReportActionItem/MoneyRequestView.js b/src/components/ReportActionItem/MoneyRequestView.js index a9264812b99d..18f8bfe407ba 100644 --- a/src/components/ReportActionItem/MoneyRequestView.js +++ b/src/components/ReportActionItem/MoneyRequestView.js @@ -27,6 +27,7 @@ import Image from '../Image'; import ReportActionItemImage from './ReportActionItemImage'; import * as TransactionUtils from '../../libs/TransactionUtils'; import OfflineWithFeedback from '../OfflineWithFeedback'; +import SpacerView from '../SpacerView' const propTypes = { /** The report currently being looked at */ @@ -165,7 +166,7 @@ function MoneyRequestView({report, parentReport, shouldShowHorizontalRule, trans subtitleTextStyle={styles.textLabelError} /> - {shouldShowHorizontalRule && } + ); } diff --git a/src/components/ReportActionItem/TaskView.js b/src/components/ReportActionItem/TaskView.js index 965c3120d51b..c64de6ed9164 100644 --- a/src/components/ReportActionItem/TaskView.js +++ b/src/components/ReportActionItem/TaskView.js @@ -27,6 +27,7 @@ import getButtonState from '../../libs/getButtonState'; import PressableWithSecondaryInteraction from '../PressableWithSecondaryInteraction'; import * as Session from '../../libs/actions/Session'; import * as Expensicons from '../Icon/Expensicons'; +import SpacerView from '../SpacerView' const propTypes = { /** The report currently being looked at */ @@ -157,7 +158,7 @@ function TaskView(props) { /> )} - {props.shouldShowHorizontalRule && } + ); } diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js new file mode 100644 index 000000000000..4818d6afa4df --- /dev/null +++ b/src/components/SpacerView.js @@ -0,0 +1,48 @@ +import React from 'react'; +import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; +import PropTypes from 'prop-types'; +import * as StyleUtils from '../styles/StyleUtils'; + +const propTypes = { + /** + * Should we show the spacer + */ + shouldShow: PropTypes.bool.isRequired, + + /** + * Array of style objects + * @default [] + */ + // eslint-disable-next-line react/forbid-prop-types + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), +}; + +const defaultProps = { + style: [], +}; + +function SpacerView(props) { + const marginVertical = useSharedValue(8) + const borderBottomWidth = useSharedValue(1) + const animatedStyles = useAnimatedStyle(() => ({ + marginVertical: marginVertical.value, + borderBottomWidth: borderBottomWidth.value, + })); + + React.useEffect(() => { + if (props.shouldShow) { + marginVertical.value = withTiming(8, {duration: 300}); + borderBottomWidth.value = withTiming(1, {duration: 300}); + } else { + marginVertical.value = withTiming(0, {duration: 300}); + borderBottomWidth.value = withTiming(0, {duration: 300}); + } + }, [props.shouldShow]); + + return ; +} + +SpacerView.displayName = 'SpacerView'; +SpacerView.propTypes = propTypes; +SpacerView.defaultProps = defaultProps; +export default SpacerView; diff --git a/src/styles/styles.js b/src/styles/styles.js index e81e03726c78..5b0552243773 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -3606,10 +3606,8 @@ const styles = (theme) => ({ }, reportHorizontalRule: { - borderBottomWidth: 1, borderColor: theme.border, ...spacing.mh5, - ...spacing.mv2, }, assigneeTextStyle: { From 63e7e85412376e78315aac8aa64291459326518c Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Wed, 13 Sep 2023 19:10:00 +0700 Subject: [PATCH 3/9] Fix lint issues --- src/components/ReportActionItem/MoneyRequestView.js | 2 +- src/components/SpacerView.js | 2 +- src/pages/home/report/ReportActionsList.js | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.js b/src/components/ReportActionItem/MoneyRequestView.js index 18f8bfe407ba..a0618345d01d 100644 --- a/src/components/ReportActionItem/MoneyRequestView.js +++ b/src/components/ReportActionItem/MoneyRequestView.js @@ -166,7 +166,7 @@ function MoneyRequestView({report, parentReport, shouldShowHorizontalRule, trans subtitleTextStyle={styles.textLabelError} /> - + ); } diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index 4818d6afa4df..947f0deec916 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -37,7 +37,7 @@ function SpacerView(props) { marginVertical.value = withTiming(0, {duration: 300}); borderBottomWidth.value = withTiming(0, {duration: 300}); } - }, [props.shouldShow]); + }, [props.shouldShow, borderBottomWidth, marginVertical]); return ; } diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index 4b4a75362b7f..ac9c03971727 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -220,9 +220,7 @@ function ReportActionsList({ * Thread's divider line should hide when the first chat in the thread is marked as unread. * This is so that it will not be conflicting with header's separator line. */ - const shouldHideThreadDividerLine = useMemo(() => { - return sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker - }, [sortedReportActions, currentUnreadMarker]) + const shouldHideThreadDividerLine = useMemo(() => (sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker), [sortedReportActions, currentUnreadMarker]) /** * @param {Object} args @@ -279,7 +277,7 @@ function ReportActionsList({ /> ); }, - [report, hasOutstandingIOU, sortedReportActions, mostRecentIOUReportActionID, messageManuallyMarked, shouldHideThreadDividerLine], + [report, hasOutstandingIOU, sortedReportActions, mostRecentIOUReportActionID, messageManuallyMarked, shouldHideThreadDividerLine, currentUnreadMarker], ); // Native mobile does not render updates flatlist the changes even though component did update called. From e81f309ea1387dd4686b10a59a28f006beefd6cd Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Thu, 14 Sep 2023 09:16:42 +0700 Subject: [PATCH 4/9] Run prettier --- src/components/ReportActionItem/MoneyReportView.js | 7 +++++-- src/components/ReportActionItem/MoneyRequestView.js | 7 +++++-- src/components/ReportActionItem/TaskView.js | 7 +++++-- src/components/SpacerView.js | 4 ++-- src/pages/home/report/ReportActionsList.js | 5 ++++- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/components/ReportActionItem/MoneyReportView.js b/src/components/ReportActionItem/MoneyReportView.js index 520c382cb920..fdc0c630001e 100644 --- a/src/components/ReportActionItem/MoneyReportView.js +++ b/src/components/ReportActionItem/MoneyReportView.js @@ -14,7 +14,7 @@ import variables from '../../styles/variables'; import * as CurrencyUtils from '../../libs/CurrencyUtils'; import EmptyStateBackgroundImage from '../../../assets/images/empty-state_background-fade.png'; import useLocalize from '../../hooks/useLocalize'; -import SpacerView from '../SpacerView' +import SpacerView from '../SpacerView'; const propTypes = { /** The report currently being looked at */ @@ -66,7 +66,10 @@ function MoneyReportView(props) { - + ); } diff --git a/src/components/ReportActionItem/MoneyRequestView.js b/src/components/ReportActionItem/MoneyRequestView.js index a0618345d01d..e4a8b73f99b3 100644 --- a/src/components/ReportActionItem/MoneyRequestView.js +++ b/src/components/ReportActionItem/MoneyRequestView.js @@ -27,7 +27,7 @@ import Image from '../Image'; import ReportActionItemImage from './ReportActionItemImage'; import * as TransactionUtils from '../../libs/TransactionUtils'; import OfflineWithFeedback from '../OfflineWithFeedback'; -import SpacerView from '../SpacerView' +import SpacerView from '../SpacerView'; const propTypes = { /** The report currently being looked at */ @@ -166,7 +166,10 @@ function MoneyRequestView({report, parentReport, shouldShowHorizontalRule, trans subtitleTextStyle={styles.textLabelError} /> - + ); } diff --git a/src/components/ReportActionItem/TaskView.js b/src/components/ReportActionItem/TaskView.js index c64de6ed9164..7a1b333f0c02 100644 --- a/src/components/ReportActionItem/TaskView.js +++ b/src/components/ReportActionItem/TaskView.js @@ -27,7 +27,7 @@ import getButtonState from '../../libs/getButtonState'; import PressableWithSecondaryInteraction from '../PressableWithSecondaryInteraction'; import * as Session from '../../libs/actions/Session'; import * as Expensicons from '../Icon/Expensicons'; -import SpacerView from '../SpacerView' +import SpacerView from '../SpacerView'; const propTypes = { /** The report currently being looked at */ @@ -158,7 +158,10 @@ function TaskView(props) { /> )} - + ); } diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index 947f0deec916..b634fd90c452 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -22,8 +22,8 @@ const defaultProps = { }; function SpacerView(props) { - const marginVertical = useSharedValue(8) - const borderBottomWidth = useSharedValue(1) + const marginVertical = useSharedValue(8); + const borderBottomWidth = useSharedValue(1); const animatedStyles = useAnimatedStyle(() => ({ marginVertical: marginVertical.value, borderBottomWidth: borderBottomWidth.value, diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index ac9c03971727..2b4b97a40fb3 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -220,7 +220,10 @@ function ReportActionsList({ * Thread's divider line should hide when the first chat in the thread is marked as unread. * This is so that it will not be conflicting with header's separator line. */ - const shouldHideThreadDividerLine = useMemo(() => (sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker), [sortedReportActions, currentUnreadMarker]) + const shouldHideThreadDividerLine = useMemo( + () => sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker, + [sortedReportActions, currentUnreadMarker], + ); /** * @param {Object} args From b8bb9201adbbe478a9da9e92bae7a5a1e2b21def Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Fri, 15 Sep 2023 17:13:12 +0700 Subject: [PATCH 5/9] Apply suggestions --- src/components/SpacerView.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index b634fd90c452..c4180781fa12 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -21,7 +21,7 @@ const defaultProps = { style: [], }; -function SpacerView(props) { +function SpacerView({shouldShow, style}) { const marginVertical = useSharedValue(8); const borderBottomWidth = useSharedValue(1); const animatedStyles = useAnimatedStyle(() => ({ @@ -30,16 +30,16 @@ function SpacerView(props) { })); React.useEffect(() => { - if (props.shouldShow) { - marginVertical.value = withTiming(8, {duration: 300}); - borderBottomWidth.value = withTiming(1, {duration: 300}); - } else { - marginVertical.value = withTiming(0, {duration: 300}); - borderBottomWidth.value = withTiming(0, {duration: 300}); - } - }, [props.shouldShow, borderBottomWidth, marginVertical]); + const duration = 300; + const values = { + marginVertical: shouldShow ? 8 : 0, + borderBottomWidth: shouldShow ? 1 : 0, + }; + marginVertical.value = withTiming(values.marginVertical, {duration}); + borderBottomWidth.value = withTiming(values.borderBottomWidth, {duration}); + }, [shouldShow, borderBottomWidth, marginVertical]); - return ; + return ; } SpacerView.displayName = 'SpacerView'; From a1725359c6ca61e30ac817a028ce3defd0e6f7d4 Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Fri, 15 Sep 2023 18:35:47 +0700 Subject: [PATCH 6/9] Refactor constants --- src/CONST.ts | 6 ++++++ src/components/SpacerView.js | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 1ef2f3e83246..105611b7d210 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -2667,6 +2667,12 @@ const CONST = { HTTPS: 'https', PUSHER: 'pusher', }, + HORIZONTAL_SPACER: { + DEFAULT_BORDER_BOTTOM_WIDTH: 1, + DEFAULT_MARGIN_VERTICAL: 8, + HIDDEN_MARGIN_VERTICAL: 0, + HIDDEN_BORDER_BOTTOM_WIDTH: 0, + }, } as const; export default CONST; diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index c4180781fa12..6cfbd1025f94 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -2,6 +2,7 @@ import React from 'react'; import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; import PropTypes from 'prop-types'; import * as StyleUtils from '../styles/StyleUtils'; +import CONST from '../CONST'; const propTypes = { /** @@ -21,19 +22,19 @@ const defaultProps = { style: [], }; -function SpacerView({shouldShow, style}) { - const marginVertical = useSharedValue(8); - const borderBottomWidth = useSharedValue(1); +function SpacerView({shouldShow = true, style = []}) { + const marginVertical = useSharedValue(CONST.HORIZONTAL_SPACER.DEFAULT_MARGIN_VERTICAL); + const borderBottomWidth = useSharedValue(CONST.HORIZONTAL_SPACER.DEFAULT_BORDER_BOTTOM_WIDTH); const animatedStyles = useAnimatedStyle(() => ({ marginVertical: marginVertical.value, borderBottomWidth: borderBottomWidth.value, })); React.useEffect(() => { - const duration = 300; + const duration = CONST.ANIMATED_TRANSITION; const values = { - marginVertical: shouldShow ? 8 : 0, - borderBottomWidth: shouldShow ? 1 : 0, + marginVertical: shouldShow ? CONST.HORIZONTAL_SPACER.DEFAULT_MARGIN_VERTICAL : CONST.HORIZONTAL_SPACER.HIDDEN_MARGIN_VERTICAL, + borderBottomWidth: shouldShow ? CONST.HORIZONTAL_SPACER.DEFAULT_BORDER_BOTTOM_WIDTH : CONST.HORIZONTAL_SPACER.HIDDEN_BORDER_BOTTOM_WIDTH, }; marginVertical.value = withTiming(values.marginVertical, {duration}); borderBottomWidth.value = withTiming(values.borderBottomWidth, {duration}); From a0e5677fdef255b139f750448db35cc7221357c7 Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Tue, 19 Sep 2023 05:25:47 +0700 Subject: [PATCH 7/9] Use predefined style prop types --- src/components/SpacerView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index 6cfbd1025f94..c8c341bb9f1c 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -2,6 +2,7 @@ import React from 'react'; import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; import PropTypes from 'prop-types'; import * as StyleUtils from '../styles/StyleUtils'; +import stylePropTypes from '../styles/stylePropTypes'; import CONST from '../CONST'; const propTypes = { @@ -15,7 +16,7 @@ const propTypes = { * @default [] */ // eslint-disable-next-line react/forbid-prop-types - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: stylePropTypes, }; const defaultProps = { From c8a0972a4bfe2c60a61c9125270e91ac7ffc4dca Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Tue, 19 Sep 2023 15:00:34 +0700 Subject: [PATCH 8/9] Remove eslint ignore --- src/components/SpacerView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index c8c341bb9f1c..3b81bbfa0dc5 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -15,7 +15,6 @@ const propTypes = { * Array of style objects * @default [] */ - // eslint-disable-next-line react/forbid-prop-types style: stylePropTypes, }; From a36da60a4202dd62db9dd522f04d2796694dcba6 Mon Sep 17 00:00:00 2001 From: Heri Setiawan Date: Tue, 19 Sep 2023 15:03:14 +0700 Subject: [PATCH 9/9] Resolve conflict --- src/CONST.ts | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 105611b7d210..08c6a2509207 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -293,8 +293,8 @@ const CONST = { }, type: KEYBOARD_SHORTCUT_NAVIGATION_TYPE, }, - NEW_GROUP: { - descriptionKey: 'newGroup', + NEW_CHAT: { + descriptionKey: 'newChat', shortcutKey: 'K', modifiers: ['CTRL', 'SHIFT'], trigger: { @@ -792,6 +792,10 @@ const CONST = { INVISIBLE_CODEPOINTS: ['fe0f', '200d', '2066'], + UNICODE: { + LTR: '\u2066', + }, + TOOLTIP_MAX_LINES: 3, LOGIN_TYPE: { @@ -1026,7 +1030,6 @@ const CONST = { }, PAYMENT_METHODS: { - PAYPAL: 'payPalMe', DEBIT_CARD: 'debitCard', BANK_ACCOUNT: 'bankAccount', }, @@ -1042,7 +1045,6 @@ const CONST = { PAYMENT_TYPE: { ELSEWHERE: 'Elsewhere', EXPENSIFY: 'Expensify', - PAYPAL_ME: 'PayPal.me', VBBA: 'ACH', }, MONEY_REQUEST_TYPE: { @@ -1170,6 +1172,7 @@ const CONST = { SMALL_NORMAL: 'small-normal', }, EXPENSIFY_CARD: { + BANK: 'Expensify Card', FRAUD_TYPES: { DOMAIN: 'domain', INDIVIDUAL: 'individal', @@ -1200,7 +1203,6 @@ const CONST = { CARD_NUMBER: /^[0-9]{15,16}$/, CARD_SECURITY_CODE: /^[0-9]{3,4}$/, CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/, - PAYPAL_ME_USERNAME: /^[a-zA-Z0-9]{1,20}$/, ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/, // eslint-disable-next-line max-len, no-misleading-character-class @@ -1342,6 +1344,7 @@ const CONST = { SETTINGS: 'settings', LEAVE_ROOM: 'leaveRoom', WELCOME_MESSAGE: 'welcomeMessage', + PRIVATE_NOTES: 'privateNotes', }, EDIT_REQUEST_FIELD: { AMOUNT: 'amount', @@ -2530,32 +2533,6 @@ const CONST = { SEARCH_ISSUES: 'https://github.com/Expensify/App/issues', }, - PAYPAL_SUPPORTED_CURRENCIES: [ - 'AUD', - 'BRL', - 'CAD', - 'CZK', - 'DKK', - 'EUR', - 'HKD', - 'HUF', - 'ILS', - 'JPY', - 'MYR', - 'MXN', - 'TWD', - 'NZD', - 'NOK', - 'PHP', - 'PLN', - 'GBP', - 'RUB', - 'SGD', - 'SEK', - 'CHF', - 'THB', - 'USD', - ], CONCIERGE_TRAVEL_URL: 'https://community.expensify.com/discussion/7066/introducing-concierge-travel', SCREEN_READER_STATES: { ALL: 'all', @@ -2624,6 +2601,9 @@ const CONST = { DISABLED: 'DISABLED', }, TAB: { + NEW_CHAT_TAB_ID: 'NewChatTab', + NEW_CHAT: 'chat', + NEW_ROOM: 'room', RECEIPT_TAB_ID: 'ReceiptTab', MANUAL: 'manual', SCAN: 'scan', @@ -2667,6 +2647,9 @@ const CONST = { HTTPS: 'https', PUSHER: 'pusher', }, + EVENTS: { + SCROLLING: 'scrolling', + }, HORIZONTAL_SPACER: { DEFAULT_BORDER_BOTTOM_WIDTH: 1, DEFAULT_MARGIN_VERTICAL: 8,