Граф коммитов

7450 Коммитов

Автор SHA1 Сообщение Дата
Xin Chen 6ac88a4378 Add TraceUpdateOverlay native component to render highlights on trace updates
Summary:
This diff adds `TraceUpdateOverlay` native component to render highlights when trace update is detected from React JS. This allows a highlight border to be rendered outside of the component with re-renders.

- Created `TraceUpdateOverlay` native component and added to the `DebugCorePackage`
- Added to C++ registry so it's compatible with Fabric
- Added to `AppContainer` for all RN apps when global devtools hook is available

Changelog:
[Android][Internal] - Add trace update overlay to show re-render highlights

Reviewed By: javache

Differential Revision: D42831719

fbshipit-source-id: 30c2e24859a316c27700270087a0d7779d7ad8ed
2023-02-13 21:55:33 -08:00
Ruslan Shestopalyuk aef7194996 API symmetry when passing PerformanceEntryType to/from native module
Summary:
[Changelog][Internal]

`NativePerformanceObserver` TurboModule API would get the type for performance entries as strings in one direction (`start/stopReporting`) and as integers in another direction (inside `RawPerformanceEntry`, for optimization on the native side).

This makes is symmetrical and consistent, all the conversions are now handled on the JS side.

Reviewed By: christophpurrer

Differential Revision: D43236466

fbshipit-source-id: 08e1b62df90e6d26a11577d6b6b1d91a6bce8339
2023-02-13 10:44:06 -08:00
Adam Gleitman 5308fcc9ea Fix typo in Dynamic Type docs (#36113)
Summary:
When working on Dynamic Type, I accidentally referred to it as "Dynamic Text" in some of the documentation. This is just a minor cleanup bit.

## Changelog

[IOS] [FIXED] - Fix typo in documentation

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

Test Plan: Non-functional change, no testing should be needed :-)

Reviewed By: javache

Differential Revision: D43184999

Pulled By: cortinico

fbshipit-source-id: ed057e48289ae6037637bacecb20b8dd58c1d8b5
2023-02-10 06:05:50 -08:00
Xin Chen 6faddc3870 Fix string key issue with constexpr StrKey in Performance C++ native module
Summary:
I encountered build error when using performance API in catalyst android mobile app. The error message P617433618 points at using non-const `std::strlen` API in a `constexpr`.

```
$ buck install catalyst-android
...
stderr: xplat/js/react-native-github/Libraries/WebPerformance/PerformanceEntryReporter.cpp:208:13: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
  constexpr StrKey(const char *s)
            ^
xplat/js/react-native-github/Libraries/WebPerformance/PerformanceEntryReporter.cpp:209:39: note: non-constexpr function 'strlen' cannot be used in a constant expression
      : key(folly:#️⃣:fnv32_buf(s, std::strlen(s))) {}
```

Changelog:
[General][Fixed] - Fixed string key calculation in constexpr from Performance C++ native module.

Reviewed By: javache

Differential Revision: D43136624

fbshipit-source-id: c691671b157b507745c67a505c91f75cf6b878d1
2023-02-09 11:23:11 -08:00
Rubén Norte 673c7617bc Implement DOMRect and DOMRectReadOnly matching Web
Summary:
This adds the `DOMRect` and `DOMRectReadOnly` classes to React Native, mostly following the Web spec.

This is a requirement for `node.getBoundingClientRect()`, which we'll implement in React (in https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactFabricHostConfig.js#L134-L323).

Changelog: [General][Added] - Added Web-compatible `DOMRect` and `DOMRectReadOnly` classes to the global scope.

Reviewed By: ryancat

Differential Revision: D42963222

fbshipit-source-id: bf2ed15bfbfd71822cb6f969f8cc0a67c7834333
2023-02-09 09:36:08 -08:00
Rubén Norte 333755367f Declare some missing globals
Summary:
This declares a few globals that were missing in our `global.js` Flow declaration file:
* `process`
* `performance` with its current definition. We'll replace it with the new API when we replace `setupPerformance` with `setupWebPerformance`.
* `navigator`
* `setImmediate`
* `clearImmediate`

Eventually we should stop including all DOM definitions that Flow provides out of the box and define only what we provide (which is pretty much this file).

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D42964772

fbshipit-source-id: 6156968e8a9d193e7068d8a5043aa682ad45bba1
2023-02-09 09:36:08 -08:00
Nicola Corti c8c6abeeaf Disable a /Libraries/Pressability test on Windows only
Summary:
This test is flaky on Windows only on CI, so I'm disabling it as we cover this
test already on other platforms.

Changelog:
[Internal] [Changed] - Disable a /Libraries/Pressability test on Windows only

Reviewed By: yungsters

Differential Revision: D43153475

fbshipit-source-id: 861a31fbbf3c14f2af95ca3ffd40737ef975048b
2023-02-09 08:52:57 -08:00
Riccardo Cipolleschi 7eaabfb174 Hardcode concurrentRootEnabled to true when Fabric is enabled (#36106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36106

Having `concurrentRoot` disabled when Fabric is enabled is not recommended.
This simplifies the setup and makes sure that both are either enabled or disabled.

## Changelog:
[iOS] [Breaking] - Hardcode concurrentRootEnabled to `true` when Fabric is enabled

Reviewed By: cortinico

Differential Revision: D43153402

fbshipit-source-id: d67aeb3413dbdf2430381aa44ede47ed00db32c6
2023-02-09 07:02:32 -08:00
Rubén Norte d5e8b6d974 Remove unused modules from react-native
Summary: Changelog: [internal] Removed several unused internal modules

Reviewed By: cortinico

Differential Revision: D43116878

fbshipit-source-id: dd33660bf3d97ebc56261f2dea6566ad2211afea
2023-02-09 06:29:14 -08:00
Rubén Norte c628d07044 Remove unused buildStyleInterpolator module from react-native
Summary: Changelog: [internal] Removed unused internal buildStyleInterpolator module

Reviewed By: christophpurrer

Differential Revision: D43116880

fbshipit-source-id: e9f89ad99ecb3e22b9c7516c7a2610f9dd05f984
2023-02-09 06:29:14 -08:00
Rubén Norte 86fba5375a Remove unused deprecatedPropType module from react-native
Summary: Changelog: [internal] Removed unused internal deprecatedPropType module

Reviewed By: christophpurrer

Differential Revision: D43116885

fbshipit-source-id: 6833f104e8b2d818a04dd957d1a219776355606e
2023-02-09 06:29:14 -08:00
Rubén Norte 7c1b6759c2 Remove unused mergeIntoFast module from react-native
Summary: Changelog: [internal] Removed unused internal mergeIntoFast module

Reviewed By: filhoweuler

Differential Revision: D43116879

fbshipit-source-id: 16dca709deb1fca714d95535658e1e7700764781
2023-02-09 06:29:14 -08:00
Rubén Norte 8cab3b0fbd Remove unused truncate module from react-native
Summary: Changelog: [internal] Removed unused internal truncate module

Reviewed By: waddah-fb

Differential Revision: D43116881

fbshipit-source-id: 36ba4bbbea4c07dd14e4922a5aa53cba95927b9e
2023-02-09 06:29:14 -08:00
Rubén Norte 69e23658e1 Remove unused groupByEveryN module from react-native
Summary: Changelog: [internal] Removed unused internal groupByEveryN module

Reviewed By: sammy-SC

Differential Revision: D43116883

fbshipit-source-id: 4d2e3240ab11cfc67ae4e08b9dbf4c1ca1e2f388
2023-02-09 06:29:14 -08:00
Rubén Norte b2a858d4f3 Remove unused UserFlow module from react-native
Summary: Changelog: [internal] Removed unused internal UserFlow module

Reviewed By: sammy-SC

Differential Revision: D43116882

fbshipit-source-id: cb9a6322aec56760cddacda18ec4b9659428efec
2023-02-09 06:29:14 -08:00
Rubén Norte 38542aeebe Remove unused MatrixMath module from react-native
Summary: Changelog: [internal] Removed unused internal MatrixMath module

Reviewed By: sammy-SC

Differential Revision: D43116884

fbshipit-source-id: 6b7ae02e4f465730e7ae8d6092e6bd8304f8f7d6
2023-02-09 06:29:14 -08:00
bigcupcoffee 23607aea68 Fix incorrect touchable hitSlop and pressRetentionOffset type (#36065)
Summary:
Incorrect TS type disallows use of `hitSlop={number}`. Fixed by using Pressable's hitSlop type.

NOTE: I did not bother to change Flow types in the `.js` file, please add a commit doing that if required.

## Changelog
[GENERAL] [FIXED] - Fix touchable hitSlop type

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

Test Plan: None needed

Reviewed By: christophpurrer

Differential Revision: D43117689

Pulled By: javache

fbshipit-source-id: 96e5ae650f47382c8d7fa1ddf63c76461c65dcc7
2023-02-09 03:05:23 -08:00
Nick Gerleman 6d1667cf86 Back out "Add Appearance.setColorScheme support"
Summary:
See https://github.com/facebook/react-native/pull/35989#discussion_r1101016329

Changelog:
[General][Fixed] - Back out "Add Appearance.setColorScheme support"

Reviewed By: jacdebug

Differential Revision: D43148056

fbshipit-source-id: 823ab8276207f243b788ce7757839a3e95bdbe07
2023-02-09 00:54:42 -08:00
Christoph Purrer 7c82a3fa11 Add enum example to Android/iOS rn-tester TurboModule (#35133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35133

Add enum example to Android/iOS rn-tester TurboModule

Changelog:
[General][Added] - Add enum example to Android/iOS rn-tester TurboModule

Reviewed By: javache, cipolleschi

Differential Revision: D40711269

fbshipit-source-id: c8ad6fb7dee40b45b696660cc4d78921edafd8a1
2023-02-08 22:49:30 -08:00
Nicola Corti 4128df20de Reduce flakyness on InteractionManager-test (#36092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36092

This test is partially disabled already, causing high flakyness of the `test_windows` CI job.
I'm taking a different approach at disabling it here (disabling the offending tests using a `Promise`
rather than disabling at the assert level).

Changelog:
[Internal] [Changed] - Reduce flakyness on InteractionManager-test

Reviewed By: cipolleschi

Differential Revision: D43120897

fbshipit-source-id: 69edee804aaaa8b6f89ff8440561254f393efae4
2023-02-08 08:43:54 -08:00
Birkir Gudjonsson 0a4dcb0309 Add Appearance.setColorScheme support (#35989)
Summary:
Both Android and iOS allow you to set application specific user interface style, which is useful for applications that support both light and dark mode.

With the newly added `Appearance.setColorScheme`, you can natively manage the application's user interface style rather than keeping that preference in JavaScript. The benefit is that native dialogs like alert, keyboard, action sheets and more will also be affected by this change.

Implemented using Android X [AppCompatDelegate.setDefaultNightMode](https://developer.android.com/reference/androidx/appcompat/app/AppCompatDelegate#setDefaultNightMode(int)) and iOS 13+ [overrideUserInterfaceStyle](https://developer.apple.com/documentation/uikit/uiview/3238086-overrideuserinterfacestyle?language=objc)

## Changelog

[GENERAL] [ADDED] - Added `setColorScheme` to `Appearance` module

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

Test Plan:
This is a void function so testing is rather limited.

```tsx
// Lets assume a given device is set to **dark** mode.

Appearance.getColorScheme(); // `dark`

// Set the app's user interface to `light`
Appearance.setColorScheme('light');

Appearance.getColorScheme(); // `light`

// Set the app's user interface to `unspecified`
Appearance.setColorScheme(null);

Appearance.getColorScheme() // `dark`
 ```

Reviewed By: NickGerleman

Differential Revision: D42801094

Pulled By: jacdebug

fbshipit-source-id: ede810fe9ee98f313fd3fbbb16b60c84ef8c7204
2023-02-07 06:23:39 -08:00
Nick Gerleman 0daf83ac51 Reconnect VirtualizedList Source History 2/2 (Apply D41745930 + history, D42805202, D43063551)
Summary:
This change re-applies D41745930 (2e3dbe9c2f) (and D42805202 (1479b2ac26) 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 (2e3dbe9c2f) 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
hoxy 5b8faae2ae fix: re-export SectionBase & ScrollToLocationParamsType from virtualized-lists package
Summary:
Changelog: [Internal]

- Fixes `flow-stable`
build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

Differential Revision: https://internalfb.com/D43063551

fbshipit-source-id: b7a92669fa41e8fc69370a2d9e809ce2559dd600
2023-02-06 15:56:14 -08:00
Ruslan Lesiutin 1479b2ac26 refactor(arvr/xplat): update imports to resolve packaged virtualized list from react-native (#36035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36035

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D42805202

fbshipit-source-id: 1f1d6e36ec6e19a1b46ce340be095bb60b8048f4
2023-02-06 13:39:13 -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
Julien Brayere 98009ad94b fix: fix virtualizedList scrollToEnd for 0 items (#36067)
Summary:
Fixes https://github.com/facebook/react-native/issues/36066

## Changelog

[GENERAL] [FIXED] - VirtualizedList scrollToEnd with no data

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

Test Plan: Run `yarn test VirtualizedList-test`

Reviewed By: jacdebug

Differential Revision: D43041763

Pulled By: javache

fbshipit-source-id: d4d5e871284708a89bf9911d82e9aa97d7625aca
2023-02-06 08:05:59 -08:00
Gaurav ROy 011ea3306f fix(35280): added a fix to trigger on viewable items changed when null or 0 is passed in first element (#36009)
Summary:
Since currently the check was for null , and that too not === check. So added a check , only for item !== undefined, since null is an assigned value, and we can have null as values in the array for flatlist,
 undefined is in absence of any data, hence if its only undefined we should assign falsy to frame variable, since null is an assigned value, sometimes null can be passed to data in the dataset

 Hence added a check on top of Sam's previous commit to fix it

 UPDATE:

 Now after discussing with NickGerleman , removed the check for item with nullish/undefined.
 Now directly frames value is being controlled by _keyExtractor function

 This is already an issue [https://github.com/facebook/react-native/issues/35280](url)

Currently in my project, even [0,1] -> didnt trigger onViewableItemsChanged since, it was considered as falsy value,
went to check the node modules code for flatlist, debugged this.
When pulled latest main branch, saw it was partially fixed , but for null as values it wasnt fixed. So added that check .

## Changelog

[General] [Fixed] Fix VirtualizedList onViewableItemsChanged won't trigger if first item in data  is null

```
const frame =
      item !== undefined ? this._frames[this._keyExtractor(item, index, props)]
        : undefined;
```

      in place of existing which is

```
const frame =
      item != null ? this._frames[this._keyExtractor(item, index, props)]
        : undefined;
```

Update:

`const frame = this._frames[this._keyExtractor(item, index, props)]`

Finally this is the one used for getting frames value

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

Test Plan:
Checked out in my local , wrt changes , will share video if required

Update:
After the new changes too, checked in local, working fine

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Reviewed By: NickGerleman

Differential Revision: D42934757

Pulled By: skinsshark

fbshipit-source-id: cb5622a79523bccbdfbc15470baf84422f635b33
2023-02-06 00:56:53 -08:00
eps1lon a0800ffc7a Add `borderCurve` and `pointerEvents` to `ViewStyle` (#35998)
Summary:
Forward-porting https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64125

## Changelog

[GENERAL] [FIXED] - Add `borderCurve` and `pointerEvents` to `ViewStyle`

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

Test Plan: - [x] https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64125 green

Reviewed By: christophpurrer

Differential Revision: D42906357

Pulled By: lunaleaps

fbshipit-source-id: 6a5763cf7880888462fbabe1a00e560065c9a551
2023-02-01 12:20:40 -08:00
gabrieldonadel 597a1ff60b feat: Add logical border block color properties (#35999)
Summary:
This PR implements logical border block color properties as requested on https://github.com/facebook/react-native/issues/34425. This implementation includes the addition of the following style properties

- `borderBlockColor`, equivalent to `borderTopColor` and `borderBottomColor`.
- `borderBlockEndColor`, equivalent to `borderBottomColor`.
- `borderBlockStartColor`, equivalent to `borderTopColor`.

## Changelog

[GENERAL] [ADDED] - Add logical border block color properties

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

Test Plan:
1. Open the RNTester app and navigate to the `View` page
2. Test the new style properties through the `Logical Border Color` section

<table>
<tr>
    <td>Android</td>
    <td>iOS</td>
</tr>
  <tr>
    <td><video src="https://user-images.githubusercontent.com/11707729/215384882-5b96518e-ad70-4157-a7f3-130f488cc41c.mov"  alt="1" width="360px"   />
    </td>
<td>
<video src="https://user-images.githubusercontent.com/11707729/215392728-cfc6a097-26c1-4ffe-ab0e-f0a5a71a902d.mov"2" width="360px"  />
</td>
   </tr>
</table>

Reviewed By: cipolleschi

Differential Revision: D42849911

Pulled By: jacdebug

fbshipit-source-id: 822cff5264689c42031d496105537032b5cd31ef
2023-01-31 10:58:24 -08:00
Samuel Susla dea48e2248 React Native sync for revisions 17f6912...48b687f
Summary:
This sync includes the following changes:
- **[48b687fc9](https://github.com/facebook/react/commit/48b687fc9 )**: [trusted types][www] Add enableTrustedTypesIntegration flag back in ([#26016](https://github.com/facebook/react/pull/26016)) //<an onion>//
- **[9b1423cc0](https://github.com/facebook/react/commit/9b1423cc0 )**: Revert "Hold host functions in var" ([#26079](https://github.com/facebook/react/pull/26079)) //<Samuel Susla>//
- **[ce09ace9a](https://github.com/facebook/react/commit/ce09ace9a )**: Improve Error Messages when Access Client References ([#26059](https://github.com/facebook/react/pull/26059)) //<Sebastian Markbåge>//
- **[0652bdbd1](https://github.com/facebook/react/commit/0652bdbd1 )**: Add flow types to Maps in ReactNativeViewConfigRegistry.js ([#26064](https://github.com/facebook/react/pull/26064)) //<Samuel Susla>//
- **[ee8509801](https://github.com/facebook/react/commit/ee8509801 )**: [cleanup] remove deletedTreeCleanUpLevel feature flag ([#25529](https://github.com/facebook/react/pull/25529)) //<Jan Kassens>//
- **[0e31dd028](https://github.com/facebook/react/commit/0e31dd028 )**: Remove findDOMNode www shim ([#25998](https://github.com/facebook/react/pull/25998)) //<Jan Kassens>//
- **[379dd741e](https://github.com/facebook/react/commit/379dd741e )**: [www] set enableTrustedTypesIntegration to false ([#25997](https://github.com/facebook/react/pull/25997)) //<Jan Kassens>//
- **[555ece0cd](https://github.com/facebook/react/commit/555ece0cd )**: Don't warn about concurrently rendering contexts if we finished rendering ([#22797](https://github.com/facebook/react/pull/22797)) //<Sebastian Silbermann>//
- **[0fce6bb49](https://github.com/facebook/react/commit/0fce6bb49 )**: [cleanup] remove feature flags warnAboutDefaultPropsOnFunctionComponents and warnAboutStringRefs ([#25980](https://github.com/facebook/react/pull/25980)) //<Jan Kassens>//
- **[7002a6743](https://github.com/facebook/react/commit/7002a6743 )**: [cleanup] remove unused values from ReactFeatureFlags.www-dynamic ([#25575](https://github.com/facebook/react/pull/25575)) //<Jan Kassens>//
- **[a48e54f2b](https://github.com/facebook/react/commit/a48e54f2b )**: [cleanup] remove old feature flag warnAboutDeprecatedLifecycles ([#25978](https://github.com/facebook/react/pull/25978)) //<Jan Kassens>//
- **[0f4a83596](https://github.com/facebook/react/commit/0f4a83596 )**: Remove duplicate JSResourceReferenceImpl mock ([#25976](https://github.com/facebook/react/pull/25976)) //<Jan Kassens>//
- **[c49131669](https://github.com/facebook/react/commit/c49131669 )**: Remove unused Flow suppressions ([#25977](https://github.com/facebook/react/pull/25977)) //<Jan Kassens>//
- **[afe6521e1](https://github.com/facebook/react/commit/afe6521e1 )**: Refactor: remove useless parameter ([#25923](https://github.com/facebook/react/pull/25923)) //<Chris>//
- **[34464fb16](https://github.com/facebook/react/commit/34464fb16 )**: Upgrade to Flow 0.196.3 ([#25974](https://github.com/facebook/react/pull/25974)) //<Jan Kassens>//
- **[e2424f33b](https://github.com/facebook/react/commit/e2424f33b )**: [flow] enable exact_empty_objects ([#25973](https://github.com/facebook/react/pull/25973)) //<Jan Kassens>//
- **[0b4f44302](https://github.com/facebook/react/commit/0b4f44302 )**: [flow] enable enforce_local_inference_annotations ([#25921](https://github.com/facebook/react/pull/25921)) //<Jan Kassens>//
- **[0b974418c](https://github.com/facebook/react/commit/0b974418c )**: [Fizz] Fork Fizz instruction set for inline script and external runtime ([#25862](https://github.com/facebook/react/pull/25862)) //<mofeiZ>//
- **[5379b6123](https://github.com/facebook/react/commit/5379b6123 )**: Batch sync, default and continuous lanes ([#25700](https://github.com/facebook/react/pull/25700)) //<Tianyu Yao>//
- **[bbf4d2211](https://github.com/facebook/react/commit/bbf4d2211 )**: Update import for babel-code-frame in build script ([#25963](https://github.com/facebook/react/pull/25963)) //<Ming Ye>//
- **[b83baf63f](https://github.com/facebook/react/commit/b83baf63f )**: Transform updates to support Flow this annotation syntax ([#25918](https://github.com/facebook/react/pull/25918)) //<Jan Kassens>//
- **[c2d655207](https://github.com/facebook/react/commit/c2d655207 )**: Unify `use` and `renderDidSuspendDelayIfPossible` implementations ([#25922](https://github.com/facebook/react/pull/25922)) //<Andrew Clark>//
- **[48274a43a](https://github.com/facebook/react/commit/48274a43a )**: Remove vestigial Suspense batching logic ([#25861](https://github.com/facebook/react/pull/25861)) //<Andrew Clark>//
- **[de7d1c907](https://github.com/facebook/react/commit/de7d1c907 )**: Add `fetchPriority` to `<img>` and `<link>` ([#25927](https://github.com/facebook/react/pull/25927)) //<Steven>//
- **[81d4ee9ca](https://github.com/facebook/react/commit/81d4ee9ca )**: reconciler docs: fix small typo - "mode" (instead of "node") ([#25863](https://github.com/facebook/react/pull/25863)) //<satelllte>//
- **[5fcf1a4b4](https://github.com/facebook/react/commit/5fcf1a4b4 )**: Bugfix: Synchronous ping during render phase sometimes unwinds the stack, leading to crash ([#25851](https://github.com/facebook/react/pull/25851)) //<Andrew Clark>//
- **[2b1fb91a5](https://github.com/facebook/react/commit/2b1fb91a5 )**: ESLint upgrade to use hermes-eslint ([#25915](https://github.com/facebook/react/pull/25915)) //<Jan Kassens>//
- **[fabef7a6b](https://github.com/facebook/react/commit/fabef7a6b )**: Resubmit Add HydrationSyncLane ([#25878](https://github.com/facebook/react/pull/25878)) //<Tianyu Yao>//
- **[7efa9e597](https://github.com/facebook/react/commit/7efa9e597 )**: Fix unwinding context during selective hydration ([#25876](https://github.com/facebook/react/pull/25876)) //<Tianyu Yao>//
- **[84a0a171e](https://github.com/facebook/react/commit/84a0a171e )**: Rename experimental useEvent to useEffectEvent ([#25881](https://github.com/facebook/react/pull/25881)) //<Sebastian Markbåge>//
- **[4dda96a40](https://github.com/facebook/react/commit/4dda96a40 )**: [react-www] remove forked bundle ([#25866](https://github.com/facebook/react/pull/25866)) //<Jan Kassens>//
- **[9c09c1cd6](https://github.com/facebook/react/commit/9c09c1cd6 )**: Revert "Fork ReactDOMSharedInternals for www ([#25791](https://github.com/facebook/react/pull/25791))" ([#25864](https://github.com/facebook/react/pull/25864)) //<lauren>//
- **[996e4c0d5](https://github.com/facebook/react/commit/996e4c0d5 )**: Offscreen add attach ([#25603](https://github.com/facebook/react/pull/25603)) //<Samuel Susla>//
- **[b14d7fa4b](https://github.com/facebook/react/commit/b14d7fa4b )**: Add support for setNativeProps to Fabric ([#25737](https://github.com/facebook/react/pull/25737)) //<Samuel Susla>//
- **[819687279](https://github.com/facebook/react/commit/819687279 )**: [Float] Fix typo in ReactDOMResourceValidation.js ([#25798](https://github.com/facebook/react/pull/25798)) //<Ikko Ashimine>//
- **[5dfc485f6](https://github.com/facebook/react/commit/5dfc485f6 )**: fix tests for when float is off ([#25839](https://github.com/facebook/react/pull/25839)) //<Josh Story>//
- **[bfcbf3306](https://github.com/facebook/react/commit/bfcbf3306 )**: toString children of title ([#25838](https://github.com/facebook/react/pull/25838)) //<Sebastian Markbåge>//
- **[d4bc16a7d](https://github.com/facebook/react/commit/d4bc16a7d )**: Revert "[react-www] remove forked bundle" ([#25837](https://github.com/facebook/react/pull/25837)) //<Ricky>//
- **[d69b2cf82](https://github.com/facebook/react/commit/d69b2cf82 )**: [bug fix] revert values in ReactFiberFlags to keep consistency for devtools ([#25832](https://github.com/facebook/react/pull/25832)) //<Mengdi Chen>//
- **[645ae2686](https://github.com/facebook/react/commit/645ae2686 )**: [react-www] remove forked bundle ([#25831](https://github.com/facebook/react/pull/25831)) //<Jan Kassens>//
- **[d807eb52c](https://github.com/facebook/react/commit/d807eb52c )**: Revert recent hydration changes ([#25812](https://github.com/facebook/react/pull/25812)) //<Andrew Clark>//
- **[2ccfa657d](https://github.com/facebook/react/commit/2ccfa657d )**: Fork ReactDOMSharedInternals for www ([#25791](https://github.com/facebook/react/pull/25791)) //<lauren>//
- **[f0534ae94](https://github.com/facebook/react/commit/f0534ae94 )**: Avoid replaying SelectiveHydrationException in dev ([#25754](https://github.com/facebook/react/pull/25754)) //<Tianyu Yao>//
- **[7fab379d8](https://github.com/facebook/react/commit/7fab379d8 )**: fix link to ReactDOMHostconfig in reconciler docs ([#25788](https://github.com/facebook/react/pull/25788)) //<Dmitry>//
- **[500c8aa08](https://github.com/facebook/react/commit/500c8aa08 )**: Add component name to StrictMode error message ([#25718](https://github.com/facebook/react/pull/25718)) //<Samuel Susla>//
- **[353c30252](https://github.com/facebook/react/commit/353c30252 )**: Hold host functions in var ([#25741](https://github.com/facebook/react/pull/25741)) //<Samuel Susla>//

Changelog:
[General][Changed] - React Native sync for revisions 17f6912...48b687f

jest_e2e[run_all_tests]

Reviewed By: rubennorte

Differential Revision: D42855483

fbshipit-source-id: c244a595bb2d490a23b333c1b16d04a459ec94fc
2023-01-31 09:17:55 -08:00
Riccardo Cipolleschi b3040ec624 Restore Dynamic framework with Hermes in the Old Architecture
Summary:
I discovered that 0.69 could run React Native as Dynamic framework with Hermes and starting from 0.70 that's not possible anymore.
This diff restore that possibility.

Notice that now Hermes provisdes JSI and Dynamic Frameworks requires that all the dependencies are explicitly defined, therefore, whenever we have a pod that depended on `React-jsi`, now it also has to explicitly depends on `hermes-engine`

## Changelog
[iOS][Fixed] - Add Back dynamic framework support for the Old Architecture with Hermes

Reviewed By: cortinico

Differential Revision: D42829728

fbshipit-source-id: a660e3b1e346ec6cf3ceb8771dd8bceb0dbcb13a
2023-01-30 04:25:26 -08:00
Samuel Susla e91e468edc React Native sync for revisions d1e35c7...17f6912
Summary:
Three problems popped up during the sync:
- https://github.com/facebook/react/commit/07f46ecf2 breaks breaks tests
- https://github.com/facebook/react/commit/6fb8133ed breaks fbsource tests. I added a workaround and created a test for the team that owns the test.
- https://fb.workplace.com/groups/flowlang/permalink/1198137807458547/ enables local type interference in fbsource but not in github React repo and some code breaks. Addressed in https://github.com/facebook/react/pull/26064

This sync includes the following changes:
- **[17f6912a4](https://github.com/facebook/react/commit/17f6912a4 )**: Add flow types to ReactFiberHooks ([#25752](https://github.com/facebook/react/pull/25752)) //<Samuel Susla>//
- **[f101c2d0d](https://github.com/facebook/react/commit/f101c2d0d )**: Remove Reconciler fork (2/2) ([#25775](https://github.com/facebook/react/pull/25775)) //<Jan Kassens>//
- **[420f0b7fa](https://github.com/facebook/react/commit/420f0b7fa )**: Remove Reconciler fork (1/2) ([#25774](https://github.com/facebook/react/pull/25774)) //<Jan Kassens>//
- **[3ba7add60](https://github.com/facebook/react/commit/3ba7add60 )**: Allow async blocks in `to(Error|Warn)Dev` ([#25338](https://github.com/facebook/react/pull/25338)) //<Sebastian Silbermann>//
- **[fa11bd6ec](https://github.com/facebook/react/commit/fa11bd6ec )**: [ServerRenderer] Add option to send instructions as data attributes ([#25437](https://github.com/facebook/react/pull/25437)) //<mofeiZ>//
- **[e98225485](https://github.com/facebook/react/commit/e98225485 )**: Add ref cleanup function ([#25686](https://github.com/facebook/react/pull/25686)) //<Samuel Susla>//
- **[15557fa67](https://github.com/facebook/react/commit/15557fa67 )**: [Fix] properly track `useId` use in StrictMode in development ([#25713](https://github.com/facebook/react/pull/25713)) //<Josh Story>//
- **[8a23def32](https://github.com/facebook/react/commit/8a23def32 )**: Resubmit Add HydrationSyncLane ([#25711](https://github.com/facebook/react/pull/25711)) //<Tianyu Yao>//
- **[2655c9354](https://github.com/facebook/react/commit/2655c9354 )**: Fizz Browser: fix precomputed chunk being cleared on Node 18 ([#25645](https://github.com/facebook/react/pull/25645)) //<Jimmy Lai>//
- **[c08d8b804](https://github.com/facebook/react/commit/c08d8b804 )**: Revert "Add SyncHydrationLane" ([#25708](https://github.com/facebook/react/pull/25708)) //<Tianyu Yao>//
- **[56ffca8b9](https://github.com/facebook/react/commit/56ffca8b9 )**: Add Bun streaming server renderer ([#25597](https://github.com/facebook/react/pull/25597)) //<Colin McDonnell>//
- **[f31005d6a](https://github.com/facebook/react/commit/f31005d6a )**: Add SyncHydrationLane ([#25698](https://github.com/facebook/react/pull/25698)) //<Tianyu Yao>//
- **[f284d9faf](https://github.com/facebook/react/commit/f284d9faf )**: Track ThenableState alongside other hooks //<Andrew Clark>//
- **[6b4c0314e](https://github.com/facebook/react/commit/6b4c0314e )**: Check thenable instead of thenableState //<Andrew Clark>//
- **[33e3d2878](https://github.com/facebook/react/commit/33e3d2878 )**: Reuse hooks when replaying a suspended component //<Andrew Clark>//
- **[4387d752d](https://github.com/facebook/react/commit/4387d752d )**: Allow more hooks to be added when replaying mount //<Andrew Clark>//
- **[5eb78d0a0](https://github.com/facebook/react/commit/5eb78d0a0 )**: Pass ThenableState to replaySuspendedUnitOfWork //<Andrew Clark>//
- **[4a2d86bdd](https://github.com/facebook/react/commit/4a2d86bdd )**: Don't reset work loop until stack is unwound //<Andrew Clark>//
- **[9dfbd9fa9](https://github.com/facebook/react/commit/9dfbd9fa9 )**: use: Don't suspend if there are pending updates //<Andrew Clark>//
- **[44c4e6f4d](https://github.com/facebook/react/commit/44c4e6f4d )**: Force unwind work loop during selective hydration ([#25695](https://github.com/facebook/react/pull/25695)) //<Andrew Clark>//
- **[7b17f7bbf](https://github.com/facebook/react/commit/7b17f7bbf )**: Enable warning for defaultProps on function components for everyone ([#25699](https://github.com/facebook/react/pull/25699)) //<Sebastian Markbåge>//
- **[6fb8133ed](https://github.com/facebook/react/commit/6fb8133ed )**: Turn on string ref deprecation warning for everybody (not codemoddable) ([#25383](https://github.com/facebook/react/pull/25383)) //<Sebastian Silbermann>//
- **[07f46ecf2](https://github.com/facebook/react/commit/07f46ecf2 )**: Turn on key spread warning in jsx-runtime for everyone ([#25697](https://github.com/facebook/react/pull/25697)) //<Sebastian Markbåge>//
- **[d65b88d03](https://github.com/facebook/react/commit/d65b88d03 )**: Eagerly initialize an mutable object for instance.refs ([#25696](https://github.com/facebook/react/pull/25696)) //<Sebastian Markbåge>//
- **[c343f8025](https://github.com/facebook/react/commit/c343f8025 )**: [react-float] feature detect getRootNode ([#25689](https://github.com/facebook/react/pull/25689)) //<Jan Kassens>//
- **[e1dd0a2f5](https://github.com/facebook/react/commit/e1dd0a2f5 )**: Remove recoverable error when a sync update flows into a dehydrated boundary ([#25692](https://github.com/facebook/react/pull/25692)) //<Sebastian Markbåge>//
- **[c54e3541b](https://github.com/facebook/react/commit/c54e3541b )**: [DevTools] bug fix for Hydrating fibers ([#25663](https://github.com/facebook/react/pull/25663)) //<Mengdi Chen>//

Changelog:
[General][Changed] - React Native sync for revisions d1e35c7...17f6912

jest_e2e[run_all_tests]

Reviewed By: makovkastar

Differential Revision: D42804802

fbshipit-source-id: 6a9f00724cc73378025bbd04edb2d17760a87280
2023-01-30 01:51:33 -08:00
Sebastian Silbermann fac7859863 Add `TextInput`'s `inputMode` TypeScript types (#35987)
Summary:
Forward-porting https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64100/

## Changelog

[GENERAL] [FIXED] - Add `TextInput`'s `inputMode` TypeScript types

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

Test Plan: - [x] https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64100/ green

Reviewed By: christophpurrer

Differential Revision: D42799862

Pulled By: jacdebug

fbshipit-source-id: b387fd8bc53e66d6125fee810862de3e292e6e74
2023-01-27 08:35:51 -08:00
SheetJS eaf465d0df Blob#slice end <= size (fixes #35959) (#35971)
Summary:
See https://github.com/facebook/react-native/issues/35959 .  Potentially fixes other issues including https://github.com/facebook/react-native/issues/34988

## Changelog

[INTERNAL] [FIXED] - Blob#slice end check avoids overflow

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

Test Plan: Added a test which fails against current release but passes after code changes.

Reviewed By: cipolleschi

Differential Revision: D42772352

Pulled By: jacdebug

fbshipit-source-id: 3c26baedad5cd459061459a9485ae20af1d2417b
2023-01-27 01:36:57 -08:00
mym0404 a8166bd75b Fix crash by conditional value of aspectRatio style value (#35858) (#35859)
Summary:
fix https://github.com/facebook/react-native/issues/35858

## Changelog

1. Handle not `number` | `string` value passed to `aspectRatio`
2. Add some tests

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan:
## Sample
[Sample Repository](https://github.com/mym0404/rn-aspect-ratio-crash-sample)

Video

![1](https://user-images.githubusercontent.com/33388801/212956921-94b21cda-d841-4588-a05a-d604a82e204c.gif)

Reviewed By: necolas

Differential Revision: D42575942

Pulled By: NickGerleman

fbshipit-source-id: 2f7f46e6e3af85146e4042057477cb6d63b3b279
2023-01-25 17:15:19 -08:00
Paul Mandel 305ca337c0 Adding AlertOptions to ts Alert.prompt function (#35957)
Summary:
Bringing the typescript function signature in-line with the js code.

## Changelog

[GENERAL] [FIXED] - Added AlertOptions argument to the type definition for Alert.prompt to bring it into parity with the js code.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan: Before the change, VS Code would show a typescript error when I pass AlertOptions to Alert.prompt (even though the js would execute successfully and respect the options I passed. After the change, when I use an Alert.prompt in VS code the function signature was recognized without errors.

Reviewed By: christophpurrer

Differential Revision: D42737818

Pulled By: jacdebug

fbshipit-source-id: 4d4318f38f5c7b7302aae62de5ce224db67e088a
2023-01-25 02:14:45 -08:00
Saad Najmi d5e6d9cecd Add a nil check to prevent a crash (#35941)
Summary:
This is a [change](https://github.com/microsoft/react-native-macos/pull/1120) we made in our fork (React Native macOS) that we are now upstreaming to reduce the number of diffs between React Native Core and React Native macOS. Also.. one less crash �!

Resolves https://github.com/microsoft/react-native-macos/issues/1679

Original PR notes:

> We've seen a crash downstream where -[NSString stringByReplacingCharactersInRange:withString:] receives a nil value as the replacement string. This is not good, since we expect that argument to be non-null.
>
>We believe that a cause of this is that -[RCTUITextField textView:shouldChangeTextInRange:replacementString:] is being called with nil as the replacement string. (This is legal, as per [Apple's documentation](https://developer.apple.com/documentation/appkit/nstextviewdelegate/1449325-textview?language=objc).) Right now, the only check that this delegate method does is enforcing the maxLength parameter if it exists, and changes in attributes shouldn't affect the length of the string.

## Changelog

[IOS] [FIXED] - `-[RCTUITextField textView:shouldChangeTextInRange:replacementString:]` no longer crashes when we pass in a `nil` replacement string

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

Test Plan: Build should pass. This change has been running in our fork in production for a while so we're fairly confident of it.

Reviewed By: cipolleschi

Differential Revision: D42705382

Pulled By: jacdebug

fbshipit-source-id: 066cd8a4ba134a681f0f4c955594b1fcda61a30e
2023-01-24 03:57:45 -08:00
Janic Duplessis c19548728c Add maintainVisibleContentPosition support on Android (#35049)
Summary:
This adds support for `maintainVisibleContentPosition` on Android. The implementation is heavily inspired from iOS, it works by finding the first visible view and its frame before views are update, then adjusting the scroll position once the views are updated.

Most of the logic is abstracted away in MaintainVisibleScrollPositionHelper to be used in both vertical and horizontal scrollview implementations.

Note that this only works for the old architecture, I have a follow up ready to add fabric support.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Android] [Added] - Add maintainVisibleContentPosition support on Android

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

Test Plan:
Test in RN tester example on Android

https://user-images.githubusercontent.com/2677334/197319855-d81ced33-a80b-495f-a688-4106fc699f3c.mov

Reviewed By: ryancat

Differential Revision: D40642469

Pulled By: skinsshark

fbshipit-source-id: d60f3e2d0613d21af5f150ca0d099beeac6feb91
2023-01-23 12:00:05 -08:00
Arthur Kushka 114e03ebe5 react-native | remove unused internal feature flag
Summary: Changelog: [Internal]

Reviewed By: cortinico, fabriziocucci

Differential Revision: D42674577

fbshipit-source-id: c89c5532b9a828d41574a7b044aac10556aec8e5
2023-01-23 10:37:36 -08:00
Marshall Roch 9960327c41 Upgrade to Flow 0.198.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42666047

fbshipit-source-id: d0cc4d048151f3aa1d1033f6096125080dbf2cbd
2023-01-23 07:38:48 -08:00
Arushi Kesarwani 208f559505 Getting rid of Toast in Dev Loading View post Native Module is released (#35888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35888

Changelog:
[Android][Removed] - For supporting Dev Loading View across multiple platforms, changed the Loading View of Android to rely on the native implementation instead of Toast. Getting rid of the JS changes relying on Toast for Dev Loading View now that the native module is released.

Reviewed By: rshest

Differential Revision: D42599220

fbshipit-source-id: ec7098b508c766c07384d48d3bffed075b092b72
2023-01-19 21:15:03 -08:00
Devon Mars 9cf35bfcc4 Add newline to UTFSequence
Summary:
Changelog:
[General][Added] - Added newline to UTFSequence

Reviewed By: bvanderhoof

Differential Revision: D42614321

fbshipit-source-id: 50af9815af9d2f57de1b216b4adf05bea6c4ad46
2023-01-19 14:04:23 -08:00
Ruslan Shestopalyuk 059184e7ce setUpPerformance not to redirect to WebPerformance before the API is public (#35901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35901

[Changelog][Internal]
Partially reverts the change that was redirecting `performance` instance to the new implementation in WebPerformance, until the actual implementation becomes public and native modules are included by default.

Reviewed By: rubennorte

Differential Revision: D42607379

fbshipit-source-id: c1ce995d20b9dfe7aef8436cea00d89b81e32932
2023-01-19 10:08:32 -08:00
Dimitar Nestorov e162b07982 Add `accessibilityLabelledBy` TypeScript type (#35883)
Summary:
`accessibilityLabelledBy` is missing from `AccessibilityPropsAndroid` TypeScript interface

## Changelog

[GENERAL] [FIXED] - Added missing `accessibilityLabelledBy` TypeScript type

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan: Ran `yarn test-typescript` and `yarn test-typescript-offline` and there were no errors.

Reviewed By: christophpurrer

Differential Revision: D42604287

Pulled By: NickGerleman

fbshipit-source-id: 476d24d1c0257be787b7e84c2c11bcadc3527979
2023-01-19 05:57:51 -08:00
Janic Duplessis c289442848 Fix TurboModuleRegistry TS type (#35885)
Summary:
TurboModuleRegistry export functions and not a TurboModuleRegistry object. See https://github.com/facebook/react-native/blob/main/Libraries/TurboModule/TurboModuleRegistry.js#L37

## Changelog

[GENERAL] [FIXED] - Fix TurboModuleRegistry TS type

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

Test Plan:
Tested that the import doesn't generate a type error when used correctly.

```ts
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';

export default TurboModuleRegistry.get<Spec>('RNCSafeAreaContext');
```

Reviewed By: christophpurrer

Differential Revision: D42604208

Pulled By: NickGerleman

fbshipit-source-id: e6259df24aaf6e37b32cc4b51947294fd655837e
2023-01-19 05:56:51 -08:00
Dimitar Nestorov 71c4f57baf Add `accessibilityLanguage` type (#35882)
Summary:
`accessibilityLanguage` is missing from `AccessibilityPropsIOS` TypeScript interface

## Changelog

[GENERAL] [FIXED] - Added missing `accessibilityLanguage` TypeScript type

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan: Ran `yarn test-typescript` and `yarn test-typescript-offline` and there were no errors.

Reviewed By: christophpurrer

Differential Revision: D42604363

Pulled By: NickGerleman

fbshipit-source-id: fb8dd4b5bba78a080473a9dc7b49a07587530229
2023-01-19 05:52:57 -08:00
Nick Gerleman 1fef376812 Fix invariant violation when nesting VirtualizedList inside ListEmptyComponent (#35875)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35875

Fixes https://github.com/facebook/react-native/issues/35871

Nested VirtualizedLists register to their parents for updates, associated to a specfific cellKey set by VirtualizedListCellContextProvider. This cellKey is usually set when rendering a cell for a data item, but we can also render a nested VirtualizedList by putting one in a ListHeaderComponent/ListFooterComponent/ListEmptyComponent.

D6603342 (a010a0cebd) added cellKeys when we render from a header/footer, but not ListEmptyComponent, so that association would silently fail earlier.

D39466677 (010da67bef) added extra invariants to child list handling, that are now triggered by this case, complaining because we are trying to unregister a child list we never successfully registered, due to a missing cellKey.

This fixes the issue by providing a cellKey for ListEmptyComponent as well.

Changelog:
[General][Fixed] - Fix invariant violation when nesting VirtualizedList inside ListEmptyComponent

Reviewed By: christophpurrer

Differential Revision: D42574462

fbshipit-source-id: f76fa795bf471cb8a929c2efdbd814ea51927663
2023-01-19 05:13:50 -08:00
Moti Zilberman 05ff52b656 Update Jest type definitions to v29
Summary:
@public

Changelog: [Internal]

TSIA

Reviewed By: jacdebug

Differential Revision: D42570767

fbshipit-source-id: 26deffc1a749ed9403a71dcef64db02d0bf652e8
2023-01-18 10:52:29 -08:00
Andrey Lunyov 58a6cf840a remove unused type imports 1/1
Summary:
Cleans up unused type imports from the codebase.

  ./scripts/typedjs/flow/runner --config /data/sandcastle/boxes/www/scripts/typedjs/flow/runner.config.xplat.js codemod local/removeUnusedTypeImports /data/sandcastle/boxes/fbsource/xplat/js

drop-conflicts
bypass-lint
bypass_size_limit

Reviewed By: GijsWeterings

Differential Revision: D42556504

fbshipit-source-id: 05885edccb686390f29f69c2f2049bf650a1b8c5
2023-01-18 08:21:49 -08:00