Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - remove all onboarding videos #55902

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,6 @@ const selfGuidedTourTask: OnboardingTask = {

const onboardingEmployerOrSubmitMessage: OnboardingMessage = {
message: 'Getting paid back is as easy as sending a message. Let’s go over the basics.',
video: {
url: `${CLOUDFRONT_URL}/videos/guided-setup-get-paid-back-v3.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-get-paid-back.jpg`,
duration: 26,
width: 1280,
height: 960,
},
tasks: [
selfGuidedTourTask,
{
Expand Down Expand Up @@ -157,13 +150,6 @@ const combinedTrackSubmitOnboardingEmployerOrSubmitMessage: OnboardingMessage =

const onboardingPersonalSpendMessage: OnboardingMessage = {
message: 'Here’s how to track your spend in a few clicks.',
video: {
url: `${CLOUDFRONT_URL}/videos/guided-setup-track-personal-v2.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-track-personal.jpg`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
selfGuidedTourTask,
{
Expand Down Expand Up @@ -5009,13 +4995,6 @@ const CONST = {
[onboardingChoices.SUBMIT]: onboardingEmployerOrSubmitMessage,
[onboardingChoices.MANAGE_TEAM]: {
message: 'Here are some important tasks to help get your team’s expenses under control.',
video: {
url: `${CLOUDFRONT_URL}/videos/guided-setup-manage-team-v2.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-manage-team.jpg`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'createWorkspace',
Expand Down Expand Up @@ -5148,13 +5127,6 @@ const CONST = {
[onboardingChoices.PERSONAL_SPEND]: onboardingPersonalSpendMessage,
[onboardingChoices.CHAT_SPLIT]: {
message: 'Splitting bills with friends is as easy as sending a message. Here’s how.',
video: {
url: `${CLOUDFRONT_URL}/videos/guided-setup-chat-split-bills-v2.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-chat-split-bills.jpg`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
selfGuidedTourTask,
{
Expand Down Expand Up @@ -5195,13 +5167,6 @@ const CONST = {
},
[onboardingChoices.ADMIN]: {
message: "As an admin, learn how to manage your team's workspace and submit expenses yourself.",
video: {
url: `${CLOUDFRONT_URL}/videos/guided-setup-manage-team-v2.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-manage-team.jpg`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'meetSetupSpecialist',
Expand Down
41 changes: 0 additions & 41 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3672,17 +3672,6 @@ function prepareOnboardingOptimisticData(
reportComment: textComment.commentText,
};

let videoCommentAction: OptimisticAddCommentReportAction | null = null;
let videoMessage: AddCommentOrAttachementParams | null = null;
if ('video' in data && data.video) {
const videoComment = buildOptimisticAddCommentReportAction(CONST.ATTACHMENT_MESSAGE_TEXT, undefined, actorAccountID, 2);
videoCommentAction = videoComment.reportAction;
videoMessage = {
reportID: targetChatReportID,
reportActionID: videoCommentAction.reportActionID,
reportComment: videoComment.commentText,
};
}
const tasksData = data.tasks
.filter((task) => {
if (['setupCategories', 'setupTags'].includes(task.type) && userReportedIntegration) {
Expand Down Expand Up @@ -4047,36 +4036,6 @@ function prepareOnboardingOptimisticData(
// If we post tasks in the #admins room, it means that a guide is assigned and all messages except tasks are handled by the backend
const guidedSetupData: GuidedSetupData = shouldPostTasksInAdminsRoom ? [] : [{type: 'message', ...textMessage}];

if (!shouldPostTasksInAdminsRoom && 'video' in data && data.video && videoCommentAction && videoMessage) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`,
value: {
[videoCommentAction.reportActionID]: videoCommentAction as ReportAction,
},
});

successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`,
value: {
[videoCommentAction.reportActionID]: {pendingAction: null},
},
});

failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`,
value: {
[videoCommentAction.reportActionID]: {
errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'),
} as ReportAction,
},
});

guidedSetupData.push({type: 'video', ...data.video, ...videoMessage});
}

type SelfDMParameters = {
reportID?: string;
createdReportActionID?: string;
Expand Down