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