Commit Graph

34956 Commits

Author SHA1 Message Date
Thomas Nardone 83fd1742da Lazily create args in ResponseUtil (#49270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49270

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D69316855

fbshipit-source-id: 1c7f58cb9364540c5bf7309b6c2f81162efcc178
2025-02-07 12:39:11 -08:00
Rob Hogan fc15260f1c Update monorepo Jest to 29.7.0 (#49261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49261

Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69307514

fbshipit-source-id: 686935ed4ba1334d445217fd2f8a303b774b6c4a
2025-02-07 11:27:18 -08:00
Samuel Susla 14540e6abf refactor Point.h and add unit tests (#49249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49249

changelog: [internal]

- Make all Point methods inline as per [C++ core guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f5-if-a-function-is-very-small-and-time-critical-declare-it-inline).
- Add unit tests for Point.
- Use default == and != operator.

Reviewed By: javache

Differential Revision: D69239807

fbshipit-source-id: c5926d587a7888f54895cb7b1a62a23dc26242a3
2025-02-07 09:37:55 -08:00
Samuel Susla 947d9c3897 introduce Fabric View Culling (#49198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49198

changelog: [internal]

The work done on the main thread should scale with what is on the screen. React Native shouldn’t block the main thread for off screen elements that do not affect what is shown to the end user. When React schedules a commit, only views needed to achieve a screen full of content should be materialised and added to the host platform’s view hierarchy.

With Fabric View Culling, views that do not contribute pixels to the screen will not materialize and updates to them will be skipped. React Native will focus system resources on what is visible to the end user.

Fabric View Culling maximises benefits from view recycling. Each UI element such as text, image, or video is recycled individually. As soon as an item goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements. Such recycling reduces the need of having multiple view types and improves memory usage and scroll performance.

In the example bellow, view B will not be mounted because the user can't see it.
 {F1974949953}

The difference in number of allocated views:
Please note, the screenshots below are from Xcode View Hierarchy debugger. To show how many views are allocated in memory, I disabled [removeClippedSubviews](https://reactnative.dev/docs/scrollview#removeclippedsubviews) flag globally.
|Before|After:
| {F1974949979}| {F1974949981}

# Disclaimer, this is not a complete implementation
This implementation is not complete and it is missing to handle edge cases.
Things that are missing:
- Transform style is not taken into account.
- removeClippedSubviews is not respected. Fabric View Culling happens unconditionally for every scroll view.
- Fabric View Culling does not respect when ScrollView has overflow set to visible.
- Fabric View Culling is only performant enough on iOS.
- [enableSynchronousStateUpdates](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js#L248) must be enabled for Fabric View Culling to work correctly.

Reviewed By: javache

Differential Revision: D63458372

fbshipit-source-id: c93ec434081f2be8a446212e2c0681f8ae4e90f9
2025-02-07 09:37:55 -08:00
Samuel Susla 68a17f2651 add getOverflowInsetFrame to LayoutMetrics (#49197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49197

changelog: [internal]

Adds new method to LayoutMetrics that calculates frame adjusted for overflow inset.

For example, for the following view hierarchy. it would produce a frame that would fully contain view A and view B.
```
┌─────────────┐
│<View A />   │
│     ┌───────┴─────┐
└─────┤<View B />   │
      │             │
      └─────────────┘
```

See tests for more details

Reviewed By: javache, lenaic

Differential Revision: D68775683

fbshipit-source-id: b8f7c42cfca7dba8dcae75cae5e6944bd1082957
2025-02-07 09:37:55 -08:00
Samuel Susla 4fa2064905 introduce feature flag for View Culling (#49196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49196

changelog: [internal]

introduces feature flag for Fabric View Culling. Not used anywhere yet.

Reviewed By: christophpurrer

Differential Revision: D68775684

fbshipit-source-id: 612362dd142cea48f38e00e65e942bcfd8580da2
2025-02-07 09:37:55 -08:00
Alex Hunt f96f1a6e11 Add signedsource and generated header to build-types (#49259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49259

Also exclude `types_generated/` under ESLint + Prettier — paired with the removed `format` annotation.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69306215

fbshipit-source-id: f2bfbeb3ce691ebf86b63fc498ae3847873c83ee
2025-02-07 08:40:09 -08:00
Alex Hunt 0d7379b9fe Tree-shake non-type imports (#49258)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49258

Updates dependency resolution in `yarn build-types` to happen after the `translateFlowToFlowDef` step. This means that we prune all non-type imports, massively reducing the input files of the program when building types only.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69302812

fbshipit-source-id: aa80bea17cb584b747cb31c003e87fe00afd1e16
2025-02-07 08:40:09 -08:00
Alex Hunt a7a513fc96 Add module resolution to build-types (#49257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49257

Adds minimal dependency resolution to `yarn build-types`.

- This enables us to opt in React Native APIs by entry point, with the build script resolving all necessary dependencies. Improves correctness and removes concern of globbing paths manually.

Other notes:

- The `ActionSheetIOS.js` entry point is temporarily disabled as input; needs further work.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69255015

fbshipit-source-id: 2d99c014b50e41e4695549f46ca874a2b546f545
2025-02-07 08:40:09 -08:00
Tim Yung 5635d5c0a3 RN: Avoid Rejections in InteractionManagerStub (#49241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49241

In auditing differences between `InteractionManager` and `InteractionManagerStub` (used to evaluate to entirely remove the former all together), I noticed a behavioral disparity with how errors are handled.

In `InteractionManager`, the promise that's returned is never rejected, whereas `InteractionManagerStub` propagates errors by rejecting the promise that's returned. This changes `InteractionManagerStub` to behave like `InteractionManager` for the purpose of comparing apples-to-apples.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D69275495

fbshipit-source-id: 05439a0cadc1f76b34a3f1457f7db31d6bda2a90
2025-02-07 08:18:42 -08:00
Rob Hogan 57c291bbc4 Fantom: Use hierarchical resolution within node_modules in Metro config
Summary:
Fantom was disabling Metro hierarchical lookup in all cases when `JS_DIR` is set. The intention is that `node_modules` folders other than the configured `JS_DIR/public/node_modules` are not used.

However, this leads to incorrect resolution where a transitive dependency is not hoisted. If the origin of the resolution is already inside `node_modules`, we must perform a hierarchical lookup to avoid picking up just whichever version happens to be hoisted to `node_modules` root.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69303559

fbshipit-source-id: 12068fb0bebb8c2f81b64c23b952a623cb6fd792
2025-02-07 07:52:43 -08:00
Rubén Norte 10e47e69aa ] Add Fantom test placeholder for LogBox (#49252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49252

Changelog: [internal]

This adds a Fantom test placeholder for LogBox, which shows what type of tests we could be writing for this.

It also adds a few ids in LogBox components so we can inspect them in tests and make assertions on them.

Reviewed By: javache

Differential Revision: D69301572

fbshipit-source-id: 89a332a47c300c1dc18937cd91206ce6d820b6aa
2025-02-07 07:47:32 -08:00
Rubén Norte b006080949 Expose rootTag in Root (#49251)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49251

Changelog: [internal]

Components like `AppContainer` require passing the rootTag as a prop, but we don't have access to it from Fantom unless we render something in the root and access it via the RootTagContext. This exposes the rootTag of the Root as a method so we can use it in initial render too.

Reviewed By: javache

Differential Revision: D69301571

fbshipit-source-id: 429fb56d937d3dffeb3c17a70d136ba4925ece8e
2025-02-07 07:47:32 -08:00
Rubén Norte 9a1dadf799 Introduce Fantom.dispatchNativeEvent utility (#49254)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49254

Changelog: [internal]

This is just a convenience method to do:

```
Fantom.dispatchNativeEvent(node, 'click');
```

Instead of:

```
runOnUIThread(() => {
  enqueueNativeEvent(node, 'click');
});

runWorkLoop();
```

Which is too verbose and people rarely need this level of granularity in tests.

Note that, in Fabric, we have methods called `dispatchEvent` that don't match 1:1 with this API. In that case, `dispatchEvent` is more aligned with Fantom's `enqueueNativeEvent`.

Reviewed By: javache

Differential Revision: D69302382

fbshipit-source-id: 6f71a5ace11c81f551df2c2837881dbc6f48e7ba
2025-02-07 07:47:32 -08:00
Rubén Norte 03c7316ab0 Rename dispatchNativeEvent as enqueueNativeEvent (#49253)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49253

Changelog: [internal]

Renaming this low level method as `enqueue` is more accurate in this case than `dispatch`, which is misleading because it actually doesn't dispatch it to JS.

We should also rename this in Fabric, but that's a larger and breaking change, so just making the change in Fantom for now. This is a trade-off between convenience/ergonomics of the testing API vs. alignment with the internal nomenclature. In this case we favor the first.

Reviewed By: javache

Differential Revision: D69302383

fbshipit-source-id: 7e163920ace709503367bf68baab5e9f2bf8ae3f
2025-02-07 07:47:32 -08:00
Dawid Małecki 09740c9001 Add Share path to build-types script and align Flow with TS types (#49167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49167

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69119294

fbshipit-source-id: 5d7a10fee47da8d8ffa07f8481060d0176618ce9
2025-02-07 04:56:26 -08:00
Mateo Guzmán 2e7c84ba00 Make MultiPostprocessor internal (#49237)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.views.image.MultiPostprocessor).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.image.MultiPostprocessor internal

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: cipolleschi

Differential Revision: D69293117

Pulled By: cortinico

fbshipit-source-id: 7e2713520a5a4fe492fb9d25cdd92c46746ded40
2025-02-07 04:01:37 -08:00
Nicola Corti 5ab6e7ad3f Remove unnecessary public modifiers from ComponentNameResolver (#49231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49231

Those public modifier have no meaning as the class is internal. I'm removing them.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D69252048

fbshipit-source-id: b51e5ac20338a01291d6cd04ee4c990cc8a6a755
2025-02-07 02:39:12 -08:00
Pieter De Baets f25e35ae4a Revert visibility change of ReactCookieJarContainer (#49247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49247

This was incorrectly made internal in https://www.internalfb.com/diff/D66724567

Changelog: [Android][Removed] Made ReactCookieJarContainer internal.

Reviewed By: cortinico, andrewdacenko

Differential Revision: D69254203

fbshipit-source-id: 5c4ba9b4f9a8e53002df25b55f0c8762874e6736
2025-02-07 02:39:01 -08:00
Nicola Corti 2f784ce9a5 Undo a breaking change on ReactOverflowView (#49229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49229

This interface was converted to Kotlin, but the single method should have been converted to a `val`.
People kotlin consumers could call ReactOverflowView.overflow; now they need to call getOverflow().

Changelog:
[Internal] [Changed] - Undo a breaking change on ReactOverflowView

Reviewed By: NickGerleman

Differential Revision: D69250226

fbshipit-source-id: 5c7cca8c83f5c76a9cc1d254f8aa51409150c356
2025-02-07 02:10:38 -08:00
Nicola Corti 5a4962a0c1 Undo breaking change in ReactPointerEventsView due to Kotlin conversion (#49233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49233

I'm converting the function inside ReactPointerEventsView from `fun` to `val`.
This Kotlin conversion resulted in a breakign change for Kotlin consumer which I believe can be prevented
if we do this change instead.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D69252562

fbshipit-source-id: b277c6720f3156ed532bf5f2253d54cd72e38050
2025-02-07 02:07:24 -08:00
Janic Duplessis 2aed264695 Fix exclude .d.ts test in GenerateCodegenSchemaTaskTest (#49238)
Summary:
I wanted to test exclusion of .d.ts files in https://github.com/facebook/react-native/pull/49227, but it also has node_modules so it will not test that condition correctly.

## Changelog:

[INTERNAL] [FIXED] - Fix exclude .d.ts test in GenerateCodegenSchemaTaskTest

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

Test Plan: Run tests

Reviewed By: cipolleschi

Differential Revision: D69291695

Pulled By: cortinico

fbshipit-source-id: 46b9367f3466b9cd49232a0565e5778a06b43990
2025-02-07 01:55:34 -08:00
Nick Gerleman b34e63539d Disallow invalid unitless lengths in filters (#49242)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49242

Same bug as in D68740553, copy/pasted. Unitless numbers are not valid <length> apart from `0`.

Changelog:
[General][Breaking] - Disallow invalid unitless lengths in filters

Reviewed By: javache

Differential Revision: D69210768

fbshipit-source-id: c20a3aa1e9dbc84f636235a70c58e4d96dbe86b9
2025-02-06 21:02:24 -08:00
Nick Gerleman e2a776f322 transformOrigin Parsing (#49216)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49216

Should be able to replace `processTransformOrigin`.

As part of this, I discovered `processTransformOrigin` has a bug where it does not correctly support `center left` or `center right` syntax since it assumes first occurrence of `center` is for the horizontal

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69204030

fbshipit-source-id: 8001ef4f0b54fcbe93855920260e077b89669f6d
2025-02-06 21:02:24 -08:00
Nick Gerleman 36adaf4c0b Transform parsing (#49189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49189

Allow parsing the set of currently supported transform functions, and lists of them, using `CSSTranformFunction` (which may decompose to e.g. `CSSScaleX`), and `CSSTransformList`.

A bit more duplication than I would like here, but a lot of these have subtle differences.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69153280

fbshipit-source-id: ef8e93c8a49a7f1b98bd7c57614aa1c84417120d
2025-02-06 21:02:24 -08:00
Peter Abbondanzo 99212cf6f3 Backout of "[xplat/js][RN][metro][socialvr] Update monorepo Jest to 29.7.0" (#49239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49239

Changelog: [Internal]

Reverts https://github.com/facebook/react-native/pull/49213 which is causing some internal test failures

Reviewed By: makovkastar

Differential Revision: D69266554

fbshipit-source-id: bc70286c049b90813ee7ff641adabdf98ea890e0
2025-02-06 19:20:10 -08:00
Riccardo Cipolleschi 5d4f9467d9 Add changelog for 0.75.5 (#49234)
Summary:
Add changelog for 0.75.5

## Changelog:
[Internal] - Add changelog for 0.75.5

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D69256092

Pulled By: cipolleschi

fbshipit-source-id: 946d9edabe1e808d2a916892ab1a978bd7f5855f
2025-02-06 14:40:18 -08:00
Nicola Corti 442a368af5 Remove unnecessary public modifiers from FrescoBasedReactTextInlineImageViewManager (#49230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49230

Those public modifier have no meaning as the class is internal. I'm removing them.

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120

Differential Revision: D69251378

fbshipit-source-id: 4c3747510d18330dcdb8a0798e92736c4ab65a03
2025-02-06 13:32:53 -08:00
shubhamguptadream11 ea876054cf feat: added new workflow for issue monitoring in react native (#49225)
Summary:
While triaging issues in the React Native repository, we face two major challenges:

- Missing Issues: The large volume of issues makes it difficult to ensure that none are overlooked.
- Ownership: There is no structured process to determine who should handle which issue.

To address these challenges, we are setting up this action.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Added a new workflow to monitor new issue in repo.

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

Here we are using this github action: https://github.com/react-native-community/repo-monitor to monitor new issues and then notify it on specific discord server to notify someone.

Currently this action runs every 6 hours.

Requirements:
- We need following inputs to make this workflow run:
   -  `DISCORD_WEBHOOK_URL` to be added in secrets [Needed for posting message in specific channels]
   -  `role_id`: To notify a group.

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

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D69254130

Pulled By: cortinico

fbshipit-source-id: 43a57f8f3bf161042a9432d02f292896ea8f7622
2025-02-06 13:15:29 -08:00
Janic Duplessis e9e0d8c2f7 Improve input files for codegen gradle task (#49227)
Summary:
In some projects we have conventions of using .tsx extension even for files without react components, we had issues where codegen wasn't updated properly.

I debugged the files included in a large project and made some improvements:

- Include tsx and jsx files
- exclude nested node_modules
- exclude ts type def files

## Changelog:

[ANDROID] [FIXED] - Improve input files for codegen gradle task

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

Test Plan: Tested in a large app using codegen. I inspected the files that are included in the task inputs and made sure it works with first party and 3rd party modules.

Reviewed By: cipolleschi

Differential Revision: D69254204

Pulled By: cortinico

fbshipit-source-id: 368408e9719e9b5c9839dd873430b86ae4a062c7
2025-02-06 11:52:25 -08:00
Nicola Corti a5d9044158 Fix minor typo in 0.78 changelog (#49232)
Summary:
Just a minor typo in the changelog for 0.78

## Changelog:

[Internal] [Changed] -

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

Test Plan: ¯\\_(ツ)_/¯

Reviewed By: cipolleschi

Differential Revision: D69252846

Pulled By: cortinico

fbshipit-source-id: 97010601482199c87d7a9da06e5e32a4bfa8a552
2025-02-06 11:40:10 -08:00
zhongwuzw 1e9ac296a5 Added custom load js block in bridge mode (#48845)
Summary:
`loadSourceForBridge` is broken after we refactor the appdelegate. So let's add it back.

## Changelog:

[IOS] [FIXED] - Added custom load js block in bridge mode

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

Test Plan: Custom Appdelegate's `loadSourceForBridge` can be called in bridge mode.

Reviewed By: robhogan

Differential Revision: D68832046

Pulled By: cipolleschi

fbshipit-source-id: dcea791e6d8243fdb2f45a33af175aee1a4e1223
2025-02-06 08:55:33 -08:00
Alex Hunt b54efb8d0d Update multi-platform handling in build-types, add debug logs (#49224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49224

Refactor / quality pass.

- Remove `micromatch`, replace with glob ignores.
- Move and simplify platfom-specific file logic: mutate `files` as a single `Set`, reduce iterations.
    - This is reconfigured so that the input file path globs need only match `*.js` sources.
- Introduce `debug` logs and expose convenience `--debug` script flag.
- Move output error detection into inner function implementation.

Changelog: [Internal]

Metro changelog: Internal

Reviewed By: j-piasecki

Differential Revision: D69240543

fbshipit-source-id: c2faef8212a2995936362b3d33d189c405bd879d
2025-02-06 08:49:29 -08:00
Mateo Guzmán a1b05c5b86 Make SynchronousEventReceiver internal (#49218)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.uimanager.events.SynchronousEventReceiver).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.events.SynchronousEventReceiver internal

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D69242334

Pulled By: cortinico

fbshipit-source-id: 8ac7ff7d5bed43fff72233c3faa5ad9bded81ef1
2025-02-06 08:31:27 -08:00
Andrew Datsenko 1d5cdf10fc Add .nthCalledWith and .toHaveBeenNthCalledWith (#49221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49221

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: cortinico

Differential Revision: D69133125

fbshipit-source-id: fe4e54cbb3646c154108cee6ead9a64c3e75c1b7
2025-02-06 08:02:32 -08:00
Mateo Guzmán 5506441df9 Remove unused ViewUtils object (#49219)
Summary:
As part of the initiative to reduce the public API surface, I found that this object is unused and can be removed. I've also checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.views.common.ViewUtils).

## Changelog:

[INTERNAL] - Remove unused com.facebook.react.views.common.ViewUtils object

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: cortinico, fabriziocucci

Differential Revision: D69239590

Pulled By: javache

fbshipit-source-id: 14881f68903c8fa87966f35e6d5627e8580c9cc2
2025-02-06 07:19:07 -08:00
Mateo Guzmán 62c9ff6264 Kotlinify MessageQueueThreadPerfStats, ReactQueueConfiguration and QueueThreadExceptionHandler (#49215)
Summary:
Migrating a class holder and two remaining interfaces from com.facebook.react.bridge.queue to Kotlin

## Changelog:

[INTERNAL] - Kotlinify MessageQueueThreadPerfStats, ReactQueueConfiguration and QueueThreadExceptionHandler

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: cipolleschi

Differential Revision: D69236832

Pulled By: cortinico

fbshipit-source-id: 765632740ce5023229d8dd2ddec4c069840c1d33
2025-02-06 07:06:17 -08:00
Rubén Norte c169250a36 Implement test.only in benchmarks (#49222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49222

Changelog: [internal]

This implements `test.only` in Fantom benchmarks, so we can focus on a specific case to speed up iteration.

Reviewed By: sammy-SC

Differential Revision: D69241220

fbshipit-source-id: 42b02fcb4d693988da4fa15a0c6bd7e90e473b9f
2025-02-06 05:50:19 -08:00
Rubén Norte 1902c3c4d5 Rename add as test in benchmarking API (#49223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49223

Changelog: [internal]

Renames `suite.add()` as `suite.test()` for symmetry with Jest.

We'll also allow `test.only` in a following change for quick iteration.

Reviewed By: rshest

Differential Revision: D69241221

fbshipit-source-id: d141f80dc0c8e51b419ce233bca68bf0755fd356
2025-02-06 05:50:19 -08:00
Nicola Corti e96396bd18 Fix @react-native/popup-menu-android not building for 3rd party developers (#49212)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49212

Currently, developers can't use `popup-menu-android` at all because the Gradle file we publish is referencing
internal machinery.

I'm adding a pre-publish script that manipulates the Gradle. This is the easiest solution without having to do
crazy setup inside RNGP or having duplicated version codes around in the monorepo.

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

Changelog:
[Android] [Fixed] - Fix react-native/popup-menu-android not building for 3rd party developers

Reviewed By: cipolleschi

Differential Revision: D69192874

fbshipit-source-id: 9f9e8a0a6e76308e598a09f4c70dbc659c238b00
2025-02-06 05:47:37 -08:00
Oskar Kwaśniewski ecad90ad8b fix: move view flattening props to cross platform type interface (#49220)
Summary:
Hey!

Since new architecture introduced View Flattening on iOS, props responsible for disabling this feature on specific views should be defined in cross platform interface.

Reference: https://github.com/reactwg/react-native-new-architecture/discussions/110

## Changelog:

[GENERAL] [CHANGED] - move view flattening props to cross platform type interface

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D69239454

Pulled By: javache

fbshipit-source-id: a89cb9fbaec63bbcb7691df067d5d3a375a8a66e
2025-02-06 04:12:56 -08:00
Jakub Piasecki eae7d3c6a1 Update types exposed by Alert and the module structure (#49157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49157

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69044715

fbshipit-source-id: 05486d9c9be161a3604ef535d260f525d7c9e9d1
2025-02-06 03:59:28 -08:00
Riccardo Cipolleschi 9d4c4b2741 Fix typo in verifyReleaseOnNPM-test file (#49207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49207

Renamed `verifyReleaseOnNPM-test` to `verifyRNReleaseOnNpm-test`.

## Changelog:
[Internal] - rename a test file for CI script

Reviewed By: huntie

Differential Revision: D69183614

fbshipit-source-id: 7a2c2804617f380758a53438598bb6fe0e27e68d
2025-02-06 03:39:15 -08:00
Dawid Małecki 5f110c416b Add Settings path to build-types script and align Flow with TS types (#49175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49175

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69121991

fbshipit-source-id: 022d56e823aae884ce10fd24cc9701b02db19e9f
2025-02-06 03:02:42 -08:00
Nicola Corti 091f8cf506 Add changelog for 0.76.7 (#49214)
Summary:
Add changelog for 0.76.7

## Changelog:

[Internal] [Changed] -

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D69198059

Pulled By: cortinico

fbshipit-source-id: 0f9c22ad8d175d1afab4f9eb59753834b079d756
2025-02-06 02:49:48 -08:00
Rob Hogan d5c1647a29 Update monorepo Jest to 29.7.0 (#49213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49213

Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D69188217

fbshipit-source-id: 0748db5428e422c048454b7d129cbdd4dab6d687
2025-02-05 21:42:48 -08:00
Nick Lefever 04279cea78 Remove RSNRU feature flag after holdout cleanup (#49146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49146

Runtime Reference ShadowNode Update is enabled by default and no longer referenced in the RN holdout. This diff:
- removes the feature flag
- removes all references to the feature flag, enabling it
- updates the unit test for RSNRU

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D69061234

fbshipit-source-id: 0dab0b5cae99e83297f34645dee58ae9b3c0dc5f
2025-02-05 18:55:46 -08:00
Thomas Nardone ca5ce205f7 Add separate flags for recycling View, Text components (#49211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49211

Add more control over view recycling behavior by splitting out each component that currently supports it.

Changelog:[Android][Added] Feature flags for recycling View, Text components separately

Reviewed By: sammy-SC, mdvacca

Differential Revision: D69190841

fbshipit-source-id: 6d85fee7103bf928e4f5bf6946bab3ff4cae4053
2025-02-05 18:36:06 -08:00
Tim Yung fb8a6a5bb0 Animated: Avoid In-Band State Update (#49184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49184

D65645985 shipped a refactor to `Animated`, so that it would use a custom `useAnimatedPropsMemo` instead of `useMemo`. This significantly improved update performance by no longer invalidating the `AnimatedProps` on effectively every update to `Animated` components.

However, this was measured to increase memory usage. After a few experiments, we identified that use of the in-band state update was responsible for the memory regression. While this requires further root cause investigation, this diff attempts to mitigate the memory regression.

This diff introduces a feature flag that enables an implementation that minimizes duplicated work, such as unnecessarily computing `compositeKey` or creating new instances of `AnimatedProps`. In addition, this implementation strives to do so without significantly degrading when an update is interrupted by a concurrent update.

Changelog:
[General][Changed] - Introduced a feature flag to test an optimization in `Animated` to reduce memory usage.

Reviewed By: rickhanlonii

Differential Revision: D69135223

fbshipit-source-id: a2699a314625e7570698bc41455b139711cfd7e3
2025-02-05 16:24:37 -08:00
David Vacca bdb394f754 Extend ReactNativeFeatureFlags to support prereleaseChannels (#49141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49141

This diff extends ReactNativeFeatureFlags to support prereleaseChannels, the goal is to be able to configure what release channel each feature flag will be enabled / disabled

changelog: [internal] internal

Reviewed By: rubennorte

Differential Revision: D68583324

fbshipit-source-id: 09fde8511dcf5dff63821f15afe0a2530a0845fd
2025-02-05 13:36:21 -08:00