From 5bc78abbae41b192784ca2044519bc2a28596199 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 13:06:17 -0700 Subject: [PATCH 01/14] removing unnecessary param --- src/pages/home/HeaderView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index c6f312574394..1285623dae2e 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -78,7 +78,7 @@ const HeaderView = (props) => { const isTaskReport = ReportUtils.isTaskReport(props.report); const reportHeaderData = (isTaskReport || !isThread) && props.report.parentReportID ? props.parentReport : props.report; const title = ReportUtils.getReportName(reportHeaderData); - const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData, props.parentReport); + const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData); const isConcierge = participants.length === 1 && _.contains(participants, CONST.EMAIL.CONCIERGE); const isAutomatedExpensifyAccount = participants.length === 1 && ReportUtils.hasAutomatedExpensifyEmails(participants); const guideCalendarLink = lodashGet(props.account, 'guideCalendarLink'); From 0d49fef5716de16a5e801220ece561509b0e11f4 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 13:24:10 -0700 Subject: [PATCH 02/14] showing display name for DM threads --- src/libs/ReportUtils.js | 49 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0d26ff733f7d..38040f222ddd 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -21,6 +21,7 @@ import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAva import * as LocalePhoneNumber from './LocalePhoneNumber'; import * as CurrencyUtils from './CurrencyUtils'; import * as UserUtils from './UserUtils'; +import {getParentReportAction} from './ReportActionsUtils'; let sessionEmail; Onyx.connect({ @@ -532,6 +533,26 @@ function isThreadFirstChat(reportAction, reportID) { return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === reportID; } +/** + * Get the displayName for a single report participant. + * + * @param {String} login + * @param {Boolean} [shouldUseShortForm] + * @returns {String} + */ +function getDisplayNameForParticipant(login, shouldUseShortForm = false) { + if (!login) { + return ''; + } + const personalDetails = getPersonalDetailsForLogin(login); + + const longName = personalDetails.displayName; + + const shortName = personalDetails.firstName || longName; + + return shouldUseShortForm ? shortName : longName; +} + /** * Get either the policyName or domainName the chat is tied to * @param {Object} report @@ -539,11 +560,15 @@ function isThreadFirstChat(reportAction, reportID) { */ function getChatRoomSubtitle(report) { if (isThread(report)) { - if (!getChatType(report)) { - return ''; + if (report.reportID === '2514886886252447') { + debugger; } const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + if (!getChatType(report)) { + const parentReportAction = getParentReportAction(report); + return `From ${getDisplayNameForParticipant(parentReportAction.actorEmail)}`; + } // If thread is not from a DM or group chat, the subtitle will follow the pattern 'Workspace Name • #roomName' const workspaceName = getPolicyName(report); @@ -845,26 +870,6 @@ function getPersonalDetailsForLogin(login) { ); } -/** - * Get the displayName for a single report participant. - * - * @param {String} login - * @param {Boolean} [shouldUseShortForm] - * @returns {String} - */ -function getDisplayNameForParticipant(login, shouldUseShortForm = false) { - if (!login) { - return ''; - } - const personalDetails = getPersonalDetailsForLogin(login); - - const longName = personalDetails.displayName; - - const shortName = personalDetails.firstName || longName; - - return shouldUseShortForm ? shortName : longName; -} - /** * @param {Object} participants * @param {Boolean} isMultipleParticipantReport From fa4fbfee6aa15c288fcca985e89d12eeaef6a1b8 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 13:28:41 -0700 Subject: [PATCH 03/14] subheader update for policy room --- src/libs/ReportUtils.js | 43 +++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 38040f222ddd..ca3f824c0c21 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -533,6 +533,25 @@ function isThreadFirstChat(reportAction, reportID) { return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === reportID; } +/** + * Gets the personal details for a login by looking in the ONYXKEYS.PERSONAL_DETAILS Onyx key (stored in the local variable, allPersonalDetails). If it doesn't exist in Onyx, + * then a default object is constructed. + * @param {String} login + * @returns {Object} + */ +function getPersonalDetailsForLogin(login) { + if (!login) { + return {}; + } + return ( + (allPersonalDetails && allPersonalDetails[login]) || { + login, + displayName: LocalePhoneNumber.formatPhoneNumber(login), + avatar: UserUtils.getDefaultAvatar(login), + } + ); +} + /** * Get the displayName for a single report participant. * @@ -545,11 +564,8 @@ function getDisplayNameForParticipant(login, shouldUseShortForm = false) { return ''; } const personalDetails = getPersonalDetailsForLogin(login); - const longName = personalDetails.displayName; - const shortName = personalDetails.firstName || longName; - return shouldUseShortForm ? shortName : longName; } @@ -581,7 +597,7 @@ function getChatRoomSubtitle(report) { } } - return roomName ? [workspaceName, roomName].join(' • ') : workspaceName; + return `From ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { return ''; @@ -851,25 +867,6 @@ function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) return getIconsForParticipants(report.participants, personalDetails); } -/** - * Gets the personal details for a login by looking in the ONYXKEYS.PERSONAL_DETAILS Onyx key (stored in the local variable, allPersonalDetails). If it doesn't exist in Onyx, - * then a default object is constructed. - * @param {String} login - * @returns {Object} - */ -function getPersonalDetailsForLogin(login) { - if (!login) { - return {}; - } - return ( - (allPersonalDetails && allPersonalDetails[login]) || { - login, - displayName: LocalePhoneNumber.formatPhoneNumber(login), - avatar: UserUtils.getDefaultAvatar(login), - } - ); -} - /** * @param {Object} participants * @param {Boolean} isMultipleParticipantReport From 09d20d9f9a078a15a4d780caacb5f4e2390f6f01 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 13:58:13 -0700 Subject: [PATCH 04/14] cleanup --- src/libs/ReportUtils.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index ca3f824c0c21..7844c6d33dde 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -576,20 +576,14 @@ function getDisplayNameForParticipant(login, shouldUseShortForm = false) { */ function getChatRoomSubtitle(report) { if (isThread(report)) { - if (report.reportID === '2514886886252447') { - debugger; - } - - const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); if (!getChatType(report)) { const parentReportAction = getParentReportAction(report); return `From ${getDisplayNameForParticipant(parentReportAction.actorEmail)}`; } - // If thread is not from a DM or group chat, the subtitle will follow the pattern 'Workspace Name • #roomName' - const workspaceName = getPolicyName(report); let roomName = ''; if (isChatRoom(report)) { + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); if (parentReport) { roomName = lodashGet(parentReport, 'displayName', ''); } else { @@ -597,6 +591,7 @@ function getChatRoomSubtitle(report) { } } + const workspaceName = getPolicyName(report); return `From ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { From 6229c31a052b2b4ece5161afa8171050fe2fa01a Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 13:58:30 -0700 Subject: [PATCH 05/14] Pressable subheader to go to parent report --- src/pages/home/HeaderView.js | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 1285623dae2e..948aa75e35c9 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -28,6 +28,9 @@ import ThreeDotsMenu from '../../components/ThreeDotsMenu'; import * as Task from '../../libs/actions/Task'; import reportActionPropTypes from './report/reportActionPropTypes'; import PinButton from '../../components/PinButton'; +import * as Report from '../../libs/actions/Report'; +import Navigation from '../../libs/Navigation/Navigation'; +import ROUTES from '../../ROUTES'; const propTypes = { /** Toggles the navigationMenu open and closed */ @@ -171,12 +174,30 @@ const HeaderView = (props) => { shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport} /> {(isChatRoom || isPolicyExpenseChat || isThread) && !_.isEmpty(subtitle) && ( - - {subtitle} - + <> + {isThread ? ( + { + Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); + }} + > + + {subtitle} + + + ) : ( + + {subtitle} + + ) + } + )} {brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR && ( From d342f83f2fefcf26cc590e8646e6b9f56cc3fe46 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 14:00:54 -0700 Subject: [PATCH 06/14] styles --- src/pages/home/HeaderView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 948aa75e35c9..51f15cbf8743 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -182,7 +182,7 @@ const HeaderView = (props) => { }} > {subtitle} From 8e4d9c8675e0f184c50b66ca070ce51d6dcc4ffc Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 14:01:11 -0700 Subject: [PATCH 07/14] removing an unused style --- src/pages/home/HeaderView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 51f15cbf8743..e6e1a65fb016 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -190,7 +190,7 @@ const HeaderView = (props) => { ) : ( {subtitle} From c4adb24c16d5154d99a8ef27dfe8bc17dcbf2afc Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 15:22:44 -0700 Subject: [PATCH 08/14] cleanup --- src/libs/ReportUtils.js | 3 +-- src/pages/home/HeaderView.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 7844c6d33dde..3502fd76bd32 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -21,7 +21,6 @@ import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAva import * as LocalePhoneNumber from './LocalePhoneNumber'; import * as CurrencyUtils from './CurrencyUtils'; import * as UserUtils from './UserUtils'; -import {getParentReportAction} from './ReportActionsUtils'; let sessionEmail; Onyx.connect({ @@ -577,7 +576,7 @@ function getDisplayNameForParticipant(login, shouldUseShortForm = false) { function getChatRoomSubtitle(report) { if (isThread(report)) { if (!getChatType(report)) { - const parentReportAction = getParentReportAction(report); + const parentReportAction = ReportActionsUtils.getParentReportAction(report); return `From ${getDisplayNameForParticipant(parentReportAction.actorEmail)}`; } diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index e6e1a65fb016..5d999fb256a5 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -28,7 +28,6 @@ import ThreeDotsMenu from '../../components/ThreeDotsMenu'; import * as Task from '../../libs/actions/Task'; import reportActionPropTypes from './report/reportActionPropTypes'; import PinButton from '../../components/PinButton'; -import * as Report from '../../libs/actions/Report'; import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; From 789aa1223d520f522cc5abee66b8445837265143 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 17:25:00 -0700 Subject: [PATCH 09/14] logical correction to get the proper report name --- src/libs/ReportUtils.js | 95 +++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 3502fd76bd32..a5b9a9503539 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -568,47 +568,6 @@ function getDisplayNameForParticipant(login, shouldUseShortForm = false) { return shouldUseShortForm ? shortName : longName; } -/** - * Get either the policyName or domainName the chat is tied to - * @param {Object} report - * @returns {String} - */ -function getChatRoomSubtitle(report) { - if (isThread(report)) { - if (!getChatType(report)) { - const parentReportAction = ReportActionsUtils.getParentReportAction(report); - return `From ${getDisplayNameForParticipant(parentReportAction.actorEmail)}`; - } - - let roomName = ''; - if (isChatRoom(report)) { - const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - if (parentReport) { - roomName = lodashGet(parentReport, 'displayName', ''); - } else { - roomName = lodashGet(report, 'displayName', ''); - } - } - - const workspaceName = getPolicyName(report); - return `From ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; - } - if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { - return ''; - } - if (getChatType(report) === CONST.REPORT.CHAT_TYPE.DOMAIN_ALL) { - // The domainAll rooms are just #domainName, so we ignore the prefix '#' to get the domainName - return report.reportName.substring(1); - } - if ((isPolicyExpenseChat(report) && report.isOwnPolicyExpenseChat) || isExpenseReport(report)) { - return Localize.translateLocal('workspace.common.workspace'); - } - if (isArchivedRoom(report)) { - return report.oldPolicyName || ''; - } - return getPolicyName(report); -} - /** * Get welcome message based on room type * @param {Object} report @@ -1037,6 +996,60 @@ function getReportName(report) { return _.map(participantsWithoutCurrentUser, (login) => getDisplayNameForParticipant(login, isMultipleParticipantReport)).join(', '); } +/** + * Recursively navigates through parent to get the root reports name only for DM reports. + * @param {Object} report + * @returns {String|*} + */ +function getDMRootReportName(report) { + if (isThread(report) && !getChatType(report)) { + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + return getDMRootReportName(parentReport); + } + + return getReportName(report); +} + +/** + * Get either the policyName or domainName the chat is tied to + * @param {Object} report + * @returns {String} + */ +function getChatRoomSubtitle(report) { + if (isThread(report)) { + if (!getChatType(report)) { + return `From ${getDMRootReportName(report)}`; + } + + let roomName = ''; + if (isChatRoom(report)) { + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + if (parentReport) { + roomName = lodashGet(parentReport, 'displayName', ''); + } else { + roomName = lodashGet(report, 'displayName', ''); + } + } + + const workspaceName = getPolicyName(report); + return `From ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + } + if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { + return ''; + } + if (getChatType(report) === CONST.REPORT.CHAT_TYPE.DOMAIN_ALL) { + // The domainAll rooms are just #domainName, so we ignore the prefix '#' to get the domainName + return report.reportName.substring(1); + } + if ((isPolicyExpenseChat(report) && report.isOwnPolicyExpenseChat) || isExpenseReport(report)) { + return Localize.translateLocal('workspace.common.workspace'); + } + if (isArchivedRoom(report)) { + return report.oldPolicyName || ''; + } + return getPolicyName(report); +} + /** * Get the report for a reportID * From 154b0a547f2b073760737a39ad26fccb3d21d988 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 8 Jun 2023 17:28:25 -0700 Subject: [PATCH 10/14] reverting some code i moved around which i dont use anymore --- src/libs/ReportUtils.js | 72 ++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index a5b9a9503539..fafc2068b671 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -532,42 +532,6 @@ function isThreadFirstChat(reportAction, reportID) { return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === reportID; } -/** - * Gets the personal details for a login by looking in the ONYXKEYS.PERSONAL_DETAILS Onyx key (stored in the local variable, allPersonalDetails). If it doesn't exist in Onyx, - * then a default object is constructed. - * @param {String} login - * @returns {Object} - */ -function getPersonalDetailsForLogin(login) { - if (!login) { - return {}; - } - return ( - (allPersonalDetails && allPersonalDetails[login]) || { - login, - displayName: LocalePhoneNumber.formatPhoneNumber(login), - avatar: UserUtils.getDefaultAvatar(login), - } - ); -} - -/** - * Get the displayName for a single report participant. - * - * @param {String} login - * @param {Boolean} [shouldUseShortForm] - * @returns {String} - */ -function getDisplayNameForParticipant(login, shouldUseShortForm = false) { - if (!login) { - return ''; - } - const personalDetails = getPersonalDetailsForLogin(login); - const longName = personalDetails.displayName; - const shortName = personalDetails.firstName || longName; - return shouldUseShortForm ? shortName : longName; -} - /** * Get welcome message based on room type * @param {Object} report @@ -820,6 +784,42 @@ function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) return getIconsForParticipants(report.participants, personalDetails); } +/** + * Gets the personal details for a login by looking in the ONYXKEYS.PERSONAL_DETAILS Onyx key (stored in the local variable, allPersonalDetails). If it doesn't exist in Onyx, + * then a default object is constructed. + * @param {String} login + * @returns {Object} + */ +function getPersonalDetailsForLogin(login) { + if (!login) { + return {}; + } + return ( + (allPersonalDetails && allPersonalDetails[login]) || { + login, + displayName: LocalePhoneNumber.formatPhoneNumber(login), + avatar: UserUtils.getDefaultAvatar(login), + } + ); +} + +/** + * Get the displayName for a single report participant. + * + * @param {String} login + * @param {Boolean} [shouldUseShortForm] + * @returns {String} + */ +function getDisplayNameForParticipant(login, shouldUseShortForm = false) { + if (!login) { + return ''; + } + const personalDetails = getPersonalDetailsForLogin(login); + const longName = personalDetails.displayName; + const shortName = personalDetails.firstName || longName; + return shouldUseShortForm ? shortName : longName; +} + /** * @param {Object} participants * @param {Boolean} isMultipleParticipantReport From 72ceeba66571bbc8b4a475a5f1c533ca3a626a85 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 9 Jun 2023 10:43:50 -0700 Subject: [PATCH 11/14] translations --- src/languages/en.js | 1 + src/languages/es.js | 1 + src/libs/ReportUtils.js | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 4602931ff120..ed205f6576a0 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1405,6 +1405,7 @@ export default { lastReply: 'Last reply', replies: 'Replies', reply: 'Reply', + from: 'From', }, qrCodes: { copyUrlToClipboard: 'Copy URL to clipboard', diff --git a/src/languages/es.js b/src/languages/es.js index a787607c465d..e2a48a37f5f9 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1871,6 +1871,7 @@ export default { lastReply: 'Última respuesta', replies: 'Respuestas', reply: 'Respuesta', + from: 'De', }, qrCodes: { copyUrlToClipboard: 'Copiar URL al portapapeles', diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index fafc2068b671..7a82336cc1b5 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1018,7 +1018,7 @@ function getDMRootReportName(report) { function getChatRoomSubtitle(report) { if (isThread(report)) { if (!getChatType(report)) { - return `From ${getDMRootReportName(report)}`; + return `${Localize.translateLocal('threads.from')} ${getDMRootReportName(report)}`; } let roomName = ''; @@ -1032,7 +1032,7 @@ function getChatRoomSubtitle(report) { } const workspaceName = getPolicyName(report); - return `From ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { return ''; From 1ddbd7c9cb8ba46bd150b158b878514ea9cbb2b6 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 9 Jun 2023 10:52:04 -0700 Subject: [PATCH 12/14] prettier fix --- src/pages/home/HeaderView.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 5d999fb256a5..eb0aae7a5919 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -187,15 +187,14 @@ const HeaderView = (props) => { {subtitle} - ) : ( - - {subtitle} - - ) - } + ) : ( + + {subtitle} + + )} )} From ef354e59d767787b9277d4eb9ec9bb9c7f82fa5f Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 13 Jun 2023 13:25:00 -0700 Subject: [PATCH 13/14] Updating to PressableWithoutFeedback --- src/pages/home/HeaderView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 8a9b1cc21fe0..538eefb1725e 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -180,7 +180,7 @@ const HeaderView = (props) => { {(isChatRoom || isPolicyExpenseChat || isThread) && !_.isEmpty(subtitle) && ( <> {isThread ? ( - { Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); }} @@ -191,7 +191,7 @@ const HeaderView = (props) => { > {subtitle} - + ) : ( Date: Tue, 13 Jun 2023 14:48:09 -0700 Subject: [PATCH 14/14] adding accessibilityLabel and accessibilityRole --- src/pages/home/HeaderView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 538eefb1725e..72e207513840 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -184,6 +184,8 @@ const HeaderView = (props) => { onPress={() => { Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); }} + accessibilityLabel={subtitle} + accessibilityRole="link" >