Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/hooks/useRecyclerViewController.js b/node_modules/@shopify/flash-list/dist/recyclerview/hooks/useRecyclerViewController.js
index 51b6f8c..d4ca252 100644
--- a/node_modules/@shopify/flash-list/dist/recyclerview/hooks/useRecyclerViewController.js
+++ b/node_modules/@shopify/flash-list/dist/recyclerview/hooks/useRecyclerViewController.js
@@ -507,7 +507,7 @@ export function useRecyclerViewController(recyclerViewManager, ref, scrollViewRe
setTimeout(() => {
recyclerViewManager.isInitialScrollComplete = true;
pauseOffsetCorrection.current = false;
- }, 100);
+ }, 500);
Comment on lines +3 to +10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VickyStash All good, I only have one concern about this patch. Could you detail what bug occurs without this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DylanDylann There is a content jump on iOS (maybe on other platforms too, but the easiest way to catch it is on ios) without the patch.

Without the patch:

without_patch.mov

With the patch:

with_patch.mov

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing

pauseOffsetCorrection.current = true;
const additionalOffset = (_c = initialScrollIndexParams === null || initialScrollIndexParams === void 0 ? void 0 : initialScrollIndexParams.viewOffset) !== null && _c !== void 0 ? _c : 0;
const offset = horizontal
8 changes: 8 additions & 0 deletions patches/@shopify/flash-list/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@
- Upstream PR/issue: TBD
- E/App issue: https://github.com/Expensify/App/issues/33725
- PR introducing patch: TBD

### [@shopify+flash-list+2.3.0+008+increase-timeout.patch](@shopify+flash-list+2.3.0+008+increase-timeout.patch)

- Reason: Fixes an initial-render scroll jump on iOS for inverted lists using `initialScrollIndex`. The existing 100 ms `pauseOffsetCorrection` window in `applyInitialScrollIndex` wasn't long enough — MVCP resumed before the corrective `scrollToOffset` had settled, exposing the jump. Bumped to 500 ms.
- Files changed: `dist/recyclerview/hooks/useRecyclerViewController.js` only.
- Upstream PR/issue: TBD
- E/App issue: https://github.com/Expensify/App/issues/89768
- PR introducing patch: https://github.com/Expensify/App/pull/90218
8 changes: 1 addition & 7 deletions src/hooks/useReportActionsPagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type UseReportActionsPaginationResult = {
transactionThreadReportID: string | undefined;
transactionThreadReport: OnyxEntry<Report>;
parentReportActionForTransactionThread: ReportAction | undefined;
shouldAddCreatedAction: boolean;
treatAsNoPaginationAnchor: boolean;
setTreatAsNoPaginationAnchor: (value: boolean) => void;
};
Expand Down Expand Up @@ -56,14 +55,10 @@ function useReportActionsPagination(reportID: string | undefined, reportActionID
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
const isConciergeSidePanel = isInSidePanel && isConciergeChatReport(report, conciergeReportID);

const [reportLoadingState] = useOnyx(`${ONYXKEYS.COLLECTION.RAM_ONLY_REPORT_LOADING_STATE}${reportID}`);
const isLoadingInitialReportActions = reportLoadingState?.isLoadingInitialReportActions;

const isReportTransactionThread = isReportTransactionThreadUtil(report);
const isInitiallyLoadingTransactionThread = isReportTransactionThread && (!!isLoadingInitialReportActions || (allReportActions ?? [])?.length <= 1);

const lastAction = allReportActions?.at(-1);
const shouldAddCreatedAction = !isCreatedAction(lastAction) && (isMoneyRequestReport(report) || isInvoiceReport(report) || isInitiallyLoadingTransactionThread || isConciergeSidePanel);
const shouldAddCreatedAction = !isCreatedAction(lastAction) && (isMoneyRequestReport(report) || isInvoiceReport(report) || isReportTransactionThread || isConciergeSidePanel);

const reportPreviewAction = useMemo(() => getReportPreviewAction(report?.chatReportID, report?.reportID), [report?.chatReportID, report?.reportID]);

Expand Down Expand Up @@ -96,7 +91,6 @@ function useReportActionsPagination(reportID: string | undefined, reportActionID
transactionThreadReportID: thread.transactionThreadReportID,
transactionThreadReport: thread.transactionThreadReport,
parentReportActionForTransactionThread: thread.parentReportActionForTransactionThread,
shouldAddCreatedAction,
treatAsNoPaginationAnchor,
setTreatAsNoPaginationAnchor,
};
Expand Down
175 changes: 63 additions & 112 deletions src/pages/inbox/report/ReportActionsList.tsx

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/pages/inbox/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function ReportActionsView({reportID, onLayout}: ReportActionsViewProps) {
transactionThreadReportID,
transactionThreadReport,
parentReportActionForTransactionThread,
shouldAddCreatedAction,
treatAsNoPaginationAnchor,
setTreatAsNoPaginationAnchor,
} = useReportActionsPagination(reportID, reportActionIDFromRoute);
Expand Down Expand Up @@ -255,7 +254,6 @@ function ReportActionsView({reportID, onLayout}: ReportActionsViewProps) {
treatAsNoPaginationAnchor={treatAsNoPaginationAnchor}
setTreatAsNoPaginationAnchor={setTreatAsNoPaginationAnchor}
listID={listID}
hasCreatedActionAdded={shouldAddCreatedAction}
showHiddenHistory={!showFullHistory}
hasPreviousMessages={hasPreviousMessages}
onShowPreviousMessages={handleShowPreviousMessages}
Expand Down

This file was deleted.

12 changes: 0 additions & 12 deletions src/pages/inbox/report/StaticReportActionsPreview/index.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/pages/inbox/report/StaticReportActionsPreview/types.ts

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions tests/unit/getReportActionsListInitialNumToRenderTest.ts

This file was deleted.

Loading