Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(2/2) Add support for all reportAction types in ChatListItem - use ReportActionItem in ChatListItem #54228

Open
wants to merge 133 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
eea0421
WIP use PureReportActionItem in ChatListItem
wildan-m Nov 23, 2024
e0f2a61
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 16, 2024
5808732
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 17, 2024
639b413
Pass personalDetails to ReportActionItemSingle
wildan-m Dec 17, 2024
7dc43b4
WIP, override contextvalue from search page
wildan-m Dec 17, 2024
0d0c33a
WIP, adjust wrapper layout and memo condition
wildan-m Dec 18, 2024
6247a8a
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 18, 2024
4e7018f
fill actorAccountID for search chatitemlist
wildan-m Dec 18, 2024
2e96dbe
Lint and prettier
wildan-m Dec 18, 2024
4f5207a
fix lint
wildan-m Dec 18, 2024
2c0ee75
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 19, 2024
8d64fba
resolve eslint error
wildan-m Dec 19, 2024
273f76c
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 20, 2024
ee5de13
revert contextOverride props
wildan-m Dec 20, 2024
45d68c5
remove unnecessary code
wildan-m Dec 20, 2024
5046a48
add attachmentContextValueType
wildan-m Dec 20, 2024
faaa140
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 21, 2024
c4145e6
add missing dependency
wildan-m Dec 21, 2024
220b657
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 23, 2024
35f99be
remove unused import, fix lint
wildan-m Dec 23, 2024
d7d9818
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 24, 2024
f55cff9
Remove unnecessary code
wildan-m Dec 24, 2024
45b406f
Mock ConfirmedRoute to get rid map error
wildan-m Dec 26, 2024
299992e
mock ConfirmedRoute to test
wildan-m Dec 27, 2024
8d74ba2
Resolve issue with unit test
wildan-m Dec 27, 2024
340bee5
remove unnecessary code
wildan-m Dec 27, 2024
e7d801c
resolve jest perf test error
wildan-m Dec 27, 2024
b189a00
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 28, 2024
760ca69
fix lint error
wildan-m Dec 28, 2024
2705f78
mock ConfirmedRoute on selectionlist perf test
wildan-m Dec 28, 2024
135c677
fix issue image not found in desktop
wildan-m Dec 28, 2024
6f59803
revert unnecessary change
wildan-m Dec 28, 2024
974d5b8
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 30, 2024
055a263
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Dec 31, 2024
0a1044a
extract policy object to param
wildan-m Dec 31, 2024
a361dcb
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 4, 2025
ba54e4e
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 8, 2025
0fc3a45
insert personal details to ReportActionItemSingle
wildan-m Jan 8, 2025
e51cf56
extract invoiceReceiverPolicy
wildan-m Jan 8, 2025
6997752
extract IOUTransaction from reportactionitemcontentcreated
wildan-m Jan 8, 2025
2564ef2
remove unnecessary code
wildan-m Jan 8, 2025
39f61bc
cleanup
wildan-m Jan 8, 2025
23a520a
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 11, 2025
6a34d41
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 13, 2025
dd80723
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 14, 2025
94e5683
revert subcomponents purification
wildan-m Jan 14, 2025
7f71e95
WIP create useOnyx wrapper for snapshot, implement some
wildan-m Jan 14, 2025
aad9c7c
update `useOnyx` wrapper
wildan-m Jan 14, 2025
e18ecc7
remove env
wildan-m Jan 14, 2025
b24c06d
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 15, 2025
25c770d
update useOnyx, handle collection key case
wildan-m Jan 15, 2025
c1639d3
create useSearchState, use useOnyx wrapper in usePolicy
wildan-m Jan 15, 2025
697f9a6
use @hooks/useOnyx to reportactionitem and its subcomponent
wildan-m Jan 15, 2025
1ec4dba
run prettier
wildan-m Jan 15, 2025
5146607
fix lint
wildan-m Jan 15, 2025
d5d505a
fix lint
wildan-m Jan 15, 2025
783db78
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 16, 2025
dedf2ab
change personalDetails to use useOnyx, fix some lint
wildan-m Jan 16, 2025
e3bddfb
direct return result if the key is snapshot
wildan-m Jan 16, 2025
6ba65db
Add transactions param to hasMissingSmartscanFields
wildan-m Jan 16, 2025
d36511a
Remove unneeded code
wildan-m Jan 16, 2025
90ea785
resolve lint issue
wildan-m Jan 16, 2025
10b2038
revert eslint change
wildan-m Jan 16, 2025
ebf2240
fix broken unit tests
wildan-m Jan 16, 2025
f8ef5df
Mock useRoute
wildan-m Jan 16, 2025
757e440
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 17, 2025
54bc76e
Fix test and lint
wildan-m Jan 17, 2025
499449e
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 17, 2025
65c6c5c
refert unnecessary change
wildan-m Jan 17, 2025
d1c9474
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 18, 2025
1332574
Mock useRoute
wildan-m Jan 18, 2025
66e083a
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 21, 2025
53c23c3
remove unnecessary code
wildan-m Jan 21, 2025
13c8c29
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 23, 2025
7b603d5
Fix issue with initial value
wildan-m Jan 23, 2025
715469d
fix initial value
wildan-m Jan 23, 2025
39539ea
Handle selector params
wildan-m Jan 23, 2025
4cb0fd6
fix lint, refactor
wildan-m Jan 23, 2025
e26d0d7
Add border to reportpreview and moneyrequestaction
wildan-m Jan 23, 2025
ae33d92
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 24, 2025
65df1d1
using contexts directly instead of useRoute, to prevent error in sear…
wildan-m Jan 24, 2025
2b58eec
refactor
wildan-m Jan 24, 2025
396525c
resolve test
wildan-m Jan 24, 2025
74854d1
whitelist snapshot keys
wildan-m Jan 24, 2025
c75d4e7
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 27, 2025
9464384
refactor type
wildan-m Jan 27, 2025
bc2ff85
add SNAPSHOT_ONYX_KEYS entr
wildan-m Jan 27, 2025
aec495e
change selector logic, don't show emoji reactions on search
wildan-m Jan 27, 2025
689bd72
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 28, 2025
ff3fa09
Update src/hooks/useOnyx.ts
wildan-m Jan 29, 2025
7c794d8
Update src/hooks/useOnyx.ts
wildan-m Jan 29, 2025
7d0bcbc
Update src/hooks/useOnyx.ts
wildan-m Jan 29, 2025
1e68d2f
Update src/hooks/useOnyx.ts
wildan-m Jan 29, 2025
fab026d
Merge branch 'wildan/fix/51296-chat-list-item' of https://github.com/…
wildan-m Jan 29, 2025
50a8da8
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 29, 2025
9aaacd7
remove duplicate
wildan-m Jan 29, 2025
a9633f3
Add snapshot to safeEvictionKeys
wildan-m Jan 29, 2025
c098f6c
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 30, 2025
14233f9
resolve video not playable in search list
wildan-m Jan 30, 2025
b552942
resolve lint warning
wildan-m Jan 30, 2025
0145b82
skip compiler warning
wildan-m Jan 30, 2025
85b3294
mock ConfirmedRoute in AppTest
wildan-m Jan 30, 2025
61439f3
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Jan 31, 2025
39363bd
if there is selector, don't use snapshot in result
wildan-m Jan 31, 2025
9894871
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 1, 2025
c123f3f
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 3, 2025
0a78c2e
isOnSearch true for attachment modal case
wildan-m Feb 3, 2025
cc2bf64
limit search page video reset to only non narrow, add isOnSearch cond…
wildan-m Feb 3, 2025
c953afe
prettier
wildan-m Feb 3, 2025
76d21fe
lint fix
wildan-m Feb 3, 2025
739ef59
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 4, 2025
c9c47e5
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 5, 2025
4389955
Use UseOnyxOptions type from react-native-onyx
wildan-m Feb 5, 2025
867efb3
add hashKey in route param to make attachment able to determine the s…
wildan-m Feb 5, 2025
b09a6de
add hashKey to dependency
wildan-m Feb 5, 2025
766ca0a
waitForBatchedUpdates since the correct value shown at the last render
wildan-m Feb 5, 2025
37040df
fix incorrect waitForBatchedUpdates usage
wildan-m Feb 5, 2025
0739db9
revert not working tes change
wildan-m Feb 5, 2025
48596a6
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 6, 2025
012e168
prettier
wildan-m Feb 6, 2025
4f06062
move test rendered report action after setup
wildan-m Feb 6, 2025
2b4de45
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 6, 2025
1597c1c
fix missing render in test
wildan-m Feb 6, 2025
13ac634
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 7, 2025
c39fe5e
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 8, 2025
79f23f6
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 10, 2025
0364d13
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 11, 2025
b884be8
resolve NewChatPageTest error
wildan-m Feb 11, 2025
1dc9830
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 12, 2025
e1232ed
Resolve conflic, move 'IN' feature to reportactionsingle
wildan-m Feb 12, 2025
ce7b157
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m Feb 12, 2025
edbddd3
Update src/pages/home/report/ReportActionItem.tsx
wildan-m Feb 12, 2025
3e619f0
Update src/hooks/useSearchState.ts
wildan-m Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {Video} from './libs/actions/Report';
import type {MileageRate} from './libs/DistanceRequestUtils';
import BankAccount from './libs/models/BankAccount';
import {addTrailingForwardSlash} from './libs/Url';
import ONYXKEYS from './ONYXKEYS';
import SCREENS from './SCREENS';
import type PlaidBankAccount from './types/onyx/PlaidBankAccount';

Expand Down Expand Up @@ -6271,6 +6272,15 @@ const CONST = {
BEFORE: 'Before',
AFTER: 'After',
},
SNAPSHOT_ONYX_KEYS: [
ONYXKEYS.COLLECTION.REPORT,
ONYXKEYS.COLLECTION.POLICY,
ONYXKEYS.COLLECTION.TRANSACTION,
ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS,
ONYXKEYS.COLLECTION.REPORT_ACTIONS,
ONYXKEYS.PERSONAL_DETAILS_LIST,
ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
],
},

REFERRER: {
Expand Down
6 changes: 5 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,18 @@ const ROUTES = {
isAuthTokenRequired?: boolean,
fileName?: string,
attachmentLink?: string,
hashKey?: number,
) => {
const reportParam = reportID ? `&reportID=${reportID}` : '';
const accountParam = accountID ? `&accountID=${accountID}` : '';
const authTokenParam = isAuthTokenRequired ? '&isAuthTokenRequired=true' : '';
const fileNameParam = fileName ? `&fileName=${fileName}` : '';
const attachmentLinkParam = attachmentLink ? `&attachmentLink=${attachmentLink}` : '';
const hashKeyParam = hashKey ? `&hashKey=${hashKey}` : '';

return `attachment?source=${encodeURIComponent(url)}&type=${type as string}${reportParam}${accountParam}${authTokenParam}${fileNameParam}${attachmentLinkParam}` as const;
return `attachment?source=${encodeURIComponent(url)}&type=${
type as string
}${reportParam}${accountParam}${authTokenParam}${fileNameParam}${attachmentLinkParam}${hashKeyParam}` as const;
},
},
REPORT_PARTICIPANTS: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddPaymentMethodMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import React, {useEffect, useState} from 'react';
import type {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import {completePaymentOnboarding} from '@libs/actions/IOU';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';

Check failure on line 8 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import * as ReportUtils from '@libs/ReportUtils';

Check failure on line 9 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {AnchorPosition} from '@src/styles';
Expand Down Expand Up @@ -64,7 +64,7 @@
// which then starts a bottom up flow and creates a Collect workspace where the payer is an admin and payee is an employee.
const isIOUReport = ReportUtils.isIOUReport(iouReport);
const canUseBusinessBankAccount =
ReportUtils.isExpenseReport(iouReport) || (isIOUReport && !ReportActionsUtils.hasRequestFromCurrentAccount(iouReport?.reportID ?? '-1', session?.accountID ?? -1));

Check failure on line 67 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Check failure on line 67 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check


const canUsePersonalBankAccount = shouldShowPersonalBankAccountOption || isIOUReport;

Expand Down
2 changes: 2 additions & 0 deletions src/components/AttachmentContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ type AttachmentContextProps = {
type?: ValueOf<typeof CONST.ATTACHMENT_TYPE>;
reportID?: string;
accountID?: number;
hashKey?: number;
};

const AttachmentContext = createContext<AttachmentContextProps>({
type: undefined,
reportID: undefined,
accountID: undefined,
hashKey: undefined,
});

AttachmentContext.displayName = 'AttachmentContext';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Attachments/AttachmentCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
import {Keyboard, PixelRatio, View} from 'react-native';
import type {ComposedGesture, GestureType} from 'react-native-gesture-handler';
import {Gesture, GestureDetector} from 'react-native-gesture-handler';
import {useOnyx} from 'react-native-onyx';
import Animated, {scrollTo, useAnimatedRef, useSharedValue} from 'react-native-reanimated';
import type {Attachment, AttachmentSource} from '@components/Attachments/types';
import BlockingView from '@components/BlockingViews/BlockingView';
import * as Illustrations from '@components/Icon/Illustrations';
import {useFullScreenContext} from '@components/VideoPlayerContexts/FullScreenContext';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';

Check failure on line 19 in src/components/Attachments/AttachmentCarousel/index.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import Navigation from '@libs/Navigation/Navigation';
import variables from '@styles/variables';
import CONST from '@src/CONST';
Expand Down
6 changes: 4 additions & 2 deletions src/components/Attachments/AttachmentView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Str} from 'expensify-common';
import React, {memo, useContext, useEffect, useState} from 'react';
import type {GestureResponderEvent, StyleProp, ViewStyle} from 'react-native';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import AttachmentCarouselPagerContext from '@components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPagerContext';
import type {Attachment, AttachmentSource} from '@components/Attachments/types';
import DistanceEReceipt from '@components/DistanceEReceipt';
Expand All @@ -15,6 +14,8 @@ import Text from '@components/Text';
import {usePlaybackContext} from '@components/VideoPlayerContexts/PlaybackContext';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import useSearchState from '@hooks/useSearchState';
import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
Expand Down Expand Up @@ -121,6 +122,7 @@ function AttachmentView({
const [hasPDFFailedToLoad, setHasPDFFailedToLoad] = useState(false);
const isVideo = (typeof source === 'string' && Str.isVideo(source)) || (file?.name && Str.isVideo(file.name));
const isUsedInCarousel = !!attachmentCarouselPagerContext?.pagerRef;
const {isOnSearch} = useSearchState();

useEffect(() => {
if (!isFocused && !(file && isUsedInAttachmentModal)) {
Expand Down Expand Up @@ -297,7 +299,7 @@ function AttachmentView({
return (
<AttachmentViewVideo
source={source}
shouldUseSharedVideoElement={isUsedInCarousel}
shouldUseSharedVideoElement={isUsedInCarousel || isOnSearch}
isHovered={isHovered}
duration={duration}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AvatarWithDisplayName.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {useCallback, useEffect, useRef} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import useOnyx from '@hooks/useOnyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/EReceiptThumbnail.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import useOnyx from '@hooks/useOnyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import {getTransactionDetails} from '@libs/ReportUtils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import {ShowContextMenuContext} from '@components/ShowContextMenuContext';
import VideoPlayerPreview from '@components/VideoPlayerPreview';
import useCurrentReportID from '@hooks/useCurrentReportID';
import * as FileUtils from '@libs/fileDownload/FileUtils';

Check failure on line 8 in src/components/HTMLEngineProvider/HTMLRenderers/VideoRenderer.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot';
import Navigation from '@navigation/Navigation';
import CONST from '@src/CONST';
Expand All @@ -32,11 +32,11 @@
<ShowContextMenuContext.Consumer>
{({report}) => (
<AttachmentContext.Consumer>
{({accountID, type}) => (
{({accountID, type, hashKey}) => (
<VideoPlayerPreview
key={key}
videoUrl={sourceURL}
reportID={currentReportIDValue?.currentReportID ?? '-1'}

Check failure on line 39 in src/components/HTMLEngineProvider/HTMLRenderers/VideoRenderer.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

fileName={fileName}
thumbnailUrl={thumbnailUrl}
videoDimensions={{width, height}}
Expand All @@ -46,7 +46,7 @@
if (!sourceURL || !type) {
return;
}
const route = ROUTES.ATTACHMENTS.getRoute(report?.reportID ?? '-1', type, sourceURL, accountID);
const route = ROUTES.ATTACHMENTS.getRoute(report?.reportID ?? '-1', type, sourceURL, accountID, undefined, undefined, undefined, hashKey);

Check failure on line 49 in src/components/HTMLEngineProvider/HTMLRenderers/VideoRenderer.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Navigation.navigate(route);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/KYCWall/BaseKYCWall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {Dimensions} from 'react-native';
import type {EmitterSubscription, GestureResponderEvent, View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import AddPaymentMethodMenu from '@components/AddPaymentMethodMenu';
import useOnyx from '@hooks/useOnyx';
import {openPersonalBankAccountSetupView} from '@libs/actions/BankAccounts';
import {completePaymentOnboarding} from '@libs/actions/IOU';
import getClickedTargetLocation from '@libs/getClickedTargetLocation';
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapView/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type {MapState} from '@rnmapbox/maps';
import Mapbox, {MarkerView, setAccessToken} from '@rnmapbox/maps';
import {forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback';
import Text from '@components/Text';
import useOnyx from '@hooks/useOnyx';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {clearUserLocation, setUserLocation} from '@libs/actions/UserLocation';
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapView/MapViewImpl.website.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useMemo,
import type {MapRef, ViewState} from 'react-map-gl';
import Map, {Marker} from 'react-map-gl';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';
import {PressableWithoutFeedback} from '@components/Pressable';
import useOnyx from '@hooks/useOnyx';
import usePrevious from '@hooks/usePrevious';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/IssueCardMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import Button from '@components/Button';
import RenderHTML from '@components/RenderHTML';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as PolicyUtils from '@libs/PolicyUtils';

Check failure on line 9 in src/components/ReportActionItem/IssueCardMessage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import * as ReportActionsUtils from '@libs/ReportActionsUtils';

Check failure on line 10 in src/components/ReportActionItem/IssueCardMessage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Namespace imports from @libs are not allowed. Use named imports instead. Example: import { method } from "@libs/module"
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Str} from 'expensify-common';
import React, {useMemo} from 'react';
import type {StyleProp, TextStyle} from 'react-native';
import {ActivityIndicator, View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
Expand All @@ -13,6 +12,7 @@ import Text from '@components/Text';
import UnreadActionIndicator from '@components/UnreadActionIndicator';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestAction.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import RenderHTML from '@components/RenderHTML';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import {isIOUReportPendingCurrencyConversion} from '@libs/IOUUtils';
import Navigation from '@libs/Navigation/Navigation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import truncate from 'lodash/truncate';
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {GestureResponderEvent} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import Button from '@components/Button';
import Icon from '@components/Icon';
Expand All @@ -18,6 +17,7 @@ import ReportActionItemImages from '@components/ReportActionItem/ReportActionIte
import {showContextMenuForReport} from '@components/ShowContextMenuContext';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import usePolicy from '@hooks/usePolicy';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
Expand Down Expand Up @@ -374,6 +374,7 @@ function MoneyRequestPreviewContent({
style={[
isScanning || isWhisper ? [styles.reportPreviewBoxHoverBorder, styles.reportContainerBorderRadius] : undefined,
!onPreviewPressed ? [styles.moneyRequestPreviewBox, containerStyles] : {},
styles.borderedContentCardLarge,
]}
>
{!isDeleted && (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import lodashIsEmpty from 'lodash/isEmpty';
import React from 'react';
import {useOnyx} from 'react-native-onyx';
import useOnyx from '@hooks/useOnyx';
import ONYXKEYS from '@src/ONYXKEYS';
import MoneyRequestPreviewContent from './MoneyRequestPreviewContent';
import type {MoneyRequestPreviewProps} from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import * as Expensicons from '@components/Icon/Expensicons';
import MenuItem from '@components/MenuItem';
Expand All @@ -15,6 +14,7 @@ import ViolationMessages from '@components/ViolationMessages';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import useViolations from '@hooks/useViolations';
import type {ViolationField} from '@hooks/useViolations';
Expand Down
6 changes: 3 additions & 3 deletions src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import truncate from 'lodash/truncate';
import React, {useCallback, useEffect, useMemo, useState} from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import {View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import Animated, {useAnimatedStyle, useSharedValue, withDelay, withSpring, withTiming} from 'react-native-reanimated';
import Button from '@components/Button';
import DelegateNoAccessModal from '@components/DelegateNoAccessModal';
Expand All @@ -18,6 +17,7 @@ import Text from '@components/Text';
import useDelegateUserDetails from '@hooks/useDelegateUserDetails';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import usePolicy from '@hooks/usePolicy';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down Expand Up @@ -163,7 +163,7 @@ function ReportPreview({

const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo(
() => ({
hasMissingSmartscanFields: hasMissingSmartscanFieldsReportUtils(iouReportID),
hasMissingSmartscanFields: hasMissingSmartscanFieldsReportUtils(iouReportID, transactions),
areAllRequestsBeingSmartScanned: areAllRequestsBeingSmartScannedReportUtils(iouReportID, action),
hasOnlyTransactionsWithPendingRoutes: hasOnlyTransactionsWithPendingRoutesReportUtils(iouReportID),
hasNonReimbursableTransactions: hasNonReimbursableTransactionsReportUtils(iouReportID),
Expand Down Expand Up @@ -542,7 +542,7 @@ function ReportPreview({
onPressOut={() => ControlSelection.unblock()}
onLongPress={(event) => showContextMenuForReport(event, contextMenuAnchor, chatReportID, action, checkIfContextMenuActive)}
shouldUseHapticsOnLongPress
style={[styles.flexRow, styles.justifyContentBetween, styles.reportPreviewBox]}
style={[styles.flexRow, styles.justifyContentBetween, styles.reportPreviewBox, styles.borderedContentCardLarge]}
role="button"
accessibilityLabel={translate('iou.viewDetails')}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/TaskPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Str} from 'expensify-common';
import React from 'react';
import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import Avatar from '@components/Avatar';
import Checkbox from '@components/Checkbox';
Expand All @@ -17,6 +16,7 @@ import UserDetailsTooltip from '@components/UserDetailsTooltip';
import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails';
import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/TripRoomPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Str} from 'expensify-common';
import React, {useMemo} from 'react';
import type {ListRenderItemInfo, StyleProp, ViewStyle} from 'react-native';
import {FlatList, View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import Button from '@components/Button';
import Icon from '@components/Icon';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
Expand All @@ -11,6 +10,7 @@ import {PressableWithoutFeedback} from '@components/Pressable';
import {showContextMenuForReport} from '@components/ShowContextMenuContext';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import {getPersonalDetailsForAccountIDs} from '@libs/OptionsListUtils';
Expand Down
Loading
Loading