Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36912
Those files were in use to `buck fetch` dependencies for local consumption by the Buck OSS build.
They're not in use anymore and can be removed for now
Changelog:
[Internal] [Changed] - Remove Buck OSS third-party files
Reviewed By: cipolleschi
Differential Revision: D44992505
fbshipit-source-id: 0462a23c95107e67b1dd8d969648826cdb77554f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36898
This changes are a followup from D42281798 and the task T141309497.
In the previous diff, we were able to handle most cases thanks to `NSURLComponents`. `NSURLComponents` provides us with more flexibility so that we could handle the missing cases.
## Changelog:
[iOS][Fixed] - Handle doulbe `#` and partially escaped urls
Reviewed By: sammy-SC
Differential Revision: D44958172
fbshipit-source-id: 03628d86966c149d0785ad90fdbccbcb5e70106e
Summary:
Recent windows integration brought in a change where a unreferenced formal parameter was introduced in TurboModule.h. Windows treats with warning as an error, this change comments out the formal parameter name to get rid of the error/warning.
## Changelog:
[GENERAL] [FIXED] - Comment out unreferenced formal parameter
Pull Request resolved: https://github.com/facebook/react-native/pull/36853
Test Plan: Passed Windows testcases
Reviewed By: javache
Differential Revision: D45007332
Pulled By: philIip
fbshipit-source-id: 2e8128549d628a8be6bcd76c1fa473d0bc27649b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36908
We can now use Java 8, this diff i'm replacing old callbacks by lambdas
changelog: [internal] internal
Reviewed By: fkgozali
Differential Revision: D44977955
fbshipit-source-id: 0ab0d1c49a013e930041936bb08bbdb86dd30236
Summary:
New website of React is online, so some links about react should be also updated in README.md.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Fixed] - Fix some links about react in readme
Pull Request resolved: https://github.com/facebook/react-native/pull/36638
Test Plan: The PR just changes some links in readme, don't need to test.
Reviewed By: jacdebug
Differential Revision: D44959199
Pulled By: blakef
fbshipit-source-id: 14a66a2d2b086fbe16f715c621c59a6d8d6ee698
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36882
This property was never used as TextAttributes has its own foreground color attribute.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D44884978
fbshipit-source-id: daac06c9dfcbceedc084b6adc2cb114758533036
Summary:
[Codegen 103] This PR extracts the logic to compute the `extendsProps` and `props` properties in TypeScript Codegen in a `getProps()` function as requested on https://github.com/facebook/react-native/issues/34872
## Changelog:
[Internal] [Added] - Extract logic to compute codegen TS `extendsProps` and `props` properties in a single `getProps` function
Pull Request resolved: https://github.com/facebook/react-native/pull/36889
Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green
Reviewed By: rshest
Differential Revision: D44952664
Pulled By: cipolleschi
fbshipit-source-id: fd51f0b8767efbb0071b6391e0852c19b5a984c6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36902
Reverts https://github.com/facebook/react-native/pull/36584.
Since we've come across example packages (typically targeting Node.js) which only distribute ESM, we believe it's more helpful to return to asserting the `"import"` condition by default, for maximum compatibility. The above issue and comments outline the pros/cons.
Changelog:
[General][Changed] - Default condition set for experimental Package Exports is now ['require', 'import', 'react-native']
Metro changelog: [Experimental] Package Exports unstable_conditionNames now defaults to ['require', 'import']
Reviewed By: robhogan
Differential Revision: D44962143
fbshipit-source-id: 004172388916c902469b49cfc920ebe13c62c430
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36899
We don't need this logic anymore as `IS_OSS_BUILD` is always false.
Changelog:
[Internal] [Changed] - Cleanup the `IS_OSS_BUILD` logic from Buck files
Reviewed By: cipolleschi
Differential Revision: D44958368
fbshipit-source-id: 1b56758879fcd7193417c5b04a819a9d72a7f1f7
Summary:
This adds supports for text instances in React Native using a DOM-like interface (as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607).
This reuses the `getTextContent` method from Fabric that we added in D44464637, which is supported for this use case as well.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: rshest
Differential Revision: D44632362
fbshipit-source-id: edea99ce61fb17d33853c72196ece7bb06a01e41
Summary:
This adds a new method in Fabric to get the offset for an element, and uses it to implement the following methods as defined in as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607 :
* `offsetParent`: returns the ancestor that's used to position the element relative to. In React Native, this is always the immediate parent, except if the element has `display: none`, in which case is `null`.
* `offsetTop`, `offsetLeft`: returns the position of the outer border of the element, relative to the inner border of its offset parent. This is similar to our existing `measure` function, except that `measure` uses the outer border of the parent, instead of the inner one.
As with `offsetWidth` and `offsetHeight`, these methods return integers instead of double precision values.
Extra: added descriptions to some fields in `LayoutMetrics` :)
Changelog: [internal]
bypass-github-export-checks
Reviewed By: rshest
Differential Revision: D44512594
fbshipit-source-id: 8f05e21f73397db7b88e6841cc117320d1229979
Summary:
These can just be derived from `getBoundingClientRect`. The only difference is that they're always integers (so we do we rounding manually in JS).
They're implemented as defined in as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: sammy-SC
Differential Revision: D44512595
fbshipit-source-id: 0d994135efbb77740a06ea37eb1e6aeddde1af6e
Summary:
This implements the `textContent` property in `ReadOnlyElement` as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607.
This requires a new method in Fabric because we can't derive that from the existing methods.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: rshest
Differential Revision: D44464637
fbshipit-source-id: de7e4539b4ef70f3586f802fd07888d22678c239
Summary:
This implements the `compareDocumentPosition` and `contains` methods (contains is implemented in JS) as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607.
This requires a new method in Fabric because we can't derive that from the existing methods.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: rshest
Differential Revision: D44370433
fbshipit-source-id: a7c12a35955e9ccbf8eb19f394125bf05cb995ce
Summary:
This implements the `isConnected` method as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607.
This requires a new method in Fabric because we can't derive that from the existing methods.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: sammy-SC
Differential Revision: D44346661
fbshipit-source-id: 1eefa589f2937d1dac2461350ddc8df006f0e873
Summary:
We already have `getBoundingClientRect` implemented in Fabric, so we can expose this as a proper method in `ReactNativeElement` (behind a feature flag).
Changelog: [internal]
bypass-github-export-checks
Reviewed By: javache
Differential Revision: D44065187
fbshipit-source-id: bd87e72f78d135079f5440b0b0bd4c572b05ba2a
Summary:
Now that we have `getParentNode` and `getChildNodes` in Fabric, we can implement a large part of the traversal methods in this proposal: https://github.com/react-native-community/discussions-and-proposals/pull/607
This implements all traversal methods in `ReadOnlyNode` and `ReadOnlyElement` except for:
1. Proper implementation of `getRootNode()` returning a true document-level node.
2. `compareDocumentPosition` method (which we'll use to implement `contains`).
3. `isConnected`, which requires a new method in Fabric.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: javache
Differential Revision: D44333175
fbshipit-source-id: 06e138277a43d34fd7a10070413bdd238e92b8dd
Summary:
Implements these 2 base methods to allow basic traversal of the host tree from JS to implement part of the proposal in https://github.com/react-native-community/discussions-and-proposals/pull/607.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: sammy-SC
Differential Revision: D44022477
fbshipit-source-id: 34fbab0fbce4d57a93b8ed1dcd0ef89e9f542237
Summary:
This implements all compatibility methods from `ReactFabricHostComponent` into `ReactNativeElement` and uses the feature flag `enableAccessToHostTreeInFabric` to choose between them at runtime.
This flag is disabled everywhere so this won't have an effect for now.
Both these classes implement the NativeMethods interface, so they're interchangeable as refs in existing product code.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: yungsters
Differential Revision: D44304435
fbshipit-source-id: 43b5525b943e385287d7b00107147884b859c1fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36895
Currently RN-Tester build with the New Architecture hardcoded to true.
For testing is convenient to disable it at times so we can test how the app behaves in the old arch.
Changelog:
[Internal] [Changed] - Allow to disable the New Architecture inside RN Tester
Reviewed By: cipolleschi
Differential Revision: D44917566
fbshipit-source-id: f1e6393e37bf6702677157b9577a26f0c4da0b86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36885
Create cache to hold Spannables during measurment and rendering of Text
We used to have a similar cache in the past, it was removed because it seemed not have an implact.
We are incorporating this again to measure while rendering 1000s of text components
changelog: [internal] internal
Reviewed By: cipolleschi
Differential Revision: D44918981
fbshipit-source-id: 581d22978841e1b62a1709da0fec2baba6c59cea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36808
Changelog: [General][Added] [1/n] Support lazy bundling in development
Implements part of the [lazy bundling RFC](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md#__loadbundleasync-in-react-native):
> In development builds, React Native will provide an implementation of `__loadBundleAsync` that fetches a bundle URL from the currently connected Metro server, integrates with Fast Refresh and LogBox, and provides feedback to the developer on the progress of loading a bundle.
NOTE: This implementation of `__loadBundleAsync` is currently unused in OSS, pending a handful of changes to Metro and React Native that have not landed yet. The plan is to land everything in time for React Native 0.73.
Reviewed By: robhogan
Differential Revision: D43600052
fbshipit-source-id: 9342d5894eaf4b90b30598148bd55b0c956a8b08
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36877
This diffs allows having Meta-specific tests and modules that are only used when running tests in Meta's infra. Meta-specific modules aren't synced to Github, so the OSS versions will be used when running tests on Github.
This is needed because we recently some files from React to React Native, including a test that now uses the `ReactFabric` module to test the behavior of public instances in React Native. This module is always using the OSS version of the renderer, but at Meta we have a custom version that's being ignored in tests.
Changelog: [internal]
Reviewed By: cortinico
Differential Revision: D44874631
fbshipit-source-id: e3112041f134240601495a28ba643bce45d802fb
Summary:
Currently `YGNodeMarkDirty()` assert message displayed **without** space between 2 lines:
```
"Only leaf nodes with custom measure functionsshould manually mark themselves as dirty"
^^^^^^^^^^^^^^^
```
This minor PR fixes it :)
X-link: https://github.com/facebook/yoga/pull/1243
Reviewed By: jacdebug
Differential Revision: D44870410
Pulled By: javache
fbshipit-source-id: 58db50106e8e2980ec84c99976f569b94b739d9b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36867
This will make it consistent with rn_codegen() kwargs, and because android_package_name is not just limited to native_module's
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D44857744
fbshipit-source-id: 37a8a69b443ffc8bfbaa145b0f21270a0f3515d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36616
Changelog: [iOS][Internal] - Add basic emitting of click event
This diff adds the basic implementation of click event emitting, particularlly focused on ensuring clicks are only fired if the pointer interaction ends within the same tree "branch" of elements as which it started.
Reviewed By: yungsters
Differential Revision: D44148427
fbshipit-source-id: 9e91c32fe0e1ca8a5c50e72cd819625294e070f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36805
**Changelog:** Export macOS specific dependencies for react-native-codgen
[Internal][Changed] - RN macOS uses an older version of React Native (0.68) so we need to specify macOS specific dependencies when running codegen for RN Desktop
Reviewed By: christophpurrer
Differential Revision: D44687704
fbshipit-source-id: 9dcabc88d4abf17845db0844c952f1cb4a13e3ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36840
Changelog: [Internal] - W3CPointerEvents: use description to indicate HW requirements for tests
As title. This lets users/testers know whether additional hardware is required to run each test and can give info on the test status (e.g. whether it's expected to fail). Tests with no description should be assumed to work without any special requirements.
Reviewed By: vincentriemer
Differential Revision: D44687709
fbshipit-source-id: 6a23344c4cce6917f3cf5cd3ada0c75b813b5abe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36795
This change bump the min iOS version for React Native to 13.4, to align with company guidelines.
## Changelog:
[iOS][Changed] - Moved the min iOS version to 13.4
Reviewed By: cortinico
Differential Revision: D44634663
fbshipit-source-id: 035e8fcbb395f7394f8253e3ec485ad9937531c2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36819
X-link: https://github.com/facebook/metro/pull/964
This diff creates a new hook to the Metro symbolicator. `customizeStack` aims to provide a whole stack modification hook on the output of the `/symbolicate` endpoint.
The purpose of this hook is to be able to apply callsite-based modifications to the stack trace. One such example is user-facing frame skipping APIs like FBLogger internally.
Consider the following API:
```
FBLogger('my_project')
.blameToPreviousFile()
.mustfix(
'This error should refer to the callsite of this method',
);
```
In this particular case, we'd want to skip all frames from the top that come from the same source file. To do that, we need knowledge of the entire symbolicated stack, neither a hook before symbolication nor an implementation in `symbolicator.customizeFrame` are sufficient to be able to apply this logic.
This diff creates the new hook, which allows for mutations of the entire symbolicated stack via a `symbolicator.customizeStack` hook. The default implementation of this simply returns the same stack, but it can be wrapped similar to `symbolicator.customizeFrame`.
To actually have information for this hook to act on, I've created the possibility to send additional data to the metro `/symbolicate` endpoint via an `extraData` object. This mirrors the `extraData` from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L33, and I've wired up LogBox to send that object along with the symbolicate call.
Changelog:
[General][Added] - Added customizeStack hook to Metro's `/symbolicate` endpoint to allow custom frame skipping logic on a stack level.
Reviewed By: motiz88
Differential Revision: D44257733
fbshipit-source-id: 05cd57f5917a1e97b0520e772692ce64029fbf8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36652
I can't find any usecases for them, and JavaScript stack symbolication during development should probably just exclusively be done from the JS environment.
Changelog:
[Android][Removed] - Deleted obsolete native methods DevServerHelper.symbolicateStackTrace and DevServerHelper.openStackFrameCall
Reviewed By: motiz88
Differential Revision: D44257731
fbshipit-source-id: d090ecf413526c31d5fb028507d22fc7992e74b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36841
## Changelog:
[Internal] -
A follow-up to D44712550, which did not take into account that there may be incompatibility between app's binary and JS code.
Note that this is for VR apps only, as other platforms don't (yet) use the module in question (WebPerformance).
Reviewed By: javache
Differential Revision: D44751928
fbshipit-source-id: 6a029f5725dd45abded7dda3325debe864f29ca0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36820
## Changelog:
[Internal] -
A follow-up to the D44584166 (which was abandoned, but this change makes sense nevertheless).
This allows to selectively enable logging of certain event types regardless of whether they are observed or not. For now it's marks and measures, but potentially it may be also e.g. navigation/resource entries.
Also expands unit tests for the JS side of the `Performance` API correspondingly.
Note that "always logged" and "observed" have different semantics. An "always logged" entry won't be sent back from native to JS, unless either:
* explicitly requested via `Performance.getEntries*`
* actually observed via `PerformanceObserver`
Reviewed By: rubennorte
Differential Revision: D44712550
fbshipit-source-id: 7fc891b09bd00fa9b510d1dc059cf908d5caea07
Summary:
Pointing users towards our issue tracker is not really effective as the underlying issue is a misconfiguration of their environment. I'm tweaking this error message.
## Changelog:
[INTERNAL] - Update react-native-xcode.sh to do not point users towards our issue …
Pull Request resolved: https://github.com/facebook/react-native/pull/36837
Test Plan: n/a just a string change
Reviewed By: cipolleschi
Differential Revision: D44748094
Pulled By: cortinico
fbshipit-source-id: 6d960268eb7324b86ff5e4d3d5ddf4bbe67c2349
Summary:
Changelog: [Android] [Breaking] - Renamed FabricMountItem.* files to MountItem.* to better match the name of the struct.
Pull Request resolved: https://github.com/facebook/react-native/pull/36722
Reviewed By: cortinico, cipolleschi
Differential Revision: D44540079
fbshipit-source-id: 79d8aa7c6f6b908be52009c51c4ea2f601f788fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36804
AnimatedObject is a more generic version of AnimatedTransform, able to handle animated values within arrays and objects. This is useful for props of native components that may need to be animated per field.
This diff adds the native (iOS) counterpart to AnimatedObject node in JS. The node handles array and map value types.
Changelog:
[Internal][Added] - Introduce ObjectAnimatedNode iOS-side node for handling array and object prop values
Reviewed By: philIip
Differential Revision: D44678162
fbshipit-source-id: 7cdc075229a55fcb450f23ba5667b3ddd48c24df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36615
Changelog: [Internal] - Add plumbing/boilerplate for an iOS implementation of the `click` event
This diff simply adds the boilerplate necessary to hook up a click event to the fabric iOS touch handler. This diff does not contain any actual implementation of the click's behavior as that will occur in future diffs.
Reviewed By: necolas
Differential Revision: D43129366
fbshipit-source-id: 71488b893c789d21c833533471745275062c0730
Summary:
- Add a typescript project to test `CodegenSchema.d.ts`. More tests for other .d.ts files will be added in future pull requests.
- The build script scans all snapshots from `react-native/codegen`'s typescript frontend and generates .ts files for each snapshot, but they are .gitignore-ed.
- `npm run build` will build these .ts files against `CodegenSchema.d.ts` after generating them.
- A failed jest case is included to ensure CI catch it, it will be removed before merged.
bypass-github-export-checks
## Changelog:
[General] [Added] - Add react-native/codegen-typescript-test to verify .d.ts files in react-native/codegen (1)
Pull Request resolved: https://github.com/facebook/react-native/pull/36562
Test Plan:
`npm run build` in `packages/react-native-codegen-typescript-test` and see all test files appear in `__generated__`.
## Screenshot

Reviewed By: rshest
Differential Revision: D44292277
Pulled By: cipolleschi
fbshipit-source-id: 8d79fe913f9563d64c92aae7c4f4e97a24ae9a21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36742
AnimatedObject is a more generic version of AnimatedTransform, able to handle animated values within arrays and objects. This is useful for props of native components that may need to be animated per field.
This diff adds the native (Android) counterpart to AnimatedObject node in JS. The node handles array and map value types.
Changelog:
[Internal][Added] - Introduce ObjectAnimatedNode Java-side node for handling array and object prop values
Reviewed By: mdvacca
Differential Revision: D44466563
fbshipit-source-id: bd026cbd921ec51ae17eab08417708f3272c0418