Commit Graph
34528 Commits
Author SHA1 Message Date
Nicola Corti d01e5ad731 Fix yarn lint 2025-01-15 19:24:57 +00:00
Nicola Corti a97d6185fa No need to invoke 'input keyevent 82' on test-e2e-local 2025-01-15 16:22:43 +00:00
Dawid MałeckiandFacebook GitHub Bot 1126bbb149 Add explicit type to supported commands in TextInputNativeCommands (#48688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48688

Changelog:
[General][Changed] - Added explicit type to supported commands in TextInputNativeCommands

Reviewed By: cortinico

Differential Revision: D68205568

fbshipit-source-id: 53501cdeaf4d790b36156b59f76686e8fef5cc5f
2025-01-15 08:15:37 -08:00
Dawid MałeckiandFacebook GitHub Bot f36bfe5dfa Remove redundant {||} syntax (#48686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48686

Changelog:
[Internal] - Removed redundant `{||}` syntax

Reviewed By: javache

Differential Revision: D68205038

fbshipit-source-id: f7d3271142b6443a5859c3b668b7aebd3ce3ef3f
2025-01-15 07:07:01 -08:00
Fabrizio CucciandFacebook GitHub Bot e8a64fd638 Migrate rn-tester/IntegrationTests/ImageCachePolicyTest.js to function components (#48701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48701

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68153254

fbshipit-source-id: 24789c814550cd592cb68a0576c5037088734a75
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 8c64e0868e Migrate rn-tester/IntegrationTests/SimpleSnapshotTest.js to function components (#48700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48700

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152855

fbshipit-source-id: 121cb5dd65673121a021da12d10c7a7e118bd0dc
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 086e93d227 Migrate rn-tester/IntegrationTests/AppEventsTest.js to function components (#48699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48699

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152557

fbshipit-source-id: 9fa6cad408f6fbd3da513623379b864d0c33c63d
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot f864d6b533 Migrate rn-tester/IntegrationTests/ImageSnapshotTest.js to function components (#48698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48698

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152467

fbshipit-source-id: 0f747f1646be5a3ca010c2c0e0591f13bfcaf2f4
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot d1153ff468 Migrate rn-tester/IntegrationTests/PromiseTest.js to function components (#48697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48697

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152416

fbshipit-source-id: 32d6d503ed119f8d7e5b9c139060b61ef44b8768
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 1a1714300e Migrate rn-tester/IntegrationTests/SyncMethodTest.js to function components (#48696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48696

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152294

fbshipit-source-id: 16b36d4702159528fe99c1a7d54c2c7b58d30349
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot c33954c80d Migrate rn-tester/IntegrationTests/GlobalEvalWithSourceUrlTest.js to function components (#48695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48695

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152232

fbshipit-source-id: 918236f8c9789efab9cc43b85e53fa398909808c
2025-01-15 06:11:21 -08:00
Tim YungandFacebook GitHub Bot 00d272fb3b Animated: Fix onUserDrivenAnimationEnded w/ Insertion Effects (#48678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48678

While diagnosing a recent issue in which `AnimatedValue` instances were not being correctly updated as expected, the insertion effects feature flag was identified as a root cause.

Upon further investigation, it appears that this is because the `onUserDrivenAnimationEnded` listener was not implemented the same way in the two feature flag states:

- When `useInsertionEffectsForAnimations` is disabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in a passive effect, after all nodes have been attached.
- When `useInsertionEffectsForAnimations` is enabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in an insertion effect when attaching nodes.

The bugs occurs because `useAnimatedProps` checks whether native driver is employed to decide whether to listen to `onUserDrivenAnimationEnded`. However, we do not know whether native driver will be employed during the insertion effect. (Actually, we do not necessarily know that in a passive effect, either... but that is a separate matter.)

This fixes the bug when that occurs when `useInsertionEffectsForAnimations` is enabled, by moving the listening logic of `onUserDrivenAnimationEnded` into a passive effect. This is the same way that it is implemented when `useInsertionEffectsForAnimations` is disabled.

Changelog:
[Internal]

Reviewed By: javache, sammy-SC

Differential Revision: D68171721

fbshipit-source-id: 50b23348fd4641580581cacebc920959651f96a7
2025-01-15 05:40:15 -08:00
Mateo GuzmánandFacebook GitHub Bot e7378f0d9e Migrate HeaderUtil to Kotlin (#48676)
Summary:
Migrate `HeaderUtil` to Kotlin.

## Changelog:

[INTERNAL] - Migrate `HeaderUtil` to Kotlin

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

Test Plan:
The file had tests:

```bash
yarn test-android
```

Reviewed By: fabriziocucci

Differential Revision: D68205283

Pulled By: javache

fbshipit-source-id: 23ad7726a5e597d5012eec6b194af3b1e10a8b7a
2025-01-15 04:45:02 -08:00
Nicola CortiandFacebook GitHub Bot d90c278672 Reformat MutationObserver test to comply with yarn lint --fix (#48692)
Summary:
Whenever I run `yarn lint --fix` I noticed that this test is not formatted correctly. This fixes it.

## Changelog:

[Internal] [Changed] -

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

Test Plan: CI

Reviewed By: sammy-SC

Differential Revision: D68207001

Pulled By: cortinico

fbshipit-source-id: 2a6c44ca02249f6662b03c87f0c4d4f3eb5a3054
2025-01-15 04:43:50 -08:00
Nicola CortiandFacebook GitHub Bot 9a4b2cecd5 Cleanup prealpha logic from Cocoapods (#48690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48690

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68205691

fbshipit-source-id: 22a3416335052a4bf6a76faa6e6af622254a6e56
2025-01-15 04:30:37 -08:00
Nicola CortiandFacebook GitHub Bot 63442d3757 RNGP - Cleanup prealpha logic from the Gradle Plugin (#48689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48689

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] - RNGP - Cleanup prealpha logic from the Gradle Plugin

Reviewed By: cipolleschi

Differential Revision: D68205665

fbshipit-source-id: 81d5257544df97b566421164944e3b6e71f06635
2025-01-15 04:30:37 -08:00
LeviandFacebook GitHub Bot c09b71b990 Fabric: Support stylistic sets for fontVariant (#48674)
Summary:
In the old arch, stylistic sets were supported however in the new arch support was not added. It seems that fontVariant support was actually initially missed on iOS fabric however a limited version was added in https://github.com/facebook/react-native/pull/44112 . I referenced that PR and also old arch implementation for these changes.
<img width="480" alt="Screenshot 2025-01-14 at 11 15 18 AM" src="https://github.com/user-attachments/assets/ec32a356-fadd-4281-83b9-15871bbcd18f" />

## Changelog:

<!-- 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
-->

[GENERAL] [ADDED] - Support stylistic sets for fontVariant

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

Test Plan:
- Verified that the "Unsupported FontVariant" native log no longer displays on both platforms
- On iOS was easy to test in the tester app as SF supports stylistic sets by default:
```
<Text>
  Stylistic{'\n'}
  <Text>Normal: ${'\n'}</Text>
  <Text style={{fontVariant: ['stylistic-four']}}>
    Stylistic Four: $
  </Text>
</Text>
```

<img width="391" alt="Screenshot 2025-01-14 at 11 59 29 AM" src="https://github.com/user-attachments/assets/1ede258e-783f-448f-8300-4c8c710796ef" />

- On Android I could not find any system fonts that support stylistic sets by default so I added Raleway and confirmed with a W character
![image](https://github.com/user-attachments/assets/e4b661ba-0013-4e60-90d0-1864be538159)

I did not add font variant example to the tester apps as I felt it could be confusing for people at a glance to understand why there is only a system font example on iOS and why I chose the specific stylistic set.

Reviewed By: cipolleschi

Differential Revision: D68205738

Pulled By: javache

fbshipit-source-id: 03ce572d3c8ecafca71fe00fc0e88eeafc2558bb
2025-01-15 04:23:39 -08:00
Pieter De BaetsandFacebook GitHub Bot a18bc58645 Provide default implementation of ViewManager#getDelegate (#48664)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48664

Simplify ViewManager base-class by making `ViewManager`'s delegate non-nullable and using a single path for updating properties.

The ViewManagerDelegate API can map back to the original ViewManagerSetter API transparently, allowing us to remove the codepath from `ViewManagerPropertyUpdater`.

Changelog: [Android][Removed] `ViewManagerPropertyUpdater.updateProps` is deprected, use the related ViewManager APIs instead

Reviewed By: mdvacca, rshest

Differential Revision: D68120420

fbshipit-source-id: cd8b906dc36d4803dbe09ee0283654285eb81fd4
2025-01-15 04:05:47 -08:00
Pieter De BaetsandFacebook GitHub Bot 54ac150324 Convert com.facebook.react.uimanager.ViewManagerPropertyUpdater to Kotlin (#48658)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48658

Migrate to Kotlin before I make further changes to this. Generics are really tricky due to our previous usage of raw generics on the Java side, but were worked around by some combination of unchecked cast and `Nothing`

Changelog: [Internal]

Reviewed By: mdvacca, rshest

Differential Revision: D68102210

fbshipit-source-id: 90013f09db0826f571a4e2a84132ae3b49fa299d
2025-01-15 04:05:47 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 5b1877fb3f Create changelog for 0.78.0-rc.0 (#48685)
Summary:
Add changelog for 0.78.0-rc.0

## Changelog:
[Internal] - Add changelog for 0.78.0-rc.0

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D68205113

Pulled By: cipolleschi

fbshipit-source-id: f3f572e1da475ef6229b2432d3fff821ec2f5ae1
2025-01-15 03:06:55 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 559d070e8e Use RNTester App downloaded from CI instead of building (#48637)
Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.

## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS

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

Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator

Reviewed By: cortinico

Differential Revision: D68161477

Pulled By: cipolleschi

fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
2025-01-15 01:04:29 -08:00
Joe VilchesandFacebook GitHub Bot 3420eb87b0 Allow text inputs to handle native requestFocus calls (#48547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48547

For some unknown reason, we have been swallowing [`requestFocus`](https://developer.android.com/reference/android/view/View#requestFocus(int) calls since `TextInput` is a controlled component - meaning you can control this components value and focus state from JS. This decision was originally made pre 2015 and I cannot find the reason why

I do not think this makes sense. We can still request focus from JS, while allowing the OS to request focus as well in certain cases and we would still be controlling this text input.

This is breaking keyboard navigation. Pressing tab or arrow keys will no-op if the next destination is a `TextInput`. This is because Android will call `requestFocus` from [here](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/ViewRootImpl.java;l=7868?q=performFocusNavigation) when handling key events. Notably, Explore By Touch (TalkBack) swiping gestures WOULD focus `TextInputs` since they go through `ExploreByTouchHelper` methods which we override to call the proper `requestFocusInternal()` method.

**In this diff**: I move the logic in `requestFocusInternal()` into `requestFocus`.

Changelog: [Android] [Fixed] - TextInputs can now receive focus via external keyboard

Reviewed By: NickGerleman

Differential Revision: D67953398

fbshipit-source-id: 506006769a7c8a63f0a9b7ce27cfbe8578777790
2025-01-14 16:31:52 -08:00
Rayner KristantoandFacebook GitHub Bot 0f1d4704df Revert D68017325: Migrate StyleSheet/*.js to use export statements
Differential Revision:
D68017325

Original commit changeset: 3c5b94742f10

Original Phabricator Diff: D68017325

fbshipit-source-id: d7ea1edfe9cca151560e9c0e5554a07153cdb8da
2025-01-14 15:22:26 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b3648be84f Bump maestro to see if it improves stability (#48677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48677

E2E tests are flaky again.
Let's bump maestro to see if stability improves.

This will also remove some noise from the logs, make them easier to read.

## Changelog
[Internal] - Bump maestro version

Reviewed By: cortinico

Differential Revision: D68160005

fbshipit-source-id: 40a25f974dfda75785bf08d8d236e771b44d13cf
2025-01-14 13:32:51 -08:00
Fabrizio CucciandFacebook GitHub Bot 9d1e24cb2f Migrate rn-tester/IntegrationTests/IntegrationTestHarnessTest.js to function components (#48671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48671

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68151272

fbshipit-source-id: 5d42da93ab4fe8aaf34b8916a6d0a234f51c235a
2025-01-14 12:18:41 -08:00
Samuel SuslaandFacebook GitHub Bot 2204ec94d4 fix Pressable when transform style is animated (#48672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48672

## Changelog:

[General] [Fixed] - Buttons becoming unresponsive when transform is animated

# The problem

D67872307 changes when `ensureUpdateSubscriptionExists`  is called to in `__attach`. This breaks the functionality because `__attach` is called before flag `__isNative` is set and subscriptions are never setup.

# Fix

The diff sets up subscriptions in `__makeNative` method.

Reviewed By: yungsters

Differential Revision: D68154908

fbshipit-source-id: e2ac108b064a66dda08902653d6bd20286f92458
2025-01-14 11:05:07 -08:00
Luna WeiandFacebook GitHub Bot e3c63cfd34 Remove native optionality (#48653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48653

Changelog:
[General][Changed] - Mark intersectionRect required in NativeIntersectionObserverEntry

Reviewed By: rubennorte

Differential Revision: D68120751

fbshipit-source-id: 196b3d48cf33721031a0c2a9fa0a55d250926cbe
2025-01-14 09:58:50 -08:00
Dawid MałeckiandFacebook GitHub Bot 48cafc0b69 Replace $FlowFixMe in StatusBar (#48662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48662

Changelog:
[General][Changed] - Improved types in StatusBar by adding StackProps

Reviewed By: javache

Differential Revision: D68152452

fbshipit-source-id: a1ec30526e78eb7205e786ae1d0209037e4a0aba
2025-01-14 09:51:04 -08:00
Nicola CortiandFacebook GitHub Bot 6368555ab0 RN-Tester: Reorder buttons in the New Architecture sample (#48666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48666

The New Architecture sample is getting too big and the two views are not visible anymore.
I'm fixing this but having buttons side by side.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68153245

fbshipit-source-id: 5557fd40f81078fe3994d8efe0e73784e043ed78
2025-01-14 09:15:36 -08:00
Nicola CortiandFacebook GitHub Bot ef7f714f57 Remove unnecessary LICENSE-docs (#48670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48670

The `LICENSE-docs` was needed when this repo was also containing the reactnative.dev docs.
As this is not the case anymore, this file is unncessary.

Changelog:
[Internal] [Changed] - Remove unnecessary LICENSE-docs

Reviewed By: cipolleschi

Differential Revision: D68156336

fbshipit-source-id: 489bf2cb95916c20eb61bfb00e34b8e271bc08e3
2025-01-14 08:53:58 -08:00
Fabrizio CucciandFacebook GitHub Bot 51fb5ab87a Migrate rn-tester/IntegrationTests/AccessibilityManagerTest.js to function components (#48663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48663

As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68151132

fbshipit-source-id: 6fd9c4999a95a6888795c5200aafb15ff623479f
2025-01-14 08:45:21 -08:00
Thomas NardoneandFacebook GitHub Bot a511c1bdee Fix null safety in views/text/frescosupport (#48612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48612

Manual fixes to resolve nullsafe issues.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D67992722

fbshipit-source-id: a26cde9788bc3456ec756326208b4907ad989d4e
2025-01-14 08:28:03 -08:00
Thomas NardoneandFacebook GitHub Bot 8b8b0ba5dc Mark nullsafe fixmes in views/text/frescosupport (#48613)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48613

First step for nullsafe - annotate and mark fixmes

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D67992721

fbshipit-source-id: 0c0a3ac7d4442d35bba1f48d6aabf13a3a1d47c2
2025-01-14 08:28:03 -08:00
Samuel SuslaandFacebook GitHub Bot c799aa07e2 Back out "RN: Enable useInsertionEffectsForAnimations" (#48669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48669

Original commit changeset: d09b2f1b7607

Original Phabricator Diff: D65906157

## Changelog:

[General] [Fixed] - Buttons becoming unresponsive when transform is animated

Reviewed By: yungsters

Differential Revision: D68152746

fbshipit-source-id: aa0c0aa3243c67c95128a75b40dd6aa1251abbca
2025-01-14 08:20:05 -08:00
Riccardo CipolleschiandFacebook GitHub Bot f44ff97c47 Properly test JSC for template_app e2e tests (#48656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48656

While working on 0.78, I realize we were not testing the template app with JSC.

This change should fix this.

## Changelog:
[Internal] - Disable Hermes for the JSC E2E tests with Maestro

Reviewed By: cortinico, fabriziocucci

Differential Revision: D68147849

fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8
2025-01-14 08:11:25 -08:00
Dawid MałeckiandFacebook GitHub Bot 9f7bacaa6b Add explicit types for methods from AnimatedImplementation in AnimatedMock (#48610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48610

Changelog:
[Internal] - Improved typings for AnimatedImplementation methods exported from AnimatedMock

Reviewed By: huntie

Differential Revision: D68019816

fbshipit-source-id: ee73213c0b519be9b72b8dfb2e91a125021de63e
2025-01-14 07:31:54 -08:00
Wojciech LewickiandFacebook GitHub Bot 07769d4d7e feat: Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost (#48338)
Summary:
On bridgeless mode, `reactHost` is kept in memory even after destroying the `DefaultReactNativeHost` in brownfield scenario. Since it keeps references to the modules, they are not deallocated, and their `initialize` methods are not fired again when creating new instance of `react-native` later. It breaks the behavior of e.g. `react-native-screens`, which wants to listen for mutations and should get new `FabricUIManager`: https://github.com/software-mansion/react-native-screens/blob/20b7e83782cd5f79ddd0d61dadc13eeb4db4b258/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt#L45.

In this commit we change the `DefaultReactNativeHost.clear()` method to also invalidate the instance retained inside `DefaultReactHost`

## Changelog:

[ANDROID] [FIXED] - Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost

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

Test Plan: In brownfield scenario, destroy the instance of RN and see that modules are also destroyed.

Reviewed By: cipolleschi

Differential Revision: D67977140

Pulled By: cortinico

fbshipit-source-id: 1804f093ab1a905bef499078ddec32a13c50cc85
2025-01-14 07:31:35 -08:00
Dawid MałeckiandFacebook GitHub Bot 8b5e2ea683 Replace ExactReactElement_DEPRECATED in ScrollViewStickyHeader (#48659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48659

Changelog:
[Internal] - Replaced ExactReactElement_DEPRECATED with React.Node as a children type in ScrollViewStickyHeader

Reviewed By: fabriziocucci

Differential Revision: D68151420

fbshipit-source-id: d4406de67176ae1fea95b8b2ea85f41dc7f5045e
2025-01-14 07:16:41 -08:00
Nicola CortiandFacebook GitHub Bot b7eccf23de Back out "Do not reset rn-artifacts-version on release branch" (#48651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48651

Original commit changeset: dace7c931ec3

Original Phabricator Diff: D67975049

Reviewed By: cipolleschi

Differential Revision: D68114130

fbshipit-source-id: 9fb1707191037127b9ae985d2e3298a64e911590
2025-01-14 07:09:27 -08:00
Nicola CortiandFacebook GitHub Bot 85f9939031 Fix crash for Hermes Release due to HermesExecutor migration (#48660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48660

RN-Tester is currently instacrashing on release due to a migration to Kotlin for HermesExecutor
This fixes it.

Changelog:
[Internal] [Changed] - Fix crash for Hermes Release due to HermesExecutor migration

Reviewed By: javache

Differential Revision: D68151666

fbshipit-source-id: 31f404ec518831cf2151dc670cdf8553427ae8ab
2025-01-14 06:12:00 -08:00
Iwo PlazaandFacebook GitHub Bot e4d969a4ab Migrate StyleSheet/*.js to use export statements (#48609)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48609

# Motivation
This is an attempt at modernizing the export syntax in some of the files in `Libraries/StyleSheet/`. It will allow these files to get properly ingested by modern Flow tooling.

# This diff
- Migrates the use of `module.exports` into `export default` for files located in `Libraries/StyleSheet/*.js`. Some files were omitted due to ballooning complexity, but will be addressed in other Diffs.
- Updating internal *require*s to use ".default", no product code seems to be affected.
- Migrating `require`s into `import`s where applicable, taking into account the performance implications (context: https://fb.workplace.com/groups/react.technologies.discussions/permalink/3638114866420225/)
- Updates the current iteration of API snapshots (intended).
- Updates `react-native-codegen`'s require of processColorArray, analogous to D42346452.

Changelog:
[General][Breaking] - Deep imports from some files in `StyleSheet/` can break when using the `require()` syntax, but can be easily fixed by appending `.default`

Reviewed By: javache

Differential Revision: D68017325

fbshipit-source-id: 3c5b94742f101db0b2914c91efab6003dba2b61a
2025-01-14 05:34:18 -08:00
Fabrizio CucciandFacebook GitHub Bot d95909ea15 Migrate rn-tester/js/components/RNTesterTitle.js to function components (#48649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48649

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68099051

fbshipit-source-id: 867010b692e6d71e4683cc12b4455be730413268
2025-01-14 03:20:05 -08:00
Fabrizio CucciandFacebook GitHub Bot 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łeckiandFacebook GitHub Bot 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łeckiandFacebook GitHub Bot 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 VaccaandFacebook GitHub Bot 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 CucciandFacebook GitHub Bot 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 BaetsandFacebook GitHub Bot 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 CucciandFacebook GitHub Bot 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 CucciandFacebook GitHub Bot 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