-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Reapply "Merge pull request #81869 from software-mansion-labs/@zfurtak/migrate-NewChatPage" #84887
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
Merged
mountiny
merged 13 commits into
Expensify:main
from
software-mansion-labs:revert/revert/migrate-NewChatPage
Mar 20, 2026
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2160e65
Reapply "Merge pull request #81869 from software-mansion-labs/@zfurta…
sharabai 958f304
Add FlashList patch, refactor NewChatPage
sharabai 8a33611
Add screen-reader sibling level access to add-to-group button
sharabai 226877f
Update details.md about FlashList introducing patch PR
sharabai 1247d40
change condition to explicit false check
sharabai d2a7863
Merge remote-tracking branch 'origin/main' into revert/revert/migrate…
sharabai 71eea66
Add null-rendered-Component check for shouldDisableAccessibleGrouping
sharabai 0a70657
Remove useCallback, add dep array to useImperativeHandle
sharabai a27e488
Revert to not using a selector for derived Reports
sharabai acf082f
React to codex comments
sharabai 07bf0e3
Fix storybook, add isFocused mock to HoldReasonFormViewTest
sharabai 7cbdbec
Merge remote-tracking branch 'origin/main' into revert/revert/migrate…
sharabai f22a391
Update patch to v2.3.0 with recent version bump
sharabai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
patches/@shopify/flash-list/@shopify+flash-list+2.2.0+002+skip-layout-when-hidden.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
| index c6056a1..af012e5 100644 | ||
| --- a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
| +++ b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js | ||
| @@ -69,6 +69,10 @@ const RecyclerViewComponent = (props, ref) => { | ||
| if (internalViewRef.current && firstChildViewRef.current) { | ||
| // Measure the outer and inner container layouts | ||
| const outerViewLayout = measureParentSize(internalViewRef.current); | ||
| + if (outerViewLayout.width === 0 && outerViewLayout.height === 0) { | ||
| + containerViewSizeRef.current = outerViewLayout; | ||
| + return; | ||
| + } | ||
| const firstChildViewLayout = measureFirstChildLayout(firstChildViewRef.current, internalViewRef.current); | ||
| containerViewSizeRef.current = outerViewLayout; | ||
| // Calculate offset of first item | ||
| @@ -99,6 +103,10 @@ const RecyclerViewComponent = (props, ref) => { | ||
| if (pendingChildIds.size > 0) { | ||
| return; | ||
| } | ||
| + if (((_a = containerViewSizeRef.current) === null || _a === void 0 ? void 0 : _a.width) === 0 && | ||
| + ((_b = containerViewSizeRef.current) === null || _b === void 0 ? void 0 : _b.height) === 0) { | ||
| + return; | ||
| + } | ||
| const layoutInfo = Array.from(refHolder, ([index, viewHolderRef]) => { | ||
| const layout = measureItemLayout(viewHolderRef.current, recyclerViewManager.tryGetLayout(index)); | ||
| // comapre height with stored layout | ||
| diff --git a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx b/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx | ||
| index 73c9649..9e34907 100644 | ||
| --- a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx | ||
| +++ b/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx | ||
| @@ -159,6 +159,16 @@ const RecyclerViewComponent = <T,>( | ||
| if (internalViewRef.current && firstChildViewRef.current) { | ||
| // Measure the outer and inner container layouts | ||
| const outerViewLayout = measureParentSize(internalViewRef.current); | ||
| + // Skip layout update when the container reports zero dimensions. | ||
| + // This happens when a parent has `display: none` applied (e.g., | ||
| + // React's <Activity mode="hidden"> in navigation stacks). Accepting | ||
| + // 0x0 would wipe the render stack and force a full re-initialization | ||
| + // when the container becomes visible again. | ||
| + if (outerViewLayout.width === 0 && outerViewLayout.height === 0) { | ||
| + // Record the zero size so the item measurement effect also bails out. | ||
| + containerViewSizeRef.current = outerViewLayout; | ||
| + return; | ||
| + } | ||
| const firstChildViewLayout = measureFirstChildLayout( | ||
| firstChildViewRef.current, | ||
| internalViewRef.current | ||
| @@ -198,6 +208,11 @@ const RecyclerViewComponent = <T,>( | ||
| if (pendingChildIds.size > 0) { | ||
| return; | ||
| } | ||
| + // Skip item measurement when the container is hidden (0x0). | ||
| + // See the guard in the layout params effect above. | ||
| + if (containerViewSizeRef.current?.width === 0 && containerViewSizeRef.current?.height === 0) { | ||
| + return; | ||
| + } | ||
| const layoutInfo = Array.from(refHolder, ([index, viewHolderRef]) => { | ||
| const layout = measureItemLayout( | ||
| viewHolderRef.current!, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.