Commit Graph

38536 Commits

Author SHA1 Message Date
Tim Yung 4c1477073f RN: Prefer Destructured Import for useMemo (#51407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51407

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894324

fbshipit-source-id: 7179f27f8ff1fb1b67745650b38d87cb2ea982b2
2025-05-16 16:33:18 -07:00
Tim Yung 7d3c4c81b5 RN: Prefer Destructured Import for useCallback (#51406)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51406

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894207

fbshipit-source-id: 00286b3dbaa6ce1e4d8d0f0f6c0dfef6505824c5
2025-05-16 16:33:18 -07:00
Tim Yung 3e70714cff RN: Prefer Destructured Import for useEffect (#51405)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51405

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894042

fbshipit-source-id: 93fbadb32e4a1225836db9d729d7bf502ebddd84
2025-05-16 16:33:18 -07:00
Tim Yung 1bf167ce97 RN: Prefer Destructured Import for useRef (#51404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51404

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74893440

fbshipit-source-id: 9032f1e867a34b9cfa808f920a38f2630046eed7
2025-05-16 16:33:18 -07:00
Tim Yung 00108a1ac3 RN: Prefer Destructured Import for useState (#51403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74891875

fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
2025-05-16 16:33:18 -07:00
Tim Yung 7af10f7a1a RN: Prefer Destructured Import for memo (#51401)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51401

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74889277

fbshipit-source-id: 0d42921758c5d6e108a4c82dbd52b7de89fbef00
2025-05-16 16:33:18 -07:00
Tim Yung d7d10a4f0d RN: Prefer Destructured Import for createContext (#51400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51400

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74888314

fbshipit-source-id: 9224c7c371471fe1fc42c8d42d4b37a4edadcacf
2025-05-16 16:33:18 -07:00
Tim Yung 255c197baf RN: Prefer Destructured Import for createRef (#51399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51399

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: rubennorte

Differential Revision: D74888097

fbshipit-source-id: a22ca4b791153ff0c2f4ab34ff8e3ce5e9280e0d
2025-05-16 16:33:18 -07:00
Ruslan Lesiutin a7810f6995 Use std::optional instead of stub constexpr value for unset event start (#51252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51252

# Changelog: [Internal]

Removes usage of `DOM_HIGH_RES_TIME_STAMP_UNSET` stub contstexpr.

Instead, all events that were using it will now declare timestamps as optional. This is the pre-requisite before migrating these raw `double` values to `HighResTimeStamp`.

Reviewed By: javache

Differential Revision: D74248998

fbshipit-source-id: 9ef223420823d036db815f956e91ff3a712c9833
2025-05-16 12:20:42 -07:00
Ruslan Lesiutin 535150bc96 Replace RuntimeSchedulerClock with HighResTimeStamp, HighResDuration (#51251)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51251

# Changelog: [Internal]

Replaces `RuntimeSchedulerClock`, which was an alias for `std::chrono::steady_clock` with previously defined single timestamp abstraction.

Reviewed By: rubennorte

Differential Revision: D74246459

fbshipit-source-id: 2f5e31eb2299856e7eb69f3915fec6597963a3b8
2025-05-16 12:20:42 -07:00
Ruslan Lesiutin 5d9cc9e407 Define Bridging protocol for HighResTimeStamp and HighResTimeDuration (#51253)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51253

# Changelog: [Internal]

Defines bridging template for `HighResTimeStamp` and `HighResTimeDuration`.

When these values are passed to JavaScript over bridge, they will be converted to [`DOMHighResTimeStamp`](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp).

Also the other way around, when we list `HighResTimeStamp` or `HighResTimeDuration` as a type of TurboModule spec, it will expect number value from JavaScript.

Reviewed By: rubennorte

Differential Revision: D74506516

fbshipit-source-id: b5893cef4525793eb6fb6326055c261c7b84a724
2025-05-16 12:20:42 -07:00
Ruslan Lesiutin a882f19974 Define HighResTimeStamp, HighResDuration (#51254)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51254

# Changelog: [Internal]

Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:
- `HighResTimeStamp`: A class representing a specific point in time with high precision.
- `HighResDuration`: A class representing a duration of time with high precision.

Right now, all these just encapsulate `std::chrono::steady_clock` with no extra custom logic. We might revisit this in a future, once we decide to add support for [`Performance.timeOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).

This diff also adds a `README.md` documentation file with a brief summary of the `react/timing` module.

Reviewed By: rubennorte

Differential Revision: D72796412

fbshipit-source-id: 7a92b61202f5e527e020edea2b756b0063971242
2025-05-16 12:20:42 -07:00
Andrew Datsenko 3e1b9a9182 Fix order of ancestor titles (#51397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51397

Changelog: [Internal]

Fix order of ancestor titles.

Due to reverse being applied to the title order it flipped order on even contexts.

Reviewed By: rubennorte

Differential Revision: D74886550

fbshipit-source-id: c556af977f1abee633527151a5896c7d69bd0b48
2025-05-16 10:05:01 -07:00
Christian Falch 378f163a25 adding accessor for backing map (#51386)
Summary:
Expo is using the backingmap to be able to update properties in a fast and performant way in two overridden view manager subclasses (ViewGroupManager subclass is one of them).

This diff exposes the backing field via JvmName using the `internal_` prefix.

So Expo can keep on accessing the field as they were doing before. In the long run we should prevent them from accessing this property altogether but this would require a different API.

## Changelog:

[INTERNAL] -

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

Test Plan: Build with Expo modules

Reviewed By: cipolleschi

Differential Revision: D74884533

Pulled By: cortinico

fbshipit-source-id: e76673c794a6a125059633d29445d991d867b770
2025-05-16 09:54:48 -07:00
Dawid Małecki cfd4932bb0 Fix generated types base on __typetests__ (#51383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51383

This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under `Animated` namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
extending Fn Args generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode`,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowList` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to `globals.d.ts` to not include "dom" lib in the tsconfig - tries to compare globals with `lib.dom.d.ts` and produces many errors,
- exporting `SectionListData`,

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74807552

fbshipit-source-id: c5254ea0f701f3602b9d716faeb50ca1ab21b013
2025-05-16 09:50:51 -07:00
Pieter De Baets 6d25274a52 Add unit test for NSNull behaviour in RCTTurboModule (#51370)
Summary:
Changelog: [Internal]

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

Reviewed By: NickGerleman

Differential Revision: D74815079

fbshipit-source-id: 87e72dfbe4841655bc1420e0e1d4377455bd5c1c
2025-05-16 08:47:55 -07:00
Pieter De Baets 05dee839d8 Use methodSignatureForSelector instead of instanceMethodSignatureForSelector (#51366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51366

We inherited this from the legacy native module infra, where we didn't have access to the module instance. Instead we can use the simpler `methodSignatureForSelector` which works correctly with OCMock (needed in D74815079).

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74817191

fbshipit-source-id: 6f3f741e9a78dea967a7654e6410ddacfad6d8a3
2025-05-16 08:47:55 -07:00
Nicola Corti 83ed4620d6 Add react-native/build to .gitignore
Summary:
This folder should have been added to the .gitignore.
Gradle is placing some build file over there in the latest version. This prevents it.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D74884379

fbshipit-source-id: 7da9682589c2bc161c1b0e3d741d1049b94505e4
2025-05-16 08:27:45 -07:00
Samuel Susla ba6323b12e Back out "refactor native animated to pass folly::dynamic to fabric" (#51392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51392

Original commit changeset: a3f1373bb0c6

Original Phabricator Diff: D74738548

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D74881580

fbshipit-source-id: 5809fa8336e555accbbff05faec33ea23ef312e3
2025-05-16 08:15:30 -07:00
Dawid Małecki 2e0c2c6df1 Remove dtslint from type tests (#51382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51382

This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests.

It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74804967

fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
2025-05-16 08:08:25 -07:00
Christian Falch 2a0c1e6a9e make DevServerHelper open (#51323)
Summary:
Expo inherits from the DevServerHelper class, and needs it to be declared as open, the same goes for its public interface.

Expo is using this in `DevLauncherDevServerHelper` and overrides the methods:

- getDevServerBundleURL
- getDevServerSplitBundleURL
- getSourceUrl
- getSourceMapUrl
- isPackagerRunning

This PR fixes this by adding the open to the class and to the methods that should be open

## Changelog:

[ANDROID] [FIXED] - Made DevServerHelper and its method open so that they can be overridden.

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

Test Plan: Verify that we can build against Expo.

Reviewed By: cipolleschi

Differential Revision: D74876479

Pulled By: cortinico

fbshipit-source-id: 0037d6f7cee190a690ec3ec59896df04f46797b2
2025-05-16 07:52:01 -07:00
Jakub Piasecki e4ef685dd7 Restore legacy semantics of modulesConformingToProtocol (#51381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51381

Changelog: [General][Fixed] Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string

D70822061 introduced a new way of defininf modules and components in codegen, but accidentally introduced two breaking changes to the legacy syntax:
- before that diff, in case of 1:1 mapping, the value of the fileds could be a string, while after, it required it to be an array
- before that diff, not all of the fields on `modulesConformingToProtocol` had to be defined in `package.json`, while after, it required all fields to be defined even if unused

Reviewed By: cipolleschi

Differential Revision: D74875251

fbshipit-source-id: 610103b508f1462b4de01725f9b0a87341571197
2025-05-16 05:59:05 -07:00
Samuel Susla 82279bd981 refactor native animated to pass folly::dynamic to fabric (#51335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51335

## Changelog:
[iOS][Breaking] - synchronouslyUpdateViewOnUIThread now accepts folly::dynamic instead of NSDictionary. Use https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h#L14 for conversion.

pass folly::dynamic directly from native animated since Fabric consumes folly::dynamic for direct manipulation.
Additionally, remove return value from `synchronouslyUpdateViewOnUIThread` as it was never used.

Reviewed By: lenaic, zeyap

Differential Revision: D74738548

fbshipit-source-id: a3f1373bb0c643e8dcfb3e065edbcad42aa5d4d7
2025-05-16 04:27:59 -07:00
Sam Zhou 249a24ac75 Deploy 0.271.0 to xplat (#51376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51376

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D74836348

fbshipit-source-id: 33c354c4e2e59baf4815bc6c58fc3ca0066763df
2025-05-15 15:10:02 -07:00
Sam Zhou aecd6f1079 Make use of ref-as-prop support in ProgressBarAndroid (#51362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51362

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814465

fbshipit-source-id: 7264e137040381621dddc2641fb31114273cfb28
2025-05-15 14:56:13 -07:00
Sam Zhou 6129d3c48e Make use of ref-as-prop support in TouchableBounce (#51369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51369

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74815336

fbshipit-source-id: b45f563ee73bd53794319b0d9886d3214caf0544
2025-05-15 14:25:37 -07:00
Sam Zhou 0312e9968c Make use of ref-as-prop support in Pressable (#51374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51374

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808387

fbshipit-source-id: e724130f88018b2cbe581dfd7a700cfbb0700bb9
2025-05-15 14:07:32 -07:00
Sam Zhou ba86a8f863 Make use of ref-as-prop support in ScrollView (#51365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51365

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814123

fbshipit-source-id: 5f9410df1710f6a9c59fea7ce1f225b04b67d664
2025-05-15 13:59:31 -07:00
Sam Zhou 22a55dc9b9 Make use of ref-as-prop support in TouchableHighlight (#51364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51364

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814121

fbshipit-source-id: b9b9f09577da1ba59a4b858b538140ab34bdc60d
2025-05-15 13:49:17 -07:00
Sam Zhou 80482d6be3 Make use of ref-as-prop support in TextInput (#51367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51367

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810113

fbshipit-source-id: cb841ab71ef582f10f478f2094837cf52d9cdf68
2025-05-15 13:48:05 -07:00
Joe Vilches 0c6a60e2fe Fix crash when link endOffset > line offset (#51372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51372

I got notified that a recent change I made was causing a crash. This would happen when the endOffset of the link is larger than the end offset of the line. This can be repro'd with

```
/**
 * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
 *
 * flow strict-local
 * format
 */

import {useState} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';

export default function Playground() {
  const [state, setState] = useState(false);
  function toggle() {
    setState(old => !old);
  }

  return (
    <View style={styles.container}>
      <Text
        style={[styles.paragraph, state && {backgroundColor: 'red'}]}
        numberOfLines={3}>
        <Text>Bacon Ipsum{'\n'}</Text>
        <Text>Dolor sit amet{'\n'}</Text>
        <Text>{'\n'}</Text>
        <Text accessibilityRole="link" onPress={toggle}>
          http://www.google.com
        </Text>
      </Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    paddingTop: 24,
    backgroundColor: '#ecf0f1',
    padding: 8,
  },
  paragraph: {
    margin: 24,
    fontSize: 18,
    fontWeight: 'bold',
    textAlign: 'center',
  },
});
```

This was encountered already by NickGerleman in D46206673 (https://github.com/facebook/react-native/pull/37050) and the fix is fairly straightforward. I modified that fix to check for the endOffset as well.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D74823458

fbshipit-source-id: 08fe81893f1c41d1934215515f88a6e0e546e705
2025-05-15 13:39:19 -07:00
Sam Zhou dcf45f73b9 Make use of ref-as-prop support in TouchableOpacity (#51363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51363

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814122

fbshipit-source-id: 88a184f84b811ad527e004edf0eb2344db8fe266
2025-05-15 13:34:53 -07:00
Sam Zhou 8146c07365 Make use of ref-as-prop support in Image (#51368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51368

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74813682

fbshipit-source-id: c6bb9e286049c8ed16375c3bbb674b26a34459ca
2025-05-15 13:33:33 -07:00
Sam Zhou 6b0aedc72e Make use of ref-as-prop support in Animated (#51371)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51371

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74815987

fbshipit-source-id: 1f19757d0219f1d62deb263edfa2a0cc562dd9d2
2025-05-15 13:29:55 -07:00
Samuel Susla 685a60e6b4 merge RCTCxxUtils into utils module (#51348)
Summary:
## changelog
[iOS][Deprecated] - RCTFollyConvert.h is deprecated please use /ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h instead

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

move RCTFollyConverter to utils module so it is more accessible and delete RCTCxxUtils (which only held that one file). Also align on naming and drop RCT prefix.

Reviewed By: cipolleschi

Differential Revision: D74804476

fbshipit-source-id: 9a702b4823a986ed9849707cbb62d024e589bc1d
2025-05-15 12:31:34 -07:00
Sam Zhou 824e2deae0 Remove unused forwardRef import in SectionListModern (#51373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51373

Followup of https://github.com/facebook/react-native/pull/51360

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D74825642

fbshipit-source-id: 1ba8f4f1934279a0be484b7809cadeacee03d59d
2025-05-15 11:45:46 -07:00
Christian Falch 9d11dcd3b0 make removeView open in ViewGroupManager (#51322)
Summary:
After conversion to Kotlin we could no longer override the removeView function since it is no longer open. The rest of this class can be overridden as before, but since functions are final by default this doesn't work for the new `removeView` function.

Expo is overriding the `removeView` functions in `GroupViewManagerWrapper.kt` (a lot of other ViewManager methods are also overridden here, but the `removeView` is introduced in `ViewGroupManager` and needs to be open as well. `GroupViewManagerWrapper.kt` is a replacement view manager that adds support for a delegate that will receive callbacks whenever one of the methods in the view manager are called.

This commit fixes this by making the removeView function explicitly open.

## Changelog:

[ANDROID] [FIXED] - Made function `removeView` open in Kotlin class

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

Test Plan: Verify that Expo can build against this class.

Reviewed By: javache

Differential Revision: D74807744

Pulled By: cortinico

fbshipit-source-id: 55f4b9deccb7d82ceb78be1d56c2b99a6f7e3ce9
2025-05-15 10:36:14 -07:00
Sam Zhou 2fa2c2071c Make use of ref-as-prop support in Text (#51361)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51361

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810512

fbshipit-source-id: 0f902da8b487db353609b8de14f46a4cec23a46b
2025-05-15 10:01:54 -07:00
Sam Zhou 797705c00d Make use of ref-as-prop support in examples (#51358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51358

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74812747

fbshipit-source-id: 7ded547ff62ca59d28abfc46a2f57466e2486acd
2025-05-15 09:55:32 -07:00
Joe Vilches d07b2a9d99 Remove useEditTextStockAndroidBehavior and resolve old android blur issue (#51338)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51338

There was some problems removing this feature flag earlier in that, on older android versions, we would try to focus the top most text input whenever any other text input would try to blur. This was ultimately and issue with how Android implements `clearFocus`. To fix this, lets block the focusability of all views while we clear the focus, then re-enable.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74760594

fbshipit-source-id: 2811c08ad6ed0855da0a4d7fca89fb08f84905c2
2025-05-15 09:50:32 -07:00
Joe Vilches f6378c3390 Back out "Clean up useEditTextStockAndroidFocusBehavior feature flag"
Summary:
Original commit changeset: 4682cf709aa2

Original Phabricator Diff: D73954790

I want to pick this into 0.80 so users can enable the feature flag so this doesn't break older versions

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74754010

fbshipit-source-id: 75dc96516b00035984741b43814d6fc7df6be0ac
2025-05-15 09:50:32 -07:00
Joe Vilches 7a04f985fd Back out "Fix issue where text inputs cannot blur on <= Android 8.1" (#51336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51336

Original commit changeset: 12dcaf0c9c35

Original Phabricator Diff: D74678847

I plan on reverting this so that we can in turn revert the diff that this diff fixed so we can pick it into RN 0.80 so that users have some fix on all versions. Right now 0.80 will be broken for older android devices

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74754164

fbshipit-source-id: fda17da3e9b61ca13f68f6681726ffb3f4f4f6c0
2025-05-15 09:50:32 -07:00
Nicola Corti 036e47ef9f Add a gradle task to download native 3p dependencies. (#51357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51357

This adds a `prepareNative3pDependencies` Gradle task that downloads and prepares all the 3p dependecies.
This will be needed before we download native deps for Fantom.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D74812436

fbshipit-source-id: 85796d0bcffaeef05d3a21d50f39954ef39ae92c
2025-05-15 09:31:42 -07:00
Sam Zhou e7e4cdd12e Make use of ref-as-prop support in SectionListModern (#51360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51360

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74812991

fbshipit-source-id: 9df7247bcdaed7a880ed0a75a5dcc33fce6f1d86
2025-05-15 09:17:45 -07:00
Rubén Norte 6e9a816940 Migrate test to use React.createRef insted of ref functions (#51345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51345

Changelog: [internal]

I just realized there were some tests where we didn't migrate to the new recommended pattern.

Reviewed By: rshest

Differential Revision: D74803018

fbshipit-source-id: b74468f1be35fba8d20d3b96ea2b55452a8175ee
2025-05-15 08:46:32 -07:00
Rubén Norte c7611e0d79 Add definition of setNativeProps in NativeDOM and use it if available (#51343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51343

Changelog: [internal]

This implements `setNativeProps` as a method in the `NativeDOM` C++ TurboModule, so we can replace usages of the method from `FabricUIManager`.

Reviewed By: javache

Differential Revision: D74800815

fbshipit-source-id: cf3c2d4b75c8d30e2528f96d4d63318e1366096a
2025-05-15 08:46:32 -07:00
Rubén Norte 89e21b866a Add missing setNativeProps tests (#51342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51342

Changelog: [internal]

Adding a test for `setNativeProps`, as it was missing because we couldn't test this when this test suite was implemented.

Reviewed By: fabriziocucci

Differential Revision: D74800816

fbshipit-source-id: 5f4721e61d1fb41a1898f56be35e6e3b12c9537e
2025-05-15 08:46:32 -07:00
Rubén Norte f49083db69 Replace usage of FabricUIManager methods with NativeDOM methods where available (#51341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51341

Changelog: [internal]

`measure`, `measureInWindow` and `measureLayout` have been defined in the `NativeDOM` C++ TurboModule for a while, but we didn't migrate the callsites in the DOM APIs to use them. This does that migration so we can remove a few `$FlowFixMe`s and use a cleaner API.

Reviewed By: javache

Differential Revision: D74800814

fbshipit-source-id: 117e4a8798036f2266e25cfc0931e91c148eaf52
2025-05-15 08:46:32 -07:00
Sam Zhou f4c9df5b38 Make use of ref-as-prop support in ActivityIndicator (#51356)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51356

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808564

fbshipit-source-id: 68f55d31c07ceaf7282833bd4b04039e35987935
2025-05-15 08:30:33 -07:00
Sam Zhou a6a073765a Make use of ref-as-prop support in ScrollViewStickyHeader (#51355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51355

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810588

fbshipit-source-id: e979e8fb59d46be6dabc4327b47b20d635864aa9
2025-05-15 08:28:48 -07:00