Skip to content

Commit

Permalink
fix: conflicts, use useRef
Browse files Browse the repository at this point in the history
  • Loading branch information
sangar-1028 committed Oct 10, 2023
2 parents ac91a21 + 11acdc2 commit 78c5727
Show file tree
Hide file tree
Showing 95 changed files with 1,204 additions and 593 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://raw.githubusercontent.com/Expensify/App/main/web/favicon.png" width="64" height="64" alt="New Expensify Icon">
</a>
<h1>
<a href="https://new.expensify.com">
<a href="https://new.expensify.com/">
New Expensify
</a>
</h1>
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001038000
versionName "1.3.80-0"
versionCode 1001038002
versionName "1.3.80-2"
}

flavorDimensions "default"
Expand Down
1 change: 1 addition & 0 deletions assets/animations/Magician.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Got a question about receipts, expenses, corporate cards, or anythi
url: https://help.expensify.com
author: Expensify
logo: /assets/images/expensify-help.svg
repository: Expensify/App
open_url: true

defaults:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
---
title: Account Details
description: Account Details
description: The Account Details section of your account is where you can update your profile photo, enable 2FA, and change the email address associated with your Expensify account.
---
## Resource Coming Soon!

# Overview
The Account Details section of your account is where you can update your profile photo, enable 2FA, and change the email address associated with your account.

You can have multiple email addresses tied to your account to make it easier to submit expenses or manage your account. Let’s go over how to configure the various account settings located under the Account Details section of your Expensify account.

# How to add a profile photo
To update your name or add a profile photo, navigate to **Settings** > **Account** > **Account Details.** Under “your profile” you’ll notice a profile picture thumbnail, click “edit photo” underneath to update the profile image.

# How to enable Two-Factor Authentication
Setting up Two-factor Authentication is one of the best ways to secure your account. This can be enabled individually in your account settings by following **Settings** > **Accounts** > **Account Details** > **Two Factor Authentication** and toggle the switch to **Enabled.**

Save or download your **Recovery Codes.** It’s important to keep these safe! You WILL lose access to your account if you cannot use your authenticator app and do not have your recovery codes.

Use your favorite authenticator app to connect to Expensify using the QR code or click the link to enter the secret key manually.

Once connected, quickly enter the code generated by your app into Expensify before the timeframe runs out!

# How to manage your devices
You can access your Expensify account on multiple devices, which allows for easy access to your account data. By heading to **Settings** > **Account** > **Account Details** > **Device Management**, you can review the devices that have access to your account.

From that same place in your account, you can remove any devices that should no longer have access. To do this, select the **Revoke** button next to each device you wish to remove access to your account.

# How to add a Secondary Login
A Secondary Login is helpful if you have multiple email addresses and don’t necessarily need multiple Expensify accounts. By adding additional emails to your Expensify account, you can use them to forward receipts to [email protected] and they will be uploaded to your main Expensify account. To get this added to your account, follow these steps:

1. Log in to your Expensify account through a web browser at www.expensify.com. Please note that this process cannot be completed using the mobile app; it must be done from the website at expensify.com.
2. Navigate to **Settings** > **Account** > **Account Details**. Scroll down to find the 'Secondary Logins' section, then click the 'Add Secondary Login' button.
3. Input the email address or mobile phone number you wish to add, ensuring you include the international code if applicable.
4. You will receive a prompt to enter the Magic Code, which will be sent to the email address you're adding as a secondary login.

# How to update your email address
Once a Secondary Login is added to your account, you can make it your primary email address. The primary address on an Expensify account is the address that will receive email notifications and updates regarding the account. Any new email addresses must be added as a secondary login before they can be made a primary address.

1. Log in to your Expensify account through a web browser at www.expensify.com. Please note that this process cannot be completed using the mobile app; it must be done from the website at expensify.com.
2. Navigate to **Settings** > **Account** > **Account Details**. Scroll down to find the 'Secondary Logins' section, then select the **"Make Primary"** button next to the email address.
3. You can keep the old address as a secondary login or delete email addresses by selecting the **"Remove"** button.


# Deep Dive
## Managing emails connected to other Expensify accounts
A secondary login can only be added if it is not linked to an existing account. If you have two email addresses with Expensify accounts linked to them, you'll need to merge them instead.

Alternatively, you can remove a personal email address from a previous work/organization account to use it elsewhere.

Is your Secondary Login (personal email) validated in your company account? If so, do the following:
1. Navigate to expensify.com
2. Log in using your validated Secondary Login
3. Navigate to **Account** > **Settings** > **Account Details** > **Secondary Logins**
4. Remove your personal email address from the account by clicking the **"Remove"** button next to your email

Is your Secondary Login (personal email) invalidated in your company account? If so, do the following:
1. Navigate to expensify.com
2. Enter your invalidated secondary login email address
3. You will be presented with a confirmation message saying Expensify sent you an email with a validation link
4. Head to your personal email account and follow the prompts
5. You'll receive a link in the email to click that will unlink the two accounts
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.80.0</string>
<string>1.3.80.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.80.0</string>
<string>1.3.80.2</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ PODS:
- React
- react-native-image-picker (5.1.0):
- React-Core
- react-native-key-command (1.0.1):
- react-native-key-command (1.0.6):
- React-Core
- react-native-netinfo (9.3.10):
- React-Core
Expand Down Expand Up @@ -1257,7 +1257,7 @@ SPEC CHECKSUMS:
react-native-geolocation: 0f7fe8a4c2de477e278b0365cce27d089a8c5903
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
react-native-image-picker: c33d4e79f0a14a2b66e5065e14946ae63749660b
react-native-key-command: c2645ec01eb1fa664606c09480c05cb4220ef67b
react-native-key-command: 5af6ee30ff4932f78da6a2109017549042932aa5
react-native-netinfo: ccbe1085dffd16592791d550189772e13bf479e2
react-native-pager-view: 0ccb8bf60e2ebd38b1f3669fa3650ecce81db2df
react-native-pdf: 7c0e91ada997bac8bac3bb5bea5b6b81f5a3caae
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.svg?$': 'jest-transformer-svg',
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!react-native)/'],
testPathIgnorePatterns: ['<rootDir>/node_modules'],
Expand Down
36 changes: 27 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.80-0",
"version": "1.3.80-2",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -114,8 +114,8 @@
"react-collapse": "^5.1.0",
"react-content-loader": "^6.1.0",
"react-dom": "18.1.0",
"react-map-gl": "^7.1.3",
"react-error-boundary": "^4.0.11",
"react-map-gl": "^7.1.3",
"react-native": "0.72.4",
"react-native-android-location-enabler": "^1.2.2",
"react-native-blob-util": "^0.17.3",
Expand All @@ -133,7 +133,7 @@
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-picker": "^5.1.0",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#8393b7e58df6ff65fd41f60aee8ece8822c91e2b",
"react-native-key-command": "^1.0.5",
"react-native-key-command": "^1.0.6",
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
Expand Down Expand Up @@ -252,6 +252,7 @@
"jest-circus": "29.4.1",
"jest-cli": "29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest-transformer-svg": "^2.0.1",
"metro-react-native-babel-preset": "0.76.8",
"mock-fs": "^4.13.0",
"onchange": "^7.1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ const CONST = {
BETA_EXPENSIFY_WALLET: 'expensifyWallet',
BETA_COMMENT_LINKING: 'commentLinking',
INTERNATIONALIZATION: 'internationalization',
IOU_SEND: 'sendMoney',
POLICY_ROOMS: 'policyRooms',
PASSWORDLESS: 'passwordless',
TASKS: 'tasks',
Expand Down Expand Up @@ -1264,7 +1263,7 @@ const CONST = {
CARD_NUMBER: /^[0-9]{15,16}$/,
CARD_SECURITY_CODE: /^[0-9]{3,4}$/,
CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/,
ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/,
ROOM_NAME: /^#[\p{Ll}0-9-]{1,80}$/u,

// eslint-disable-next-line max-len, no-misleading-character-class
EMOJIS: /[\p{Extended_Pictographic}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/gu,
Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export default {
SETTINGS_ENABLE_PAYMENTS: 'settings/wallet/enable-payments',
SETTINGS_WALLET_TRANSFER_BALANCE: 'settings/wallet/transfer-balance',
SETTINGS_WALLET_CHOOSE_TRANSFER_ACCOUNT: 'settings/wallet/choose-transfer-account',
SETTINGS_WALLET_CARD_ACTIVATE: {
route: 'settings/wallet/cards/:domain/activate',
getRoute: (domain: string) => `settings/wallet/cards/${domain}/activate`,
},
SETTINGS_PERSONAL_DETAILS: 'settings/profile/personal-details',
SETTINGS_PERSONAL_DETAILS_LEGAL_NAME: 'settings/profile/personal-details/legal-name',
SETTINGS_PERSONAL_DETAILS_DATE_OF_BIRTH: 'settings/profile/personal-details/date-of-birth',
Expand Down
1 change: 1 addition & 0 deletions src/components/BaseMiniContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function BaseMiniContextMenuItem(props) {
style={({hovered, pressed}) => [
styles.reportActionContextMenuMiniButton,
StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed, props.isDelayButtonStateComplete)),
props.isDelayButtonStateComplete && styles.cursorDefault,
]}
>
{(pressableState) => (
Expand Down
3 changes: 2 additions & 1 deletion src/components/CategoryPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC
}, [selectedCategory]);

const sections = useMemo(() => {
const validPolicyRecentlyUsedCategories = _.filter(policyRecentlyUsedCategories, (p) => !_.isEmpty(p));
const {categoryOptions} = OptionsListUtils.getFilteredOptions(
{},
{},
Expand All @@ -43,7 +44,7 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC
false,
true,
policyCategories,
policyRecentlyUsedCategories,
validPolicyRecentlyUsedCategories,
false,
);

Expand Down
1 change: 1 addition & 0 deletions src/components/ContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function ContextMenuItem({onPress, successIcon, successText, icon, text, isMini,
style={getContextMenuItemStyles(windowWidth)}
isAnonymousAction={isAnonymousAction}
focused={isFocused}
interactive={isThrottledButtonActive}
/>
);
}
Expand Down
14 changes: 2 additions & 12 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class EmojiPickerMenu extends Component {
return;
}
const emoji = lodashGet(item, ['types', this.props.preferredSkinTone], item.code);
this.addToFrequentAndSelectEmoji(emoji, item);
this.props.onEmojiSelected(emoji, item);
return;
}

Expand Down Expand Up @@ -258,16 +258,6 @@ class EmojiPickerMenu extends Component {
document.removeEventListener('mousemove', this.mouseMoveHandler);
}

/**
* @param {String} emoji
* @param {Object} emojiObject
*/
addToFrequentAndSelectEmoji(emoji, emojiObject) {
const frequentEmojiList = EmojiUtils.getFrequentlyUsedEmojis(emojiObject);
User.updateFrequentlyUsedEmojis(frequentEmojiList);
this.props.onEmojiSelected(emoji, emojiObject);
}

/**
* Focuses the search Input and has the text selected
*/
Expand Down Expand Up @@ -466,7 +456,7 @@ class EmojiPickerMenu extends Component {

return (
<EmojiPickerMenuItem
onPress={(emoji) => this.addToFrequentAndSelectEmoji(emoji, item)}
onPress={(emoji) => this.props.onEmojiSelected(emoji, item)}
onHoverIn={() => this.setState({highlightedIndex: index, isUsingKeyboardMovement: false})}
onHoverOut={() => {
if (this.state.arePointerEventsDisabled) {
Expand Down
12 changes: 1 addition & 11 deletions src/components/EmojiPicker/EmojiPickerMenu/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ function EmojiPickerMenu({preferredLocale, onEmojiSelected, preferredSkinTone, t
setHeaderIndices(undefined);
}, 300);

/**
* @param {String} emoji
* @param {Object} emojiObject
*/
const addToFrequentAndSelectEmoji = (emoji, emojiObject) => {
const frequentEmojiList = EmojiUtils.getFrequentlyUsedEmojis(emojiObject);
User.updateFrequentlyUsedEmojis(frequentEmojiList);
onEmojiSelected(emoji, emojiObject);
};

/**
* @param {Number} skinTone
*/
Expand Down Expand Up @@ -152,7 +142,7 @@ function EmojiPickerMenu({preferredLocale, onEmojiSelected, preferredSkinTone, t

return (
<EmojiPickerMenuItem
onPress={singleExecution((emoji) => addToFrequentAndSelectEmoji(emoji, item))}
onPress={singleExecution((emoji) => onEmojiSelected(emoji, item))}
emoji={emojiCode}
/>
);
Expand Down
Loading

0 comments on commit 78c5727

Please sign in to comment.