Skip to content

Commit

Permalink
Merge branch 'main' into revert-43016-cmartins-temporarilyDisableQueries
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jun 7, 2024
2 parents f5e7cbd + c03552b commit cd8990b
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 27 deletions.
12 changes: 12 additions & 0 deletions assets/images/inbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions assets/images/money-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import Home from '@assets/images/home.svg';
import Hourglass from '@assets/images/hourglass.svg';
import ImageCropCircleMask from '@assets/images/image-crop-circle-mask.svg';
import ImageCropSquareMask from '@assets/images/image-crop-square-mask.svg';
import Inbox from '@assets/images/inbox.svg';
import Info from '@assets/images/info.svg';
import QBOSquare from '@assets/images/integrationicons/qbo-icon-square.svg';
import XeroSquare from '@assets/images/integrationicons/xero-icon-square.svg';
Expand All @@ -116,6 +117,7 @@ import Menu from '@assets/images/menu.svg';
import Meter from '@assets/images/meter.svg';
import MoneyBag from '@assets/images/money-bag.svg';
import MoneyCircle from '@assets/images/money-circle.svg';
import MoneySearch from '@assets/images/money-search.svg';
import MoneyWaving from '@assets/images/money-waving.svg';
import Monitor from '@assets/images/monitor.svg';
import Mute from '@assets/images/mute.svg';
Expand Down Expand Up @@ -270,6 +272,7 @@ export {
History,
Home,
Hourglass,
Inbox,
ImageCropCircleMask,
ImageCropSquareMask,
Info,
Expand All @@ -290,6 +293,7 @@ export {
Megaphone,
MoneyBag,
MoneyCircle,
MoneySearch,
MoneyWaving,
Monitor,
Mute,
Expand Down
14 changes: 0 additions & 14 deletions src/components/TestToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as ApiUtils from '@libs/ApiUtils';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
import * as Network from '@userActions/Network';
import * as Session from '@userActions/Session';
import * as User from '@userActions/User';
import CONFIG from '@src/CONFIG';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {Network as NetworkOnyx, User as UserOnyx} from '@src/types/onyx';
import Button from './Button';
import {withNetwork} from './OnyxProvider';
Expand Down Expand Up @@ -92,17 +89,6 @@ function TestToolMenu({user = USER_DEFAULT, network}: TestToolMenuProps) {
onPress={() => Session.invalidateCredentials()}
/>
</TestToolRow>

{/* Navigate to the new Search Page. This button is temporary and should be removed after passing QA tests. */}
<TestToolRow title="New Search Page">
<Button
small
text="Navigate"
onPress={() => {
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL));
}}
/>
</TestToolRow>
</>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default {
magicCode: 'Magic code',
twoFactorCode: 'Two-factor code',
workspaces: 'Workspaces',
chats: 'Chats',
inbox: 'Inbox',
group: 'Group',
profile: 'Profile',
referral: 'Referral',
Expand Down Expand Up @@ -2391,7 +2391,7 @@ export default {
subtitle: 'Connect to your accounting system to code transactions with your chart of accounts, auto-match payments, and keep your finances in sync.',
qbo: 'Quickbooks Online',
xero: 'Xero',
setup: 'Set up',
setup: 'Connect',
lastSync: 'Last synced just now',
import: 'Import',
export: 'Export',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default {
magicCode: 'Código mágico',
twoFactorCode: 'Autenticación de dos factores',
workspaces: 'Espacios de trabajo',
chats: 'Chats',
inbox: 'Bandeja de entrada',
group: 'Grupo',
profile: 'Perfil',
referral: 'Remisión',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps

return (
<View style={styles.bottomTabBarContainer}>
<Tooltip text={translate('common.chats')}>
<Tooltip text={translate('common.inbox')}>
<PressableWithFeedback
onPress={() => {
Navigation.navigate(ROUTES.HOME);
}}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.chats')}
accessibilityLabel={translate('common.inbox')}
wrapperStyle={styles.flex1}
style={styles.bottomTabBarItem}
>
<View>
<Icon
src={Expensicons.ChatBubble}
src={Expensicons.Inbox}
fill={currentTabName === SCREENS.HOME ? theme.iconMenu : theme.icon}
width={variables.iconBottomBar}
height={variables.iconBottomBar}
Expand All @@ -93,8 +93,30 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
</View>
</PressableWithFeedback>
</Tooltip>
<BottomTabBarFloatingActionButton />
<Tooltip text={translate('common.search')}>
<PressableWithFeedback
onPress={() => {
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL));
}}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.search')}
wrapperStyle={styles.flex1}
style={styles.bottomTabBarItem}
>
<View>
<Icon
src={Expensicons.MoneySearch}
fill={currentTabName === SCREENS.SEARCH.BOTTOM_TAB || currentTabName === SCREENS.SEARCH.CENTRAL_PANE ? theme.iconMenu : theme.icon}
width={variables.iconBottomBar}
height={variables.iconBottomBar}
/>
</View>
</PressableWithFeedback>
</Tooltip>
<BottomTabAvatar isSelected={currentTabName === SCREENS.SETTINGS.ROOT} />
<View style={[styles.flex1, styles.bottomTabBarItem]}>
<BottomTabBarFloatingActionButton />
</View>
</View>
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/libs/Network/SequentialQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ function flush() {
Onyx.disconnect(connectionID);
process().finally(() => {
isSequentialQueueRunning = false;
resolveIsReadyPromise?.();
if (NetworkStore.isOffline() || PersistedRequests.getAll().length === 0) {
resolveIsReadyPromise?.();
}
currentRequest = null;
flushOnyxUpdatesQueue();
});
Expand Down
4 changes: 1 addition & 3 deletions src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,7 @@ function hasNoticeTypeViolation(transactionID: string, transactionViolations: On
* Checks if any violations for the provided transaction are of type 'warning'
*/
function hasWarningTypeViolation(transactionID: string, transactionViolations: OnyxCollection<TransactionViolation[]>): boolean {
return Boolean(
transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING),
);
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function BaseSidebarScreen() {
{({insets}) => (
<>
<TopBar
breadcrumbLabel={translate('common.chats')}
breadcrumbLabel={translate('common.inbox')}
activeWorkspaceID={activeWorkspaceID}
/>
<View style={[styles.flex1]}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signin/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function getRenderOptions({
}

// Show the Welcome form if a user is signing up for a new account in a domain that is not controlled
const shouldShouldSignUpWelcomeForm = Boolean(credentials?.login) && !account?.validated && !account?.accountExists && !account?.domainControlled;
const shouldShouldSignUpWelcomeForm = !!credentials?.login && !account?.validated && !account?.accountExists && !account?.domainControlled;
const shouldShowLoginForm = !shouldShowAnotherLoginPageOpenedMessage && !hasLogin && !hasValidateCode;
const shouldShowEmailDeliveryFailurePage = hasLogin && hasEmailDeliveryFailure && !shouldShowChooseSSOOrMagicCode && !shouldInitiateSAMLLogin;
const isUnvalidatedSecondaryLogin = hasLogin && !isPrimaryLogin && !account?.validated && !hasEmailDeliveryFailure;
Expand Down

0 comments on commit cd8990b

Please sign in to comment.