Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into fix/issue-34764
Browse files Browse the repository at this point in the history
  • Loading branch information
s-alves10 authored Jan 23, 2024
2 parents d766e84 + f50f9ee commit 3dd0e16
Show file tree
Hide file tree
Showing 44 changed files with 983 additions and 563 deletions.
10 changes: 10 additions & 0 deletions assets/images/scan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3130,6 +3130,13 @@ const CONST = {
REPORT: 'REPORT',
},

INTRO_CHOICES: {
TRACK: 'newDotTrack',
SUBMIT: 'newDotSubmit',
MANAGE_TEAM: 'newDotManageTeam',
CHAT_SPLIT: 'newDotSplitChat',
},

MINI_CONTEXT_MENU_MAX_ITEMS: 4,

REPORT_FIELD_TITLE_FIELD_ID: 'text_title',
Expand Down
10 changes: 9 additions & 1 deletion src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ const ONYXKEYS = {
/** This NVP holds to most recent waypoints that a person has used when creating a distance request */
NVP_RECENT_WAYPOINTS: 'expensify_recentWaypoints',

/** This NVP will be `true` if the user has ever dismissed the engagement modal on either OldDot or NewDot. If it becomes true it should stay true forever. */
NVP_HAS_DISMISSED_IDLE_PANEL: 'hasDismissedIdlePanel',

/** This NVP contains the choice that the user made on the engagement modal */
NVP_INTRO_SELECTED: 'introSelected',

/** Does this user have push notifications enabled for this device? */
PUSH_NOTIFICATIONS_ENABLED: 'pushNotificationsEnabled',

Expand Down Expand Up @@ -395,6 +401,8 @@ type OnyxValues = {
[ONYXKEYS.FOCUS_MODE_NOTIFICATION]: boolean;
[ONYXKEYS.NVP_LAST_PAYMENT_METHOD]: Record<string, string>;
[ONYXKEYS.NVP_RECENT_WAYPOINTS]: OnyxTypes.RecentWaypoint[];
[ONYXKEYS.NVP_HAS_DISMISSED_IDLE_PANEL]: boolean;
[ONYXKEYS.NVP_INTRO_SELECTED]: OnyxTypes.IntroSelected;
[ONYXKEYS.PUSH_NOTIFICATIONS_ENABLED]: boolean;
[ONYXKEYS.PLAID_DATA]: OnyxTypes.PlaidData;
[ONYXKEYS.IS_PLAID_DISABLED]: boolean;
Expand Down Expand Up @@ -463,7 +471,7 @@ type OnyxValues = {
[ONYXKEYS.COLLECTION.TRANSACTION_DRAFT]: OnyxTypes.Transaction;
[ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_TAGS]: OnyxTypes.RecentlyUsedTags;
[ONYXKEYS.COLLECTION.SELECTED_TAB]: string;
[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS]: OnyxTypes.TransactionViolations;
[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS]: OnyxTypes.TransactionViolation[];
[ONYXKEYS.COLLECTION.PRIVATE_NOTES_DRAFT]: string;
[ONYXKEYS.COLLECTION.NEXT_STEP]: OnyxTypes.ReportNextStep;

Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ function AttachmentModal(props) {
shouldShowThreeDotsButton={shouldShowThreeDotsButton}
threeDotsAnchorPosition={styles.threeDotsPopoverOffsetAttachmentModal(windowWidth)}
threeDotsMenuItems={threeDotsMenuItems}
shouldOverlay
shouldOverlayDots
/>
<View style={styles.imageModalImageCenterContainer}>
{!_.isEmpty(props.report) && !props.isReceiptAttachment ? (
Expand Down
2 changes: 1 addition & 1 deletion src/components/DisplayNames/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type DisplayNameWithTooltip = {
login?: string;

/** The avatar for the tooltip fallback */
avatar: AvatarSource;
avatar?: AvatarSource;
};

type DisplayNamesProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ const propTypes = {

/** Whether we should navigate to report page when the route have a topMostReport */
shouldNavigateToTopMostReport: PropTypes.bool,

/** Whether we should overlay the 3 dots menu */
shouldOverlayDots: PropTypes.bool,
};

export default propTypes;
7 changes: 4 additions & 3 deletions src/components/HeaderWithBackButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {Keyboard, View} from 'react-native';
import {Keyboard, StyleSheet, View} from 'react-native';
import AvatarWithDisplayName from '@components/AvatarWithDisplayName';
import Header from '@components/Header';
import Icon from '@components/Icon';
Expand Down Expand Up @@ -52,6 +52,7 @@ function HeaderWithBackButton({
threeDotsMenuItems = [],
shouldEnableDetailPageNavigation = false,
children = null,
shouldOverlayDots = false,
shouldOverlay = false,
singleExecution = (func) => func,
shouldNavigateToTopMostReport = false,
Expand All @@ -69,7 +70,7 @@ function HeaderWithBackButton({
// Hover on some part of close icons will not work on Electron if dragArea is true
// https://github.com/Expensify/App/issues/29598
dataSet={{dragArea: false}}
style={[styles.headerBar, shouldShowBorderBottom && styles.borderBottom, shouldShowBackButton && styles.pl2]}
style={[styles.headerBar, shouldShowBorderBottom && styles.borderBottom, shouldShowBackButton && styles.pl2, shouldOverlay && StyleSheet.absoluteFillObject]}
>
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.justifyContentBetween, styles.overflowHidden]}>
{shouldShowBackButton && (
Expand Down Expand Up @@ -163,7 +164,7 @@ function HeaderWithBackButton({
menuItems={threeDotsMenuItems}
onIconPress={onThreeDotsButtonPress}
anchorPosition={threeDotsAnchorPosition}
shouldOverlay={shouldOverlay}
shouldOverlay={shouldOverlayDots}
/>
)}
{shouldShowCloseButton && (
Expand Down
3 changes: 3 additions & 0 deletions src/components/HeaderWithBackButton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ type HeaderWithBackButtonProps = Partial<ChildrenProps> & {

/** Whether we should enable detail page navigation */
shouldEnableDetailPageNavigation?: boolean;

/** Whether we should overlay the 3 dots menu */
shouldOverlayDots?: boolean;
};

export type {ThreeDotsMenuItem};
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 @@ -107,6 +107,7 @@ import ReceiptSearch from '@assets/images/receipt-search.svg';
import Receipt from '@assets/images/receipt.svg';
import Rotate from '@assets/images/rotate-image.svg';
import RotateLeft from '@assets/images/rotate-left.svg';
import Scan from '@assets/images/scan.svg';
import Send from '@assets/images/send.svg';
import Shield from '@assets/images/shield.svg';
import AppleLogo from '@assets/images/signIn/apple-logo.svg';
Expand Down Expand Up @@ -243,6 +244,7 @@ export {
ReceiptSearch,
Rotate,
RotateLeft,
Scan,
Send,
Shield,
Sync,
Expand Down
222 changes: 0 additions & 222 deletions src/components/LHNOptionsList/LHNOptionsList.js

This file was deleted.

Loading

0 comments on commit 3dd0e16

Please sign in to comment.