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

Remove mWeb Download Banner #27498

Merged
merged 5 commits into from
Sep 18, 2023
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
2 changes: 0 additions & 2 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import KeyboardShortcutsModal from './components/KeyboardShortcutsModal';
import AppleAuthWrapper from './components/SignInButtons/AppleAuthWrapper';
import EmojiPicker from './components/EmojiPicker/EmojiPicker';
import * as EmojiPickerAction from './libs/actions/EmojiPickerAction';
import DownloadAppModal from './components/DownloadAppModal';
import DeeplinkWrapper from './components/DeeplinkWrapper';

// This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection
Expand Down Expand Up @@ -193,7 +192,6 @@ function Expensify(props) {
<DeeplinkWrapper isAuthenticated={isAuthenticated}>
{shouldInit && (
<>
<DownloadAppModal isAuthenticated={isAuthenticated} />
<KeyboardShortcutsModal />
<GrowlNotification ref={Growl.growlRef} />
<PopoverReportActionContextMenu ref={ReportActionContextMenu.contextMenuRef} />
Expand Down
4 changes: 0 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ const ONYXKEYS = {
SESSION: 'session',
BETAS: 'betas',

/** Denotes if the Download App Banner has been dismissed */
SHOW_DOWNLOAD_APP_BANNER: 'showDownloadAppBanner',

/** NVP keys
* Contains the user's payPalMe data */
PAYPAL: 'paypal',
Expand Down Expand Up @@ -306,7 +303,6 @@ type OnyxValues = {
[ONYXKEYS.ACTIVE_CLIENTS]: string[];
[ONYXKEYS.DEVICE_ID]: string;
[ONYXKEYS.IS_SIDEBAR_LOADED]: boolean;
[ONYXKEYS.SHOW_DOWNLOAD_APP_BANNER]: boolean;
[ONYXKEYS.PERSISTED_REQUESTS]: OnyxTypes.Request[];
[ONYXKEYS.QUEUED_ONYX_UPDATES]: OnyxTypes.QueuedOnyxUpdates;
[ONYXKEYS.CURRENT_DATE]: string;
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConfirmContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function ConfirmContent(props) {
<View style={[styles.flexRow, styles.mb3]}>
<Icon
src={props.iconSource}
width={variables.downloadAppModalAppIconSize}
height={variables.downloadAppModalAppIconSize}
width={variables.appModalAppIconSize}
height={variables.appModalAppIconSize}
additionalStyles={[...props.iconAdditionalStyles]}
/>
</View>
Expand Down
79 changes: 0 additions & 79 deletions src/components/DownloadAppModal.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,6 @@ export default {
`It's always great to see a new face around here! Please enter the magic code sent to ${login}. It should arrive within a minute or two.`,
welcomeEnterMagicCode: ({login}: WelcomeEnterMagicCodeParams) => `Please enter the magic code sent to ${login}. It should arrive within a minute or two.`,
},
DownloadAppModal: {
downloadTheApp: 'Download the app',
keepTheConversationGoing: 'Keep the conversation going in New Expensify, download the app for an enhanced experience.',
noThanks: 'No thanks',
},
login: {
hero: {
header: 'Split bills, request payments, and chat with friends.',
Expand Down
5 changes: 0 additions & 5 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@ export default {
`¡Siempre es genial ver una cara nueva por aquí! Por favor ingresa el código mágico enviado a ${login}. Debería llegar en un par de minutos.`,
welcomeEnterMagicCode: ({login}: WelcomeEnterMagicCodeParams) => `Por favor, introduce el código mágico enviado a ${login}. Debería llegar en un par de minutos.`,
},
DownloadAppModal: {
downloadTheApp: 'Descarga la aplicación',
keepTheConversationGoing: 'Mantén la conversación en New Expensify, descarga la aplicación para una experiencia mejorada.',
noThanks: 'No, gracias',
},
login: {
hero: {
header: 'Divida las facturas, solicite pagos y chatee con sus amigos.',
Expand Down
11 changes: 0 additions & 11 deletions src/libs/actions/DownloadAppModal.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import lodashGet from 'lodash/get';
import {View} from 'react-native';
import styles from '../../../../styles/styles';
import * as Expensicons from '../../../../components/Icon/Expensicons';
import * as Browser from '../../../../libs/Browser';
import Navigation from '../../../../libs/Navigation/Navigation';
import ROUTES from '../../../../ROUTES';
import NAVIGATORS from '../../../../NAVIGATORS';
Expand Down Expand Up @@ -62,9 +61,6 @@ const propTypes = {
/** Indicated whether the report data is loading */
isLoading: PropTypes.bool,

/** For first time users, whether the download app banner should show */
shouldShowDownloadAppBanner: PropTypes.bool,

/** Forwarded ref to FloatingActionButtonAndPopover */
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
};
Expand All @@ -75,7 +71,6 @@ const defaultProps = {
betas: [],
isLoading: false,
innerRef: null,
shouldShowDownloadAppBanner: true,
};

/**
Expand Down Expand Up @@ -158,12 +153,9 @@ function FloatingActionButtonAndPopover(props) {
if (currentRoute && ![NAVIGATORS.CENTRAL_PANE_NAVIGATOR, SCREENS.HOME].includes(currentRoute.name)) {
return;
}
// Avoid rendering the create menu for first-time users until they have dismissed the download app banner (mWeb only).
if (props.shouldShowDownloadAppBanner && Browser.isMobile()) {
return;
}
Welcome.show({routes, showCreateMenu});
}, [props.shouldShowDownloadAppBanner, props.navigation, showCreateMenu, props.demoInfo]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Comment on lines +157 to +158
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a revert from the original PR #26182


useEffect(() => {
if (!didScreenBecomeInactive()) {
Expand Down Expand Up @@ -291,9 +283,6 @@ export default compose(
isLoading: {
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
},
shouldShowDownloadAppBanner: {
key: ONYXKEYS.SHOW_DOWNLOAD_APP_BANNER,
},
}),
)(
forwardRef((props, ref) => (
Expand Down
2 changes: 1 addition & 1 deletion src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
componentBorderRadiusLarge: 16,
componentBorderRadiusCard: 12,
componentBorderRadiusRounded: 24,
downloadAppModalAppIconSize: 48,
appModalAppIconSize: 48,
buttonBorderRadius: 100,
avatarSizeLargeBordered: 88,
avatarSizeLarge: 80,
Expand Down
Loading