From b27f20d6a47051a055c8351cb29a4b7c812c23da Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 14:11:15 -0800 Subject: [PATCH 01/10] Update CONST.ts Removing per https://expensify.slack.com/archives/C07HPDRELLD/p1731966744741239 --- src/CONST.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index f43c86e94b4f..faa3d35a5e06 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -4821,7 +4821,6 @@ const CONST = { WELCOME_VIDEO_URL: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`, - ONBOARDING_INTRODUCTION: 'Let’s get you set up 🔧', ONBOARDING_CHOICES: {...onboardingChoices}, SELECTABLE_ONBOARDING_CHOICES: {...selectableOnboardingChoices}, COMBINED_TRACK_SUBMIT_ONBOARDING_CHOICES: {...combinedTrackSubmitOnboardingChoices}, From c701612031a0f022cfc7e277ebff5b315420d8d6 Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 14:12:25 -0800 Subject: [PATCH 02/10] Update Report.ts --- src/libs/actions/Report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 32c0a40876d7..16ad35480944 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3499,7 +3499,7 @@ function prepareOnboardingOptimisticData( const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; // Introductory message - const introductionComment = ReportUtils.buildOptimisticAddCommentReportAction(CONST.ONBOARDING_INTRODUCTION, undefined, actorAccountID); + const introductionComment = ReportUtils.buildOptimisticAddCommentReportAction(undefined, actorAccountID); const introductionCommentAction: OptimisticAddCommentReportAction = introductionComment.reportAction; const introductionMessage: AddCommentOrAttachementParams = { reportID: targetChatReportID, From a5a35af22f2719cb04c4df154c3fef76db53d337 Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 16:49:44 -0800 Subject: [PATCH 03/10] Update Report.ts --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 16ad35480944..2cc5cf2672b9 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3867,7 +3867,6 @@ function prepareOnboardingOptimisticData( } const guidedSetupData: GuidedSetupData = [ - {type: 'message', ...introductionMessage}, {type: 'message', ...textMessage}, ]; From b7f331e5aaa5be5d1a519bf18c1eaab1cc4f216d Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 16:50:41 -0800 Subject: [PATCH 04/10] Update Report.ts --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 2cc5cf2672b9..efa06ac2d2ca 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3753,7 +3753,6 @@ function prepareOnboardingOptimisticData( onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, value: { - [introductionCommentAction.reportActionID]: introductionCommentAction as ReportAction, [textCommentAction.reportActionID]: textCommentAction as ReportAction, }, }, From f8c3d95dbad9cb3c6259297d4d401cf676ff20c3 Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 16:51:50 -0800 Subject: [PATCH 05/10] Update Report.ts --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index efa06ac2d2ca..4ed530845fb3 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3775,7 +3775,6 @@ function prepareOnboardingOptimisticData( onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, value: { - [introductionCommentAction.reportActionID]: {pendingAction: null}, [textCommentAction.reportActionID]: {pendingAction: null}, }, }); From 0dc28f1494ba2c3196969f2cdd89168d5a4d21fb Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 17:01:31 -0800 Subject: [PATCH 06/10] Update src/libs/actions/Report.ts Co-authored-by: Marc Glasser --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 4ed530845fb3..3b8cf1ceab6a 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3499,7 +3499,6 @@ function prepareOnboardingOptimisticData( const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; // Introductory message - const introductionComment = ReportUtils.buildOptimisticAddCommentReportAction(undefined, actorAccountID); const introductionCommentAction: OptimisticAddCommentReportAction = introductionComment.reportAction; const introductionMessage: AddCommentOrAttachementParams = { reportID: targetChatReportID, From 601b4e061e5096964c5af69b4d796ae46a8223cc Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 17:01:46 -0800 Subject: [PATCH 07/10] Update src/libs/actions/Report.ts Co-authored-by: Marc Glasser --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 3b8cf1ceab6a..493ed4112c05 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3498,7 +3498,6 @@ function prepareOnboardingOptimisticData( const targetChatReport = ReportUtils.getChatByParticipants([actorAccountID, currentUserAccountID]); const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; - // Introductory message const introductionCommentAction: OptimisticAddCommentReportAction = introductionComment.reportAction; const introductionMessage: AddCommentOrAttachementParams = { reportID: targetChatReportID, From ce49dc3b87cdf5de02123bd2c2189c6c0cb2d0b0 Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 17:02:03 -0800 Subject: [PATCH 08/10] Update src/libs/actions/Report.ts Co-authored-by: Marc Glasser --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 493ed4112c05..624fcfbd5c3f 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3499,7 +3499,6 @@ function prepareOnboardingOptimisticData( const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; const introductionCommentAction: OptimisticAddCommentReportAction = introductionComment.reportAction; - const introductionMessage: AddCommentOrAttachementParams = { reportID: targetChatReportID, reportActionID: introductionCommentAction.reportActionID, reportComment: introductionComment.commentText, From c5afbcf30daa9ee12a98ccd06383e74a940d3283 Mon Sep 17 00:00:00 2001 From: James Dean Date: Mon, 18 Nov 2024 17:02:12 -0800 Subject: [PATCH 09/10] Update src/libs/actions/Report.ts Co-authored-by: Marc Glasser --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 624fcfbd5c3f..2e3e982f3708 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3498,7 +3498,6 @@ function prepareOnboardingOptimisticData( const targetChatReport = ReportUtils.getChatByParticipants([actorAccountID, currentUserAccountID]); const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; - const introductionCommentAction: OptimisticAddCommentReportAction = introductionComment.reportAction; reportID: targetChatReportID, reportActionID: introductionCommentAction.reportActionID, reportComment: introductionComment.commentText, From 23c6802212dcc20210f41bc3fe42390022fe28d4 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 18 Nov 2024 15:13:10 -1000 Subject: [PATCH 10/10] Run prettier --- src/libs/actions/Report.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 2e3e982f3708..81f7116b3da7 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3498,11 +3498,6 @@ function prepareOnboardingOptimisticData( const targetChatReport = ReportUtils.getChatByParticipants([actorAccountID, currentUserAccountID]); const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {}; - reportID: targetChatReportID, - reportActionID: introductionCommentAction.reportActionID, - reportComment: introductionComment.commentText, - }; - // Text message const textComment = ReportUtils.buildOptimisticAddCommentReportAction(data.message, undefined, actorAccountID, 1); const textCommentAction: OptimisticAddCommentReportAction = textComment.reportAction; @@ -3805,9 +3800,6 @@ function prepareOnboardingOptimisticData( onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, value: { - [introductionCommentAction.reportActionID]: { - errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'), - } as ReportAction, [textCommentAction.reportActionID]: { errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'), } as ReportAction, @@ -3860,9 +3852,7 @@ function prepareOnboardingOptimisticData( }); } - const guidedSetupData: GuidedSetupData = [ - {type: 'message', ...textMessage}, - ]; + const guidedSetupData: GuidedSetupData = [{type: 'message', ...textMessage}]; if ('video' in data && data.video && videoCommentAction && videoMessage) { optimisticData.push({