Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into fix/46299
Browse files Browse the repository at this point in the history
  • Loading branch information
NJ-2020 committed Oct 26, 2024
2 parents 5755336 + 9508b17 commit 824ed80
Show file tree
Hide file tree
Showing 22 changed files with 503 additions and 299 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ jobs:
- name: Determine "baseline ref" (prev merge commit)
id: getBaselineRef
run: |
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
git checkout "$previous_merge"
# Get the name of the current branch
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$current_branch" = "main" ]; then
# On the main branch, find the previous merge commit
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
else
# On a feature branch, find the common ancestor of the current branch and main
previous_merge=$(git merge-base HEAD main)
fi
echo "$previous_merge"
echo "BASELINE_REF=$previous_merge" >> "$GITHUB_OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
load(bridgelessEnabled = false)
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
Expand Down
5 changes: 3 additions & 2 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ https://community.expensify.com/discussion/6699/faq-troubleshooting-known-bank-s
https://community.expensify.com/discussion/4730/faq-expenses-are-exporting-to-the-wrong-accounts-whys-that,https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Company-Card-Settings
https://community.expensify.com/discussion/9000/how-to-integrate-with-deel,https://help.expensify.com/articles/expensify-classic/connections/Deel
https://community.expensify.com/categories/expensify-classroom,https://use.expensify.com
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/adding-payment-card-subscription-overview,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/add-a-payment-card-and-view-your-subscription
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/adding-payment-card-subscription-overview,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Add-a-payment-card-and-view-your-subscription
https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Send-Receive-for-Invoices,https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Send-and-Receive-Payment-for-Invoices.md
https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Bulk-Upload-Multiple-Invoices,https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Add-Invoices-in-Bulk
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Pay-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Create-and-Pay-Bills
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Pay-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Create-and-Pay-Bills
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/add-a-payment-card-and-view-your-subscription,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Add-a-payment-card-and-view-your-subscription
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
index 03f001c..23d467d 100644
index 03f001c..358c795 100644
--- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
+++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
@@ -65,7 +65,7 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) {
return NativeModule;
}

- const properties = Object.keys(NativeModule);
+ const properties = Object.keys(Object.getPrototypeOf(NativeModule));
+ const properties = [...Object.keys(Object.getPrototypeOf(NativeModule)), ...Object.keys(NativeModule)];

for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i];
9 changes: 5 additions & 4 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4840,10 +4840,11 @@ const CONST = {
'\n' +
'Here’s how to request money:\n' +
'\n' +
'1. Click the green *+* button.\n' +
'2. Choose *Split expense*.\n' +
'3. Scan a receipt or enter an amount.\n' +
'4. Add your friend(s) to the request.\n' +
'1. Hit the green *+* button.\n' +
'2. Choose *Start chat*.\n' +
'3. Enter any email, SMS, or name of who you want to split with.\n' +
'4. From within the chat, hit the *+* button on the message bar, and hit *Split expense*.\n' +
'5. Create the expense by selecting Manual, Scan or Distance.\n' +
'\n' +
'Feel free to add more details if you want, or just send it off. Let’s get you paid back!',
},
Expand Down
1 change: 1 addition & 0 deletions src/components/ButtonWithDropdownMenu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type DropdownOption<TValueType> = {
iconWidth?: number;
iconHeight?: number;
iconDescription?: string;
additionalIconStyles?: StyleProp<ViewStyle>;
onSelected?: () => void;
disabled?: boolean;
iconFill?: string;
Expand Down
18 changes: 8 additions & 10 deletions src/components/EmojiPicker/EmojiPickerMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function EmojiPickerMenu({onEmojiSelected, activeEmoji}: EmojiPickerMenuProps, r
setFilteredEmojis(allEmojis);
setHeaderIndices(headerRowIndices);
setFocusedIndex(-1);
setHighlightFirstEmoji(false);
setHighlightEmoji(false);
return;
}
Expand All @@ -139,14 +140,6 @@ function EmojiPickerMenu({onEmojiSelected, activeEmoji}: EmojiPickerMenuProps, r
return;
}

if (!isEnterWhileComposition(keyBoardEvent) && keyBoardEvent.key === CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey) {
// On web, avoid this Enter default input action; otherwise, it will add a new line in the subsequently focused composer.
keyBoardEvent.preventDefault();
// On mWeb, avoid propagating this Enter keystroke to Pressable child component; otherwise, it will trigger the onEmojiSelected callback again.
keyBoardEvent.stopPropagation();
return;
}

// Enable keyboard movement if tab or enter is pressed or if shift is pressed while the input
// is not focused, so that the navigation and tab cycling can be done using the keyboard without
// interfering with the input behaviour.
Expand Down Expand Up @@ -182,9 +175,13 @@ function EmojiPickerMenu({onEmojiSelected, activeEmoji}: EmojiPickerMenuProps, r
if ('types' in item || 'name' in item) {
const emoji = typeof preferredSkinTone === 'number' && preferredSkinTone !== -1 && item?.types?.at(preferredSkinTone) ? item.types.at(preferredSkinTone) : item.code;
onEmojiSelected(emoji ?? '', item);
// On web, avoid this Enter default input action; otherwise, it will add a new line in the subsequently focused composer.
keyBoardEvent.preventDefault();
// On mWeb, avoid propagating this Enter keystroke to Pressable child component; otherwise, it will trigger the onEmojiSelected callback again.
keyBoardEvent.stopPropagation();
}
},
{shouldPreventDefault: true, shouldStopPropagation: true},
{shouldPreventDefault: false},
);

/**
Expand Down Expand Up @@ -239,8 +236,9 @@ function EmojiPickerMenu({onEmojiSelected, activeEmoji}: EmojiPickerMenuProps, r

const calculatedOffset = Math.floor(headerIndex / CONST.EMOJI_NUM_PER_ROW) * CONST.EMOJI_PICKER_HEADER_HEIGHT;
emojiListRef.current?.scrollToOffset({offset: calculatedOffset, animated: true});
setFocusedIndex(headerIndex);
},
[emojiListRef],
[emojiListRef, setFocusedIndex],
);

/**
Expand Down
5 changes: 5 additions & 0 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ type MenuItemBaseProps = {
/** Any additional styles to pass to the icon container. */
iconStyles?: StyleProp<ViewStyle>;

/** Additional styles to pass to the icon itself */
additionalIconStyles?: StyleProp<ViewStyle>;

/** A fallback avatar icon to display when there is an error on loading avatar from remote URL. */
fallbackIcon?: IconAsset;

Expand Down Expand Up @@ -433,6 +436,7 @@ function MenuItem(
tooltipShiftHorizontal = 0,
tooltipShiftVertical = 0,
renderTooltipContent,
additionalIconStyles,
shouldShowSelectedItemCheck = false,
onHideTooltip,
shouldIconUseAutoWidthStyle = false,
Expand Down Expand Up @@ -663,6 +667,7 @@ function MenuItem(
isPaneMenu,
)
}
additionalStyles={additionalIconStyles}
/>
) : (
<ActivityIndicator
Expand Down
4 changes: 4 additions & 0 deletions src/components/ReportActionItem/ExportWithDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as ReportActions from '@libs/actions/Report';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import type {ExportType} from '@pages/home/report/ReportDetailsExportPage';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Policy, Report} from '@src/types/onyx';
Expand Down Expand Up @@ -55,6 +56,9 @@ function ExportWithDropdownMenu({
icon: iconToDisplay,
disabled: !canBeExported,
displayInDefaultIconColor: true,
iconWidth: variables.iconSizeMenuItem,
iconHeight: variables.iconSizeMenuItem,
additionalIconStyles: styles.integrationIcon,
};
const options = [
{
Expand Down
7 changes: 4 additions & 3 deletions src/components/Search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ type QueryFilter = {

type AdvancedFiltersKeys = ValueOf<typeof CONST.SEARCH.SYNTAX_FILTER_KEYS>;

type QueryFilters = {
[K in AdvancedFiltersKeys]?: QueryFilter[];
};
type QueryFilters = Array<{
key: AdvancedFiltersKeys;
filters: QueryFilter[];
}>;

type SearchQueryString = string;

Expand Down
13 changes: 13 additions & 0 deletions src/libs/Network/enhanceParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Onyx.connect({
},
});

// Check if the user is logged in as a delegate and send that if so
let delegate = '';
Onyx.connect({
key: ONYXKEYS.ACCOUNT,
callback: (val) => {
delegate = val?.delegatedAccess?.delegate ?? '';
},
});

/**
* Does this command require an authToken?
*/
Expand Down Expand Up @@ -57,5 +66,9 @@ export default function enhanceParameters(command: string, parameters: Record<st

finalParameters.clientUpdateID = lastUpdateIDAppliedToClient;

if (delegate) {
finalParameters.delegate = delegate;
}

return finalParameters;
}
13 changes: 10 additions & 3 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {SvgProps} from 'react-native-svg';
import type {OriginalMessageIOU, OriginalMessageModifiedExpense} from 'src/types/onyx/OriginalMessage';
import type {TupleToUnion, ValueOf} from 'type-fest';
import type {FileObject} from '@components/AttachmentModal';
import {FallbackAvatar, QBOCircle, XeroCircle} from '@components/Icon/Expensicons';
import {FallbackAvatar, IntacctSquare, NetSuiteSquare, QBOSquare, XeroSquare} from '@components/Icon/Expensicons';
import * as defaultGroupAvatars from '@components/Icon/GroupDefaultAvatars';
import * as defaultWorkspaceAvatars from '@components/Icon/WorkspaceDefaultAvatars';
import type {MoneyRequestAmountInputProps} from '@components/MoneyRequestAmountInput';
Expand Down Expand Up @@ -8253,11 +8253,18 @@ function getSourceIDFromReportAction(reportAction: OnyxEntry<ReportAction>): str

function getIntegrationIcon(connectionName?: ConnectionName) {
if (connectionName === CONST.POLICY.CONNECTIONS.NAME.XERO) {
return XeroCircle;
return XeroSquare;
}
if (connectionName === CONST.POLICY.CONNECTIONS.NAME.QBO) {
return QBOCircle;
return QBOSquare;
}
if (connectionName === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) {
return NetSuiteSquare;
}
if (connectionName === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT) {
return IntacctSquare;
}

return undefined;
}

Expand Down
Loading

0 comments on commit 824ed80

Please sign in to comment.