Skip to content

Commit

Permalink
Merge branch 'main' into perf/native-stack-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Sep 30, 2024
2 parents ce4f8c6 + e84dab7 commit 5701c46
Show file tree
Hide file tree
Showing 52 changed files with 1,136 additions and 620 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009004102
versionName "9.0.41-2"
versionCode 1009004104
versionName "9.0.41-4"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
4 changes: 2 additions & 2 deletions assets/images/table.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ Once the member verifies their email address, all Domain Admins will be notified
3. Click the **Domain Members** tab on the left.
4. Under the Domain Members section, enter the first part of the member’s email address and click **Invite**.

{% include info.html %}
This can be any email address—it does not have to be an email address under the domain. If someone who is not a Domain Admin invites a new member to a workspace, that member must validate their account via email before they will have access to it.
{% include end-info.html %}

# Add Domain Admin

1. Hover over Settings, then click **Domains**.
Expand Down
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>9.0.41.2</string>
<string>9.0.41.4</string>
<key>FullStory</key>
<dict>
<key>OrgId</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>9.0.41.2</string>
<string>9.0.41.4</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.41</string>
<key>CFBundleVersion</key>
<string>9.0.41.2</string>
<string>9.0.41.4</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
19 changes: 9 additions & 10 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.41-2",
"version": "9.0.41-4",
"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 @@ -108,7 +108,7 @@
"date-fns-tz": "^2.0.0",
"dom-serializer": "^0.2.2",
"domhandler": "^4.3.0",
"expensify-common": "2.0.88",
"expensify-common": "2.0.94",
"expo": "51.0.31",
"expo-av": "14.0.7",
"expo-image": "1.12.15",
Expand Down Expand Up @@ -170,7 +170,7 @@
"react-native-svg": "15.6.0",
"react-native-tab-view": "^3.5.2",
"react-native-url-polyfill": "^2.0.0",
"react-native-view-shot": "4.0.0-alpha.3",
"react-native-view-shot": "3.8.0",
"react-native-vision-camera": "4.0.0-beta.13",
"react-native-web": "^0.19.12",
"react-native-web-sound": "^0.1.3",
Expand Down
8 changes: 4 additions & 4 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4550,12 +4550,12 @@ const CONST = {
'Here’s how to set up categories:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Go to Workspaces.\n' +
'2. Go to *Workspaces*.\n' +
'3. Select your workspace.\n' +
'4. Click *Categories*.\n' +
'5. Enable and disable default categories.\n' +
'6. Click *Add categories* to make your own.\n' +
'7. For more controls like requiring a category for every expense, click *Settings*.\n' +
'5. Add or import your own categories.\n' +
"6. Disable any default categories you don't need.\n" +
'7. Require a category for every expense in *Settings*.\n' +
'\n' +
`[Take me to workspace category settings](${workspaceCategoriesLink}).`,
},
Expand Down
33 changes: 30 additions & 3 deletions src/components/Search/SearchContext.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
import React, {useCallback, useContext, useMemo, useState} from 'react';
import type {ReportActionListItemType, ReportListItemType, TransactionListItemType} from '@components/SelectionList/types';
import * as SearchUtils from '@libs/SearchUtils';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import type {SearchContext, SelectedTransactions} from './types';

const defaultSearchContext = {
currentSearchHash: -1,
selectedTransactions: {},
selectedReports: [],
setCurrentSearchHash: () => {},
setSelectedTransactions: () => {},
clearSelectedTransactions: () => {},
shouldShowStatusBarLoading: false,
setShouldShowStatusBarLoading: () => {},
};

const Context = React.createContext<SearchContext>(defaultSearchContext);

function getReportsFromSelectedTransactions(data: TransactionListItemType[] | ReportListItemType[] | ReportActionListItemType[], selectedTransactions: SelectedTransactions) {
return (data ?? [])
.filter(
(item) =>
!SearchUtils.isTransactionListItemType(item) &&
!SearchUtils.isReportActionListItemType(item) &&
item.reportID &&
item?.transactions?.every((transaction: {keyForList: string | number}) => selectedTransactions[transaction.keyForList]?.isSelected),
)
.map((item) => item.reportID);
}

function SearchContextProvider({children}: ChildrenProps) {
const [searchContextData, setSearchContextData] = useState<Pick<SearchContext, 'currentSearchHash' | 'selectedTransactions'>>({
const [searchContextData, setSearchContextData] = useState<Pick<SearchContext, 'currentSearchHash' | 'selectedTransactions' | 'selectedReports'>>({
currentSearchHash: defaultSearchContext.currentSearchHash,
selectedTransactions: defaultSearchContext.selectedTransactions,
selectedReports: defaultSearchContext.selectedReports,
});

const setCurrentSearchHash = useCallback((searchHash: number) => {
Expand All @@ -25,10 +43,14 @@ function SearchContextProvider({children}: ChildrenProps) {
}));
}, []);

const setSelectedTransactions = useCallback((selectedTransactions: SelectedTransactions) => {
const setSelectedTransactions = useCallback((selectedTransactions: SelectedTransactions, data: TransactionListItemType[] | ReportListItemType[] | ReportActionListItemType[]) => {
// When selecting transactions, we also need to manage the reports to which these transactions belong. This is done to ensure proper exporting to CSV.
const selectedReports = getReportsFromSelectedTransactions(data, selectedTransactions);

setSearchContextData((prevState) => ({
...prevState,
selectedTransactions,
selectedReports,
}));
}, []);

Expand All @@ -40,19 +62,24 @@ function SearchContextProvider({children}: ChildrenProps) {
setSearchContextData((prevState) => ({
...prevState,
selectedTransactions: {},
selectedReports: [],
}));
},
[searchContextData.currentSearchHash],
);

const [shouldShowStatusBarLoading, setShouldShowStatusBarLoading] = useState(false);

const searchContext = useMemo<SearchContext>(
() => ({
...searchContextData,
setCurrentSearchHash,
setSelectedTransactions,
clearSelectedTransactions,
shouldShowStatusBarLoading,
setShouldShowStatusBarLoading,
}),
[searchContextData, setCurrentSearchHash, setSelectedTransactions, clearSelectedTransactions],
[searchContextData, setCurrentSearchHash, setSelectedTransactions, clearSelectedTransactions, shouldShowStatusBarLoading],
);

return <Context.Provider value={searchContext}>{children}</Context.Provider>;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/SearchFiltersChatsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen
const selectedOptions = useMemo<OptionData[]>(() => {
return selectedReportIDs.map((id) => {
const report = getSelectedOptionData(OptionsListUtils.createOptionFromReport({...reports?.[`${ONYXKEYS.COLLECTION.REPORT}${id}`], reportID: id}, personalDetails));
const alternateText = OptionsListUtils.getAlternateText(report, {showChatPreviewLine: true});
const alternateText = OptionsListUtils.getAlternateText(report, {});
return {...report, alternateText};
});
}, [personalDetails, reports, selectedReportIDs]);
Expand All @@ -65,7 +65,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen
if (!areOptionsInitialized || !isScreenTransitionEnd) {
return defaultListOptions;
}
return OptionsListUtils.getSearchOptions(options);
return OptionsListUtils.getSearchOptions(options, '', undefined, false);
}, [areOptionsInitialized, isScreenTransitionEnd, options]);

const chatOptions = useMemo(() => {
Expand Down
Loading

0 comments on commit 5701c46

Please sign in to comment.