Skip to content

Revert "[Test Drive][Phase 1][FE] Implement the Test Drive modal" #60462

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

Merged
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
Binary file removed assets/images/fast-track-cover.jpg
Binary file not shown.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5160,7 +5160,6 @@ const CONST = {
VIDEO_URL: `${CLOUDFRONT_URL}/videos/guided-setup-track-business-v2.mp4`,
LEARN_MORE_LINK: `${USE_EXPENSIFY_URL}/track-expenses`,
},
TEST_DRIVE_COVER_ASPECT_RATIO: 500 / 300,
},

/**
Expand Down
1 change: 0 additions & 1 deletion src/NAVIGATORS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default {
WELCOME_VIDEO_MODAL_NAVIGATOR: 'WelcomeVideoModalNavigator',
EXPLANATION_MODAL_NAVIGATOR: 'ExplanationModalNavigator',
MIGRATED_USER_MODAL_NAVIGATOR: 'MigratedUserModalNavigator',
TEST_DRIVE_MODAL_NAVIGATOR: 'TestDriveModalNavigator',
REPORTS_SPLIT_NAVIGATOR: 'ReportsSplitNavigator',
SETTINGS_SPLIT_NAVIGATOR: 'SettingsSplitNavigator',
WORKSPACE_SPLIT_NAVIGATOR: 'WorkspaceSplitNavigator',
Expand Down
1 change: 0 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,6 @@ const ROUTES = {
},
WELCOME_VIDEO_ROOT: 'onboarding/welcome-video',
EXPLANATION_MODAL_ROOT: 'onboarding/explanation',
TEST_DRIVE_MODAL_ROOT: 'onboarding/test-drive',
WORKSPACE_CONFIRMATION: {
route: 'workspace/confirmation',
getRoute: (backTo?: string) => getUrlWithBackToParam(`workspace/confirmation`, backTo),
Expand Down
4 changes: 0 additions & 4 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,6 @@ const SCREENS = {
ROOT: 'MigratedUserWelcomeModal_Root',
},

TEST_DRIVE_MODAL: {
ROOT: 'TestDrive_Modal_Root',
},

I_KNOW_A_TEACHER: 'I_Know_A_Teacher',
INTRO_SCHOOL_PRINCIPAL: 'Intro_School_Principal',
I_AM_A_TEACHER: 'I_Am_A_Teacher',
Expand Down
30 changes: 9 additions & 21 deletions src/components/FeatureTrainingModal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {VideoReadyForDisplayEvent} from 'expo-av';
import type {ImageContentFit} from 'expo-image';
import React, {useCallback, useEffect, useLayoutEffect, useState} from 'react';
import {Image, InteractionManager, View} from 'react-native';
import type {ImageResizeMode, ImageSourcePropType, StyleProp, ViewStyle} from 'react-native';
import {InteractionManager, View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import type {MergeExclusive} from 'type-fest';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -96,9 +96,6 @@ type BaseFeatureTrainingModalProps = {

/** Whether to disable the modal */
isModalDisabled?: boolean;

/** Whether the modal image is a SVG */
shouldRenderSVG?: boolean;
};

type FeatureTrainingModalVideoProps = {
Expand Down Expand Up @@ -155,7 +152,6 @@ function FeatureTrainingModal({
imageWidth,
imageHeight,
isModalDisabled = true,
shouldRenderSVG = true,
}: FeatureTrainingModalProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand Down Expand Up @@ -219,19 +215,13 @@ function FeatureTrainingModal({
(!!videoURL || !!image) && {aspectRatio},
]}
>
{!!image && shouldRenderSVG ? (
{!!image && (
<ImageSVG
src={image}
contentFit={contentFitImage}
width={imageWidth}
height={imageHeight}
/>
) : (
<Image
source={image as ImageSourcePropType}
resizeMode={contentFitImage as ImageResizeMode}
style={styles.featureTrainingModalImage}
/>
)}
{!!videoURL && videoStatus === 'video' && (
<GestureHandlerRootView>
Expand Down Expand Up @@ -260,25 +250,23 @@ function FeatureTrainingModal({
</View>
);
}, [
image,
imageHeight,
imageWidth,
contentFitImage,
illustrationAspectRatio,
styles.w100,
styles.featureTrainingModalImage,
styles.onboardingVideoPlayer,
styles.flex1,
styles.alignItemsCenter,
styles.justifyContentCenter,
styles.h100,
illustrationInnerContainerStyle,
videoURL,
image,
shouldRenderSVG,
contentFitImage,
imageWidth,
imageHeight,
videoStatus,
videoURL,
animationStyle,
animation,
shouldUseNarrowLayout,
illustrationInnerContainerStyle,
]);

const toggleWillShowAgain = useCallback(() => setWillShowAgain((prevWillShowAgain) => !prevWillShowAgain), []);
Expand Down
38 changes: 0 additions & 38 deletions src/components/TestDriveModal.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6221,14 +6221,6 @@ const translations = {
talkToConcierge: 'Talk to Concierge',
hangUp: 'Hang up',
},
testDrive: {
modal: {
title: 'Take us for a test drive',
description: 'Take a quick product tour to get up to speed fast. No pit stops required!',
confirmText: 'Start test drive',
helpText: 'Skip',
},
},
};

export default translations satisfies TranslationDeepObject<typeof translations>;
8 changes: 0 additions & 8 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6744,14 +6744,6 @@ const translations = {
talkToConcierge: 'Habla con Concierge',
hangUp: 'Colgar',
},
testDrive: {
modal: {
title: 'Haz una prueba con nosotros',
description: 'Haz un recorrido rápido por el producto para ponerte al día rápidamente. ¡No se requieren paradas!',
confirmText: 'Iniciar prueba',
helpText: 'Omitir',
},
},
};

export default translations satisfies TranslationDeepObject<typeof en>;
6 changes: 0 additions & 6 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import LeftModalNavigator from './Navigators/LeftModalNavigator';
import MigratedUserWelcomeModalNavigator from './Navigators/MigratedUserWelcomeModalNavigator';
import OnboardingModalNavigator from './Navigators/OnboardingModalNavigator';
import RightModalNavigator from './Navigators/RightModalNavigator';
import TestDriveModalNavigator from './Navigators/TestDriveModalNavigator';
import WelcomeVideoModalNavigator from './Navigators/WelcomeVideoModalNavigator';
import useRootNavigatorScreenOptions from './useRootNavigatorScreenOptions';

Expand Down Expand Up @@ -631,11 +630,6 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
options={rootNavigatorScreenOptions.basicModalNavigator}
component={MigratedUserWelcomeModalNavigator}
/>
<RootStack.Screen
name={NAVIGATORS.TEST_DRIVE_MODAL_NAVIGATOR}
options={rootNavigatorScreenOptions.basicModalNavigator}
component={TestDriveModalNavigator}
/>
<RootStack.Screen
name={NAVIGATORS.FEATURE_TRANING_MODAL_NAVIGATOR}
options={rootNavigatorScreenOptions.basicModalNavigator}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const MODAL_ROUTES_TO_DISMISS: string[] = [
NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR,
NAVIGATORS.FEATURE_TRANING_MODAL_NAVIGATOR,
NAVIGATORS.SHARE_MODAL_NAVIGATOR,
NAVIGATORS.TEST_DRIVE_MODAL_NAVIGATOR,
SCREENS.NOT_FOUND,
SCREENS.ATTACHMENTS,
SCREENS.TRANSACTION_RECEIPT,
Expand Down
9 changes: 0 additions & 9 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,6 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
},
},

[NAVIGATORS.TEST_DRIVE_MODAL_NAVIGATOR]: {
screens: {
[SCREENS.TEST_DRIVE_MODAL.ROOT]: {
path: ROUTES.TEST_DRIVE_MODAL_ROOT,
exact: true,
},
},
},

[NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR]: {
// Don't set the initialRouteName, because when the user continues from the last visited onboarding page,
// the onboarding purpose page will be briefly visible.
Expand Down
6 changes: 0 additions & 6 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1778,10 +1778,6 @@ type MigratedUserModalNavigatorParamList = {
[SCREENS.MIGRATED_USER_WELCOME_MODAL.ROOT]: undefined;
};

type TestDriveModalNavigatorParamList = {
[SCREENS.TEST_DRIVE_MODAL.ROOT]: undefined;
};

type SharedScreensParamList = {
[NAVIGATORS.REPORTS_SPLIT_NAVIGATOR]: NavigatorScreenParams<ReportsSplitNavigatorParamList>;
[SCREENS.TRANSITION_BETWEEN_APPS]: {
Expand Down Expand Up @@ -1863,7 +1859,6 @@ type AuthScreensParamList = SharedScreensParamList & {
[NAVIGATORS.WELCOME_VIDEO_MODAL_NAVIGATOR]: NavigatorScreenParams<WelcomeVideoModalNavigatorParamList>;
[NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR]: NavigatorScreenParams<ExplanationModalNavigatorParamList>;
[NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR]: NavigatorScreenParams<MigratedUserModalNavigatorParamList>;
[NAVIGATORS.TEST_DRIVE_MODAL_NAVIGATOR]: NavigatorScreenParams<TestDriveModalNavigatorParamList>;
[NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR]: NavigatorScreenParams<SearchFullscreenNavigatorParamList>;
[SCREENS.DESKTOP_SIGN_IN_REDIRECT]: undefined;
[SCREENS.TRANSACTION_RECEIPT]: {
Expand Down Expand Up @@ -2059,7 +2054,6 @@ export type {
WorkspaceConfirmationNavigatorParamList,
TwoFactorAuthNavigatorParamList,
ConsoleNavigatorParamList,
TestDriveModalNavigatorParamList,
WorkspaceScreenName,
SettingsTabScreenName,
};
14 changes: 0 additions & 14 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5660,20 +5660,6 @@ const styles = (theme: ThemeColors) =>
left: 0,
right: 0,
},

testDriveModalContainer: {
// On small/medium screens, we need to remove the top padding
paddingTop: 0,
// On medium screens, we need to prevent the modal from becoming too big
maxWidth: 500,
},

featureTrainingModalImage: {
width: '100%',
height: '100%',
borderTopLeftRadius: variables.componentBorderRadiusLarge,
borderTopRightRadius: variables.componentBorderRadiusLarge,
},
} satisfies Styles);

type ThemeStyles = ReturnType<typeof styles>;
Expand Down
Loading