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

Add "Connection Complete" page #40497

Merged
merged 6 commits into from
May 1, 2024
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
330 changes: 330 additions & 0 deletions assets/images/connection-complete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const ROUTES = {

TRANSITION_BETWEEN_APPS: 'transition',
VALIDATE_LOGIN: 'v/:accountID/:validateCode',
CONNECTION_COMPLETE: 'connection-complete',
GET_ASSISTANCE: {
route: 'get-assistance/:taskID',
getRoute: (taskID: string, backTo: string) => getUrlWithBackToParam(`get-assistance/${taskID}`, backTo),
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const SCREENS = {
NOT_FOUND: 'not-found',
TRANSITION_BETWEEN_APPS: 'TransitionBetweenApps',
VALIDATE_LOGIN: 'ValidateLogin',
CONNECTION_COMPLETE: 'ConnectionComplete',
UNLINK_LOGIN: 'UnlinkLogin',
SETTINGS_CENTRAL_PANE: 'SettingsCentralPane',
WORKSPACES_CENTRAL_PANE: 'WorkspacesCentralPane',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import ClosedSign from '@assets/images/closed-sign.svg';
import Collapse from '@assets/images/collapse.svg';
import Concierge from '@assets/images/concierge.svg';
import Connect from '@assets/images/connect.svg';
import ConnectionComplete from '@assets/images/connection-complete.svg';
import Copy from '@assets/images/copy.svg';
import CreditCard from '@assets/images/creditcard.svg';
import DocumentPlus from '@assets/images/document-plus.svg';
Expand Down Expand Up @@ -197,6 +198,7 @@ export {
Concierge,
ConciergeAvatar,
Connect,
ConnectionComplete,
Copy,
CreditCard,
DeletedRoomAvatar,
Expand Down
4 changes: 4 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ export default {
folderNotAllowedMessage: 'Uploading a folder is not allowed. Try a different file.',
protectedPDFNotSupported: 'Password-protected PDF is not supported',
},
connectionComplete: {
title: 'Connection Complete',
supportingText: 'You can close this window and head back to the Expensify app.',
},
avatarCropModal: {
title: 'Edit photo',
description: 'Drag, zoom, and rotate your image to your preferred specifications',
Expand Down
4 changes: 4 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ export default {
subtitleText3: '.',
},
},
connectionComplete: {
title: 'Conexión Completa',
supportingText: 'Ya puedes cerrar esta página y volver a la App de Expensify.',
},
location: {
useCurrent: 'Usar ubicación actual',
notFound: 'No pudimos encontrar tu ubicación, inténtalo de nuevo o introduce una dirección manualmente.',
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import NetworkConnection from '@libs/NetworkConnection';
import * as Pusher from '@libs/Pusher/pusher';
import PusherConnectionManager from '@libs/PusherConnectionManager';
import * as SessionUtils from '@libs/SessionUtils';
import ConnectionCompletePage from '@pages/ConnectionCompletePage';
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import DesktopSignInRedirectPage from '@pages/signin/DesktopSignInRedirectPage';
import SearchInputManager from '@pages/workspace/SearchInputManager';
Expand Down Expand Up @@ -390,6 +391,11 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
getComponent={loadReceiptView}
listeners={modalScreenListeners}
/>
<RootStack.Screen
name={SCREENS.CONNECTION_COMPLETE}
options={defaultScreenOptions}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We forgot to remove the route from pages we can deeplink and incorrect options lead to #49342

component={ConnectionCompletePage}
/>
</RootStack.Navigator>
</View>
</OptionsListContextProvider>
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Navigation/AppNavigator/PublicScreens.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {createStackNavigator} from '@react-navigation/stack';
import React from 'react';
import type {PublicScreensParamList} from '@navigation/types';
import ConnectionCompletePage from '@pages/ConnectionCompletePage';
import LogInWithShortLivedAuthTokenPage from '@pages/LogInWithShortLivedAuthTokenPage';
import AppleSignInDesktopPage from '@pages/signin/AppleSignInDesktopPage';
import GoogleSignInDesktopPage from '@pages/signin/GoogleSignInDesktopPage';
Expand Down Expand Up @@ -33,6 +34,11 @@ function PublicScreens() {
options={defaultScreenOptions}
component={ValidateLoginPage}
/>
<RootStack.Screen
name={SCREENS.CONNECTION_COMPLETE}
options={defaultScreenOptions}
component={ConnectionCompletePage}
/>
<RootStack.Screen
name={SCREENS.UNLINK_LOGIN}
options={defaultScreenOptions}
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
[SCREENS.VALIDATE_LOGIN]: ROUTES.VALIDATE_LOGIN,
[SCREENS.UNLINK_LOGIN]: ROUTES.UNLINK_LOGIN,
[SCREENS.TRANSITION_BETWEEN_APPS]: ROUTES.TRANSITION_BETWEEN_APPS,
[SCREENS.CONNECTION_COMPLETE]: ROUTES.CONNECTION_COMPLETE,
[SCREENS.CONCIERGE]: ROUTES.CONCIERGE,
[SCREENS.SIGN_IN_WITH_APPLE_DESKTOP]: ROUTES.APPLE_SIGN_IN,
[SCREENS.SIGN_IN_WITH_GOOGLE_DESKTOP]: ROUTES.GOOGLE_SIGN_IN,
Expand Down
2 changes: 2 additions & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ type PublicScreensParamList = SharedScreensParamList & {
[SCREENS.SIGN_IN_WITH_APPLE_DESKTOP]: undefined;
[SCREENS.SIGN_IN_WITH_GOOGLE_DESKTOP]: undefined;
[SCREENS.SAML_SIGN_IN]: undefined;
[SCREENS.CONNECTION_COMPLETE]: undefined;
};

type AuthScreensParamList = SharedScreensParamList & {
Expand Down Expand Up @@ -788,6 +789,7 @@ type AuthScreensParamList = SharedScreensParamList & {
reportID: string;
transactionID: string;
};
[SCREENS.CONNECTION_COMPLETE]: undefined;
};

type RootStackParamList = PublicScreensParamList & AuthScreensParamList & ChatFinderNavigatorParamList;
Expand Down
44 changes: 44 additions & 0 deletions src/pages/ConnectionCompletePage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import {View} from 'react-native';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';

function ConnectionCompletePage() {
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
return (
<View style={styles.deeplinkWrapperContainer}>
<View style={styles.deeplinkWrapperMessage}>
<View style={styles.mb2}>
aldo-expensify marked this conversation as resolved.
Show resolved Hide resolved
<Icon
width={272}
height={188}
src={Expensicons.ConnectionComplete}
/>
</View>
<Text style={[styles.textHeadline, styles.textXXLarge, styles.textAlignCenter]}>{translate('connectionComplete.title')}</Text>
<View style={[styles.mt2, styles.mb2, {maxWidth: 280}]}>
<Text style={styles.textAlignCenter}>{translate('connectionComplete.supportingText')}</Text>
</View>
</View>
<View style={styles.deeplinkWrapperFooter}>
<Icon
width={variables.modalWordmarkWidth}
height={variables.modalWordmarkHeight}
fill={theme.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
</View>
);
}

ConnectionCompletePage.displayName = 'ConnectionCompletePage';

export default ConnectionCompletePage;
Loading