Commit Graph

38536 Commits

Author SHA1 Message Date
Fabrizio Cucci 817cb17f78 Migrate rn-tester/js/examples/Layout/LayoutExample.js to function components (#48646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48646

As per title.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D68098856

fbshipit-source-id: ad878569f5b88afa57895b4b08de32c880ee8242
2025-01-14 03:20:05 -08:00
Dawid Małecki 2056794d24 Refactor import syntax that caused $FlowFixMe generation in snap (#48639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48639

Changelog:
[Internal] - refactored import syntax in File, ElementProperties, Inspector, InspectorOverlay, InspectorPanel, PerformanceOverlay, Modal, YellowBoxDeprecated

Reviewed By: andrewdacenko

Differential Revision: D68099152

fbshipit-source-id: a0d840a6000fd3974a3ce4673455180a8be66288
2025-01-14 03:08:44 -08:00
Dawid Małecki 647ca90a30 Replace $FlowFixMe in AnimatedWeb (#48633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48633

Changelog:
[General][Changed] - Improved types in AnimatedWeb

Reviewed By: huntie

Differential Revision: D68092072

fbshipit-source-id: 396efffc64030b0b2d4085f969b92c422b227c0d
2025-01-14 02:59:52 -08:00
David Vacca 2d320fbd76 Cache ViewManagerDelegate on ViewManagers (#48550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48550

Cache ViewManagerDelegate on ViewManagers

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D67957883

fbshipit-source-id: 8ec2f34fca04833e391b0bd5b9329cdc9ee12f08
2025-01-13 23:39:45 -08:00
Fabrizio Cucci 980458c061 Migrate rn-tester/js/components/RNTesterButton.js to function components (#48645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48645

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68098118

fbshipit-source-id: 09f9c318afc210ca2ce6967dac7109544ef6717c
2025-01-13 13:07:44 -08:00
Pieter De Baets 5a290c4cab Fix nullability of ViewManagerDelegate method args (#48602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48602

See context in D64532446 / https://github.com/facebook/react-native/pull/47086

These argument types were already consumed as nullable in various OSS libraries, which prevents correct Kotlin migration of this code.

Changelog: [Android][Changed] Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand

Reviewed By: mdvacca

Differential Revision: D67277871

fbshipit-source-id: a0743584891c7b2b4b50fff11de15da0078d5a1a
2025-01-13 10:54:37 -08:00
Fabrizio Cucci 90d2f65301 Migrate rn-tester/js/examples/AppState/AppStateExample.js to function components (#48644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48644

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095480

fbshipit-source-id: 2487fa5e66d672883cbfde0c68348a90db09d484
2025-01-13 10:47:13 -08:00
Fabrizio Cucci 05e8007e12 Migrate rn-tester/js/examples/OrientationChange/OrientationChangeExample.js to function components (#48643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48643

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095232

fbshipit-source-id: fdf45a3bb64c590ea21222a02ae94d975579db49
2025-01-13 10:47:13 -08:00
Fabrizio Cucci 1e0009407d Migrate rn-tester/js/components/TextInlineView.js to function components (#48640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48640

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095013

fbshipit-source-id: a593af63029352844e544245d88e7b4c9d7eb75c
2025-01-13 08:59:43 -08:00
Parsa Nasirimehr 12e321daf0 chore(Android): Migrate Hermes Executor to Kotlin (#48617)
Summary:
Migrating HermesExecutor and it's factory to Kotlin. Not sure if the TAG in HermesExecutorFactory is needed anymore or not, but the rest of the changes are pretty bog standard

## Changelog:

[INTERNAL] [FIXED] - Migrate HermesExecutor and HermesExecutorFactory to Kotlin

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

Test Plan:
`./gradlew test`:
<img width="1266" alt="Screenshot 2025-01-11 at 04 01 12" src="https://github.com/user-attachments/assets/c0f1402c-796b-45fa-9ee3-41c5a5ffc356" />

Reviewed By: tdn120

Differential Revision: D68094681

Pulled By: cortinico

fbshipit-source-id: 16eae5c7c24886421cbd2cbf213295134a9c01cf
2025-01-13 08:44:05 -08:00
Thomas Nardone c7785e7ead Convert ReactTextInlineImageShadowNode (#48576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48576

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D67981753

fbshipit-source-id: 5d8a2408af9af350c0d3b369677ff8ee00335554
2025-01-13 08:39:18 -08:00
Rubén Norte fe8d102663 Create placeholder for User Timing API tests (#48634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48634

Changelog: [internal]

Just a placeholder to add new tests in the future.

Reviewed By: sammy-SC

Differential Revision: D68093342

fbshipit-source-id: 1e1d7fd71865763ef66b3bb1c76ff8b8ebca9fd9
2025-01-13 07:01:03 -08:00
Riccardo Cipolleschi 671520943f Remove build codegen from Cocoapods (#48631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48631

This step is already carried out by [generate-artifact-executor](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor.js#L385) if needed.

We can remove it from cocoapods and this will make it easier to migrate away from them.

For 3rd party apps that uses a specific version of React Native, codegen is shipped in NPM as already built in the react-native/codegen package.

This change really affects only the React Native monorepo.

## Changelog
[Internal] - Remove build codegen step from cocoapods

Reviewed By: cortinico

Differential Revision: D68019743

fbshipit-source-id: 7aaf9275886ba8b86d38d943d2b26bd8eed11aa8
2025-01-13 07:00:12 -08:00
Mateo Guzmán d4407d6f77 Fix RNTester strict mode warnings (#48619)
Summary:
While investigating https://github.com/facebook/react-native/issues/22186, some false positives showed up as some of the examples also have non-strict mode compatible code.

In this PR:

- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.

## Changelog:

[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples

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

Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.

Reviewed By: fabriziocucci

Differential Revision: D68094402

Pulled By: rshest

fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
2025-01-13 05:11:13 -08:00
Samuel Susla 6cb2684b43 fix modal becoming unresponsive with PullToRefresh
Summary:
## Changelog:

[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />

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

This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.

Reviewed By: cipolleschi

Differential Revision: D68025099

fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611

Co-authored-by: kkafar <kacperkafara@gmail.com>
2025-01-13 04:53:04 -08:00
Mateo Guzmán cc4e4c7fec Fix RNTester strict mode warnings (#48620)
Summary:
Follow up from https://github.com/facebook/react-native/issues/48619. While investigating https://github.com/facebook/react-native/issues/22186, some false positives showed up as some of the examples also have non-strict mode compatible code.

In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.

## Changelog:

[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples

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

Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.

Reviewed By: rshest

Differential Revision: D68092958

Pulled By: cipolleschi

fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
2025-01-13 04:46:57 -08:00
Ilia Sidorenko 2f2281718a Resolve master specs repo warning shown in pod install (#48628)
Summary:
Fix for https://github.com/facebook/react-native/issues/48627

## Changelog:

[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning

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

Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing

Reviewed By: rshest

Differential Revision: D68094563

Pulled By: fabriziocucci

fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
2025-01-13 04:33:27 -08:00
Dawid Małecki f832c450a5 Replace $FlowFixMe in BoxInspector and refactor (#48601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48601

Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code

Reviewed By: NickGerleman

Differential Revision: D68017470

fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
2025-01-13 02:11:33 -08:00
Dawid Małecki 49e5c58c59 Replace $FlowFixMeProps in StyleInspector and refactor (#48608)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48608

Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code

Reviewed By: fabriziocucci

Differential Revision: D68018846

fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
2025-01-13 02:09:30 -08:00
Dawid Małecki 2959d49e8d Replace $FlowFixMeProps in ElementBox and refactor (#48605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48605

Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code

Reviewed By: NickGerleman

Differential Revision: D68018112

fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
2025-01-13 00:19:36 -08:00
Dawid Małecki 48a7840919 Replace $FlowFixMe in BorderBox (#48593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48593

Changelog: [General][Changed] - Improve types on BorderBox

Reviewed By: NickGerleman

Differential Revision: D68014754

fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
2025-01-13 00:17:56 -08:00
Samuel Susla 83699228c0 isolate use of folly to interpolateViewProps on Android (#48556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48556

Changelog: [Internal]

the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.

Reviewed By: javache

Differential Revision: D67942951

fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
2025-01-10 16:15:05 -08:00
Christoph Purrer 55d0bc4b77 Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode (#48584)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48584

[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode

As a preparation for https://github.com/facebook/react-native/pull/48165 this aligns the implementation of those 2 methods

Reviewed By: NickGerleman

Differential Revision: D68004218

fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
2025-01-10 15:35:34 -08:00
Eli White cf5ab03d43 Include cxx modules in codegen schema (#48581)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48581

Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.

Reviewed By: cipolleschi

Differential Revision: D68000360

fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
2025-01-10 14:38:57 -08:00
David Vacca db57080e08 Refactor ViewManager codegen to use new ViewManagerInterface (#48549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48549

Refactor ViewManager codegen to use new ViewManagerInterface

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D67957884

fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
2025-01-10 13:58:28 -08:00
David Vacca 40a0cdbc99 Introduce ViewManagerInterface (#48548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48548

In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture

changelog: [Android][Changed] Introduce new public API ViewManagerInterface

Reviewed By: javache

Differential Revision: D67957886

fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
2025-01-10 13:58:28 -08:00
Christoph Purrer 6865e5a993 Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android (#48582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48582

[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android

As a preparation for https://github.com/facebook/react-native/pull/48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h

to make it easier for future changes to look at the delta between both implementations.

The goal is land https://github.com/facebook/react-native/pull/48582 which aligns the RN iOS and RN Android implementation

Reviewed By: NickGerleman

Differential Revision: D68001423

fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
2025-01-10 13:28:16 -08:00
Nick Gerleman e53b76b6c6 Cleanup enableAndroidLineHeightCentering flag (#48577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48577

This has been enabled by default for about two and a half months. Let's clean up the old path.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D67985133

fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
2025-01-10 13:08:45 -08:00
Nicola Corti 2ab9a8c135 Cleanup enableAlignItemsBaselineOnFabricIOS (#48607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48607

This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.

Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`

Reviewed By: cipolleschi

Differential Revision: D68018624

fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
2025-01-10 11:15:03 -08:00
Nicola Corti a40a885d88 Fix test-e2e-local with RNTester due to unbuilt codegen (#48558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48558

Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.

That's because codegen is not built. This commit fixes it.

Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen

Reviewed By: cipolleschi

Differential Revision: D67972074

fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
2025-01-10 08:46:37 -08:00
Pieter De Baets f6f7de61f4 Drop dependency on native/fb (#48568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48568

We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.

This code was forked for open-source and not synced in anyway, which is a potential liability.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D67796633

fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
2025-01-10 08:16:26 -08:00
Pieter De Baets b0466d8cdd Remove unnecessary interpolation for logcat logging (#48567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48567

We don't need the `FBLOG_PRI` macro which does unnecessary additional interpolation, and can instead directly call `__android_log_write`

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D67461225

fbshipit-source-id: 3f2c881ce996b9638ef62e40ecc05f3e5a3e6ac1
2025-01-10 08:16:26 -08:00
Nicola Corti 7dcbc799eb Fix crash for setEventEmitterCallback NoSuchMethodError on API lvl 26 (#48606)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48606

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

The app is currently crashing on Android API lvl 26 attempting to invoke the method
`setEventEmitterCallback` which is defined inside BaseJavaModule.

I'm not entirely sure why this is happening only for API lvl 26, but I've verified
that by having the method protected, this doesn't happen anymore.

The visibility is consistent with the field `mEventEmitterCallback` which is also
protected and accessed to codegen. So let's keep them aligned for consistency.

Changelog:
[Android] [Fixed] - Fix crash for setEventEmitterCallback NoSuchMethodError on API lvl 26

Reviewed By: cipolleschi

Differential Revision: D68018506

fbshipit-source-id: 87eda718c9774b584abdf771eaad5833d452a1ea
2025-01-10 07:56:17 -08:00
Nicola Corti 4c7c836ebf AGP to 8.8.0 (#48604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48604

Just keeping our dependency up to date.

Changelog:
[Android] [Changed] - Bumped Android Gradle Plugin (AGP) to 8.8.0

Reviewed By: cipolleschi

Differential Revision: D68017839

fbshipit-source-id: 6a452d60cce9bb60e67013eab0bef27e2f2adfc0
2025-01-10 07:38:19 -08:00
Nicola Corti 7bb92a3c2d refactor: Remove unnecessary parameter from configureRepositories (#48596)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48596

The second parameter of `configureRepositories` was unused. Let's remove it.

Changelog:
[Internal] [Changed] - refactor: Remove unnecessary parameter from configureRepositories

Reviewed By: cipolleschi

Differential Revision: D68016105

fbshipit-source-id: 9fa05cd33e2f7a6986cf1fcdef0d75e74f315843
2025-01-10 07:38:08 -08:00
Nicola Corti a98528e609 Make the addition of JitPack repository configurable (#48595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48595

Historically React Native used to include the JitPack repository be default in the default repositories.

This sadly exposes React Native projects to supply chain attacks as explained here:
https://blog.oversecured.com/Introducing-MavenGate-a-supply-chain-attack-method-for-Java-and-Android-applications/

Moreover, artifacts on Jitpack are not GPG signed it's complicated to verify the identity of artifact authors.
I'm introducing a Gradle property to control if Jitpack should be included by default or not.

User can control this behavior by changing their `gradle.properties` file as such:

```
includeJitpackRepository=false
```

The default value of this property is currently true, but we're looking into changing it to false in the future.

Changelog:
[Android] [Added] - Make the addition of JitPack repository configurable

Reviewed By: cipolleschi

Differential Revision: D68016028

fbshipit-source-id: 392513fef389a4835b4e00a8184459e00d51fdd0
2025-01-10 07:38:08 -08:00
Nicola Corti c85be01cba Add .kotlin/ to gitignore (#48598)
Summary:
Adding .kotlin to gitignore. This folder starts to get used with K2 (with Kotlin 2.0) so we should be
adding it to the gitignore files

## Changelog:

[INTERNAL] - Add .kotlin to gitignore

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D68018000

Pulled By: cortinico

fbshipit-source-id: 78be3597071d07d105145d8ba94cd83cbf4f21bc
2025-01-10 07:35:12 -08:00
Rubén Norte fd0894b1c7 Add support for the columns option in console.table (#48592)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48592

Changelog: [General][Added] Add support for the second parameter of `console.table` to specify a list of columns to print in the table.

Reviewed By: javache

Differential Revision: D67803665

fbshipit-source-id: 354476404bad7cd2d280c8b3d963d5acba41f86b
2025-01-10 05:41:37 -08:00
Rubén Norte 7154c62afb Improve formatting of table in console.table (#48591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48591

Changelog: [General][Changed] Improved formatting of values logged via `console.table` (including Markdown format).

This provides several improvements over the format of tables logged via `console.table`:
* Markdown format for easy integration in existing documents.
* Increased alignment with the spec and Chrome/Firefox implementations:
  * Added index columns.
  * Logged all available columns.
  * Format for all types of values (including objects, functions, etc.).

Reviewed By: javache

Differential Revision: D67794858

fbshipit-source-id: 464c938ed51f28a8e071bc46f0f5b0d970005873
2025-01-10 05:41:37 -08:00
Rubén Norte caa77fbe2b Prevent console.table from modifying passed values (#48590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48590

Changelog: [General][Fixed] Modified `console.table` to avoid mutating the received argument.

Reviewed By: sammy-SC

Differential Revision: D67791795

fbshipit-source-id: a889fe95914cf7850e6429742845b126917babc7
2025-01-10 05:41:37 -08:00
Rubén Norte 7f985f29e3 Add tests for console.table (#48589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48589

Changelog: [internal]

Added basic tests for the current implementation of the `console.table` polyfill (not the CDP implementation).

Reviewed By: sammy-SC

Differential Revision: D67791579

fbshipit-source-id: 80d64903a92e87e0724ed302ec0521419f45f9a7
2025-01-10 05:41:37 -08:00
Nicola Corti a28d3961bd Do not reset rn-artifacts-version on release branch (#48572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48572

Because of this extra step on build-android, we're seeing the version 1000.0.0-<SHA>
on commits on the release branch. This prevents it.

Changelog:
[Internal] [Changed] - Do not reset rn-artifacts-version on release branch

Reviewed By: cipolleschi

Differential Revision: D67975049

fbshipit-source-id: dace7c931ec310538c11c4b9e544fdc2241a1d0c
2025-01-10 03:44:04 -08:00
Rubén Norte deea42329e Remove verification function from ReactFabricPublicInstance benchmark (#48588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48588

Changelog: [internal]

This has proved to be very CI and makes it fail a lot, so we're removing this for now.

Reviewed By: javache

Differential Revision: D67985917

fbshipit-source-id: 5ec7c1387ddfb8fb2a4e90450a98cb3caea9399f
2025-01-10 03:35:04 -08:00
Samuel Susla bb6bbfc261 remove folly::tryTo (#48557)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48557

changelog: [internal]

delete use of folly::tryTo from react native.

Reviewed By: christophpurrer

Differential Revision: D67942789

fbshipit-source-id: 976caa12b6ff6063041be3259aa8ebd642ca3ca0
2025-01-10 03:23:11 -08:00
Jakub Piasecki 1051bd8f3e Explicitly type UIManagerProperties (#48587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48587

Changelog: [Internal]

Reviewed By: cortinico, huntie

Differential Revision: D67977469

fbshipit-source-id: 0f866aeaa3d19ba2bc01d2e4685487c9b1a3329f
2025-01-10 02:26:57 -08:00
Peter Abbondanzo 071506fa61 Add tinted vector drawable example to RNTester (#48541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48541

Shows how to use tintColor in conjunction with new XML file format, and serves as a good E2E test bench to ensure that drawables don't accidentally reuse the same state (if the underlying implementation isn't careful enough to call `buildCopy`, both icons will render red)

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D64136753

fbshipit-source-id: 3bd0933e587364425ac14a0635690d4b274a55fe
2025-01-09 19:56:12 -08:00
Nick Gerleman 9b646c8b7b Fix incorrect height of single line TextInput without definite size (#48523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48523

Current AndroidTextInputShadowNode logic measures the height of the TextInput by fitting text into the constraints of the TextInput box. This results in the wrong height for single line TextInputs, since a single line TextInput is infinitely horizontally scrollable (whearas the outer TextInput component itself has a fixed width).

After this change, we measure text under single line textinputs with an infinite width constraint, then clamp to the final constraints of the TextInput, to better emulate what is happening under the hood.

iOS ended up solving this in a slightly different way, by measuring paragraph with `maximumNumberOfLines={1}` when not multiline, but think this is a bit more fraught. E.g. up until recently, it would have meant that the width could have been less than max width, depending on where line-breaking happened. I ended up duplicating the new logic to use for both instead (D66914447 will eventually deduplicate).

Changelog:
[Android][Fixed] - Fix incorrect height of single line TextInputs without definite size

Reviewed By: christophpurrer

Differential Revision: D67916827

fbshipit-source-id: b827185c4640835481794cb985c2b62dcf643abe
2025-01-09 10:57:05 -08:00
Rubén Norte 8310d651e0 Mark benchmark API as unstable (#48570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48570

Changelog: [internal]

We're still iterating on this feature and making sure it reports stable results, so marking it as `unstable` to set expectations.

Reviewed By: andrewdacenko

Differential Revision: D67975844

fbshipit-source-id: 41e93cb9cb0c887a96178e4a4d5078d1899b2478
2025-01-09 10:11:18 -08:00
Samuel Susla 8d67d51bdc remove use of folly::init (#48573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48573

changelog: [internal]

remove main.cpp for cxxreact/tests. It is not needed for tests to work and it breaks build for C++ only tests.

Reviewed By: javache

Differential Revision: D67975182

fbshipit-source-id: b9cbc5b5b6a87aafc69448e99877e664ed2d5af2
2025-01-09 08:43:22 -08:00
Alex Hunt b5155fba89 Replace $FlowFixMe in DrawerLayoutAndroid (#48569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48569

Changelog:
[General][Changed] - Improve types on DrawerLayoutAndroid

Reviewed By: cipolleschi

Differential Revision: D67975172

fbshipit-source-id: 922d51d78b9e035f7703b1d53af39fa6dae8060b
2025-01-09 07:47:58 -08:00