Commit Graph

8 Commits

Author SHA1 Message Date
Jakub Piasecki b4e64546fd Add a post transform to rename the default export names (#50397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50397

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72170157

fbshipit-source-id: 9067a83c5e941ef8ade7b846799d9a09f7dc4e62
2025-04-02 07:03:15 -07:00
Andrei Marchenko df7b6ae092 fix item disappearing with scroll in VirtualizedList (#47965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47965

Changelog: [General] [Changed] - fix item disappearing with scroll in VirtualizedList

It was caused because the function `computeWindowedRenderLimits` collapsed the current window size to just 1 element. So, users start scroll current window increase from {left:0, right:5 } -> {left:0, right:6 } and after some edge cases the window collapsed to `{left:6, right:6 }` which cause to remove all elements and recreate them later. As a result users have a lot of lags and blank pages.

The diff fixes the collapsing window size to 1 element. Also fix other decreasing `left` position even if windowSize more than current amount of elements.

Reviewed By: NickGerleman

Differential Revision: D66334188

fbshipit-source-id: 2162d00d03d64ab6325c0492d87449051e68a4e9
2024-11-26 10:44:30 -08:00
Ruslan Shestopalyuk 92525ef3ae Untangle dependency loop in virtualized-lists (#37912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37912

# Changelog:
[Internal] -

I've noticed bundler spamming with cyclical dependency warnings when working on FB4A.

This gets rid of the unneeded two-way dependency between `ListMetricsAggregator <-> VirtualizeUtils`.

Reviewed By: NickGerleman

Differential Revision: D46761080

fbshipit-source-id: a25f7eebbd177e24c39dad9af7ac574f3aa30f35
2023-06-16 00:44:20 -07:00
Nick Gerleman 8f7f0bf2a3 Extract logic to CellMetricsAggregator (#37777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37777

This extracts the state and logic VirtualizedList uses to query information related to cell metrics. We will need to modify this (and other places) when fixing up RTL support for horizontal FlatList.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D46427052

fbshipit-source-id: 0a23f6c726447de0f20c583b4d507003efd6a754
2023-06-08 15:53:10 -07:00
Nick Gerleman 96225cec2b Rename FrameMetrics to CellMetrics (#37778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37778

These functions describe how to get the metrics of a specific cell. "Frame" here seems non-descriptive and redundant to the "Metrics" part. Renaming this before a larger refactor.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D46427058

fbshipit-source-id: e9ad9cf15e1adfd07604eb11526de0ed8cf99000
2023-06-08 15:53:10 -07:00
Nick Gerleman 0daf83ac51 Reconnect VirtualizedList Source History 2/2 (Apply D41745930 + history, D42805202, D43063551)
Summary:
This change re-applies D41745930 (https://github.com/facebook/react-native/commit/2e3dbe9c2fbff52448e2d5a7c1e4c96b1016cf25) (and D42805202 (https://github.com/facebook/react-native/commit/1479b2ac26fded3840c596f53e6eb86a4b0c2c71) which was also partially reverted), re-registers additions as moves, then applies D43063551 which has been added to the changes since migration.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D43068114

fbshipit-source-id: 72997700bf9962d82a988599481e255b69e68a9b
2023-02-06 20:00:19 -08:00
Nick Gerleman ebaa00e327 Reconnect VirtualizedList Source History 1/2 (Revert D41745930)
Summary:
This change reverts D41745930 (https://github.com/facebook/react-native/commit/2e3dbe9c2fbff52448e2d5a7c1e4c96b1016cf25) as part of a stack to splice back source history which was lost (Git registered the file moves as additions).

It is expected this diff will individually fail. The entire stack should be applied at once.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D43068113

fbshipit-source-id: c8398629fe5dcc1ca4bf02f550adc00c78a8487a
2023-02-06 20:00:19 -08:00
Gabriel Donadel Dall'Agnol 2e3dbe9c2f feat: Move virtualized lists to @react-native/virtualized-lists (#35406)
Summary:
This PR moves `VirtualizedList`, `VirtualizedSectionList`, and its files to a separate package called `react-native/virtualized-lists` located under `packages/virtualized-lists` as proposed on https://github.com/facebook/react-native/issues/35263

## Changelog

[General] [Changed] - Move virtualized lists to react-native/virtualized-lists package

Pull Request resolved: https://github.com/facebook/react-native/pull/35406

Test Plan:
1. Open the RNTester app and navigate to `FlatList` or `SectionList` page
2. Test virtualized lists through the many sections

https://user-images.githubusercontent.com/11707729/202878843-2b1322f5-cfee-484e-aaf3-d8d4dc0b96cc.mov

Reviewed By: cipolleschi

Differential Revision: D41745930

Pulled By: hoxyq

fbshipit-source-id: d3d33896801fd69448c6893b86fd5c2363144fd0
2023-02-06 13:39:13 -08:00