diff --git a/src/CONST.ts b/src/CONST.ts index 8adb5568e0fb..9c8b98363967 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -970,6 +970,8 @@ const CONST = { HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render', REPORT_INITIAL_RENDER: 'report_initial_render', SWITCH_REPORT: 'switch_report', + SWITCH_REPORT_FROM_PREVIEW: 'switch_report_from_preview', + SWITCH_REPORT_THREAD: 'switch_report_thread', SIDEBAR_LOADED: 'sidebar_loaded', LOAD_SEARCH_OPTIONS: 'load_search_options', COLD: 'cold', diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 2c52fe83f989..a502487e43a7 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -360,7 +360,7 @@ function ReportPreview({ { - Timing.start(CONST.TIMING.SWITCH_REPORT); + Timing.start(CONST.TIMING.SWITCH_REPORT_FROM_PREVIEW); Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(iouReportID)); }} onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} diff --git a/src/pages/home/report/ReportActionItemParentAction.tsx b/src/pages/home/report/ReportActionItemParentAction.tsx index cba0f1572fd4..41943485f171 100644 --- a/src/pages/home/report/ReportActionItemParentAction.tsx +++ b/src/pages/home/report/ReportActionItemParentAction.tsx @@ -10,8 +10,6 @@ import onyxSubscribe from '@libs/onyxSubscribe'; import * as ReportActionsUtils from '@libs/ReportActionsUtils'; import * as ReportUtils from '@libs/ReportUtils'; import * as Report from '@userActions/Report'; -import Timing from '@userActions/Timing'; -import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; @@ -135,7 +133,6 @@ function ReportActionItemParentAction({ // Pop the chat report screen before navigating to the linked report action. Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ?? '-1', ancestor.reportAction.reportActionID)); } - Timing.start(CONST.TIMING.SWITCH_REPORT); } : undefined } diff --git a/src/pages/home/report/ReportActionItemThread.tsx b/src/pages/home/report/ReportActionItemThread.tsx index 5d2c6316df4e..d18adf6ba0d2 100644 --- a/src/pages/home/report/ReportActionItemThread.tsx +++ b/src/pages/home/report/ReportActionItemThread.tsx @@ -46,7 +46,7 @@ function ReportActionItemThread({numberOfReplies, icons, mostRecentReply, childR { Report.navigateToAndOpenChildReport(childReportID); - Timing.start(CONST.TIMING.SWITCH_REPORT); + Timing.start(CONST.TIMING.SWITCH_REPORT_THREAD); }} role={CONST.ROLE.BUTTON} accessibilityLabel={`${numberOfReplies} ${replyText}`} diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index fb99f8508f6f..e2c7e8969e05 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -448,12 +448,13 @@ function ReportActionsView({ if (!ReportActionsView.initMeasured) { Performance.markEnd(CONST.TIMING.OPEN_REPORT); Performance.markEnd(CONST.TIMING.REPORT_INITIAL_RENDER); - Timing.end(CONST.TIMING.REPORT_INITIAL_RENDER); ReportActionsView.initMeasured = true; } else { Performance.markEnd(CONST.TIMING.SWITCH_REPORT); } Timing.end(CONST.TIMING.SWITCH_REPORT, hasCachedActionOnFirstRender ? CONST.TIMING.WARM : CONST.TIMING.COLD); + Timing.end(CONST.TIMING.SWITCH_REPORT_THREAD); + Timing.end(CONST.TIMING.SWITCH_REPORT_FROM_PREVIEW); }, [hasCachedActionOnFirstRender]); // Check if the first report action in the list is the one we're currently linked to diff --git a/src/pages/home/report/ThreadDivider.tsx b/src/pages/home/report/ThreadDivider.tsx index 5b3fe6e5986c..d2ffa97f58b2 100644 --- a/src/pages/home/report/ThreadDivider.tsx +++ b/src/pages/home/report/ThreadDivider.tsx @@ -12,7 +12,6 @@ import Navigation from '@libs/Navigation/Navigation'; import * as ReportActionsUtils from '@libs/ReportActionsUtils'; import type {Ancestor} from '@libs/ReportUtils'; import variables from '@styles/variables'; -import Timing from '@userActions/Timing'; import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; @@ -48,7 +47,6 @@ function ThreadDivider({ancestor, isLinkDisabled = false}: ThreadDividerProps) { ) : ( { - Timing.start(CONST.TIMING.SWITCH_REPORT); const isVisibleAction = ReportActionsUtils.shouldReportActionBeVisible(ancestor.reportAction, ancestor.reportAction.reportActionID ?? '-1'); // Pop the thread report screen before navigating to the chat report. Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID ?? '-1'));