Summary:
Update the license url on the documentation because it throws 404 page not found
## Changelog:
[General] [Fixed] - License on the documentation throws 404 page not found
Pull Request resolved: https://github.com/facebook/react-native/pull/37909
Test Plan: Click the LICENSE and should open the license page
Reviewed By: GijsWeterings
Differential Revision: D46760941
Pulled By: hoxyq
fbshipit-source-id: f2522c51606ed5776aa6ae325143887749cc4d3a
Summary:
See: https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps
As of iOS 16.4 and above, JSContexts are no longer inspectable by default. Without this, we cannot attach Safari Web Inspector to the JSContext, AKA, we can no longer direct debug. This is a simple change to re-enable that. I decided to extend the `availability` check to macOS and tvOS as I'm certain both out of tree platform forks will want this fix as well.
## Changelog:
[IOS] [FIXED] - Re-enable direct debugging with JSC on iOS 16.4+
Pull Request resolved: https://github.com/facebook/react-native/pull/37874
Test Plan: I launched RNTester in an iOS 15, and iOS 16.4 simulator. I then verified that we can attach Safari Web inspector to both simulators' JSContexts.
Reviewed By: cortinico
Differential Revision: D46719890
Pulled By: huntie
fbshipit-source-id: 7fa5ae244577b7dbf3c9c16e65ad530cfc3e9cbd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37903
The name "component" in a function type contexts will be banned in future versions of Flow (the same other keywords like typeof are today). This diff renames the offending usages in xplat files.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D46748791
fbshipit-source-id: b8a51f63faad3b85232bd17a4bbe6ee7b0e4120f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37893
Changelog: [Internal]
i just noticed we can push more C++ code down into RCTInstance, so let's do that! will make everything easier to test as well
Reviewed By: cipolleschi, RSNara
Differential Revision: D46672345
fbshipit-source-id: fcb878698ebc9a19714ba6ff94a5760efc830958
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37895
Changelog: [Internal]
i'm adding these helpers so we can test that our objects aren't leaking memory
Reviewed By: cipolleschi
Differential Revision: D46625916
fbshipit-source-id: d811336ae3b0ac420b81832c258d5573c20a5bc7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37886
When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect
**This diff:**
- Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in `animated/animations/Animation.js`.
Changelog:
[iOS][Changed] - return animated values to JS for natively driven animations
Reviewed By: rshest
Differential Revision: D46709214
fbshipit-source-id: f16f36a05cd052d1120ba6e04ec6dd72eb4a98e5
Summary:
CircleCI was broken because we changed how the `React-Core/DevSupport` pod is installed.
## Changelog:
[Internal] - Restore the installation of React-Core/DevSupport
Reviewed By: cortinico
Differential Revision: D46734714
fbshipit-source-id: 9b8c28837f0485ed0df2f94e417f89b5f0077c7d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37888
# Changelog:
[Internal] -
There was one particular permutation of input arguments to `Performance.measure` that wasn't handled correctly on the native side, namely when there is only the start mark argument present, but not the end time/mark, e.g.:
```
Performance.measure('myMeasure', 'someStartMark');
```
In this case, [according to the standard](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure), the end time should be taken as the current one:
> The end timestamp is one of:
> ...
> -the value returned by Performance.now(), if no end mark is specified or can be determined from other values.
It was taken as 0 instead, making the total duration negative and consequently getting it filtered out by the default `durationThreshold` of 0.
I've added a corresponding missing clause in the native unit tests. This also required a slight extension to the `PerformanceObserver` API to allow for mocking the current timestamp provider.
Reviewed By: rubennorte
Differential Revision: D46728261
fbshipit-source-id: bd904d9c93707fa04c1a0ddb30802691e253c106
Summary:
[skip-ci]
I noticed that; when a _new_ RN App is created using RN CLI there is ***NO*** *README* file added to the project.
Having a simple README file explaining what type of project it is, for example how other web projects do it, such as long lived `create-react-app`, now widely used `create-next-app`, etc.
Why not for React Native App then?
This PR; Adds README file to RN Template App ⚡, which should be added to the project when a new project is created using RN CLI.
### Website PR: https://github.com/facebook/react-native-website/pull/3732🚀😇
bypass-github-export-checks
## Changelog:
[INTERNAL] [ADDED] - Add README to RN Template App ⚡
Pull Request resolved: https://github.com/facebook/react-native/pull/37521
Test Plan: - The README file should be included in the newly created RN App using RN CLI
Reviewed By: NickGerleman
Differential Revision: D46075719
Pulled By: cipolleschi
fbshipit-source-id: efcccc09d72c57a065b36de6e787594082000e15
Summary:
Adds changelog for new patch.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - add changelog entry for 0.71.11
Pull Request resolved: https://github.com/facebook/react-native/pull/37887
Test Plan: N/A
Reviewed By: dmytrorykun
Differential Revision: D46727332
Pulled By: cipolleschi
fbshipit-source-id: 169f37efa629771cd7fd1796e575f92abac26d9e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37882
After some progressive changes, we can finally remove the PRODUCTION flag from the codebase.
## Changelog:
[iOS][Removed] - Remove PRODUCTION flag from iOS build logic
Reviewed By: cortinico, dmytrorykun
Differential Revision: D46726208
fbshipit-source-id: 407268779be8de32c5a6c15ba220a60b7cb9ced7
Summary:
Currently, we ask users to reinstall the pods using the `PRODUCTION` flag when they want to either profile their app or prepare a release.
This way of working with the Release mode is not standard. One of the reason why we introduced it was to provide a different binary for Hermes and reinstalling the pods was the quickest way.
With this change, we are deferring the decision on when Hermes should be installed for apps to the moment where the app is actually build by the system.
These changes are not applied to Nightlies, when a specific tarball is passed to the cocoapods using the `HERMES_ENGINE_TARBALL_PATH` env var, and when hermes is built from source as in these scenarios we are usually not interested in building for Release.
The system is also smart enough not to redownload the tarball if the configuration does not change. It assumes that the default configuration when the pods are installed for the first time is Debug.
## Changelog:
[IOS] [CHANGED] - Download the right `hermes-engine` configuration at build time.
Pull Request resolved: https://github.com/facebook/react-native/pull/37850
Test Plan:
- CircleCI green for the Release template jobs
- Tested locally modifying the `hermes-utils` to force specific versions.
- Tested locally with RNTestProject
Reviewed By: dmytrorykun
Differential Revision: D46687390
Pulled By: cipolleschi
fbshipit-source-id: 375406e0ab351a5d1f5d5146e724f5ed0cd77949
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37877
# Changelog:
[Internal] -
A quick follow-up to https://github.com/facebook/react-native/pull/37851
There was a suggestion to add `Nullable` annotations, but the change had already landed at that point, so putting up another one.
Reviewed By: cortinico
Differential Revision: D46721095
fbshipit-source-id: 7361dec852160126c861ee2b22db240e586cc452
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37868
Thanks to the help of the community, we discovered that we can safely disable the bitcode setting in Hermes.
Community testing reported that the tarball size get reduced from ~500 Mb to ~25 Mb, a x20 reduction
## Changelog:
[iOS][Changed] - Disabled bitcode for Hermes prebuilts
Reviewed By: dmytrorykun
Differential Revision: D46704633
fbshipit-source-id: a6624110f27eb9f18e6b57ed28aa2f86804d45e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37836
When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect.
Prior diffs ensure that upon completion of natively driven animations, the final values are synced to the JS side AnimatedValue nodes. In this diff, on completion of a natively driven animation, AnimatedProps.update() is called, which in turn calls the value update callback on AnimatedProps, which [triggers a rerender (via setState)](https://www.internalfb.com/code/fbsource/[566daad5db45807260a8af1f85385ca86aebf894]/xplat/js/react-native-github/packages/react-native/Libraries/Animated/useAnimatedProps.js?lines=80) which has the effect of pushing the latest animated values to Fabric.
Alternative considered was using setNativeProps, but that approach was dropped as setNativeProps was only introduced to make migration easier and should not be used for new code, as per sammy-SC.
Changelog:
[General][Fixed] - When animating using native driver, trigger rerender on animation completion in order to update Pressability responder regions
Reviewed By: javache
Differential Revision: D46655246
fbshipit-source-id: b008c24f9d016be4b145ba799fffae5f55fab787
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37861
Changelog: [Internal] - Back out of "Add plumbing/boilerplate for an iOS implementation of the `gotpointercapture` and `lostpointercapture` events"
Original commit changeset: c9da5691d399
Original Phabricator Diff: D44977499
This diff appears to be causing issues as reported on T155721480 related to the file `RawPropsKeyMap.cpp` which, while I haven't figured out exactly why this is occurring, confirmed that this diff is causing the issue. In order to buy myself some more time as I diagnose this I'm backing the changes out in this diff.
Reviewed By: adanoff
Differential Revision: D46691035
fbshipit-source-id: 383b46732a3fad24a50e18ab948c96ce9bfe429e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37849
The typing for `FabricUIManager` makes more sense as an interface (the same way we type native modules) than as an object, as the underlying implementation used to be a host object where properties were actually not enumerable, etc. This replaces that with a definition more aligned with how we actually use it.
This also allows us to extend the mock with testing specific methods more easily (like in D45278720).
Changelog: [internal]
Reviewed By: javache
Differential Revision: D46684044
fbshipit-source-id: 379cc3f95a7cbae733ed6a3a57e68b33efd21d34
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37847
Jest supports accessing the contexts used to call mock functions (the `this` value) but we're not typing that correctly in the definitions in React Native. This changes that.
Changelog: [internal]
Reviewed By: javache
Differential Revision: D46684043
fbshipit-source-id: ff121e0726748788591e7d061a39fde238c1ddbe
Summary:
This PR converts HeaderUtilTest.java to Kotlin as requested in https://github.com/facebook/react-native/issues/37708.
## Changelog:
[INTERNAL] [CHANGED] - Convert HeaderUtilTest to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/37829
Test Plan:
Run ./gradlew :packages:react-native:ReactAndroid:test.
All tests should pass.
Reviewed By: mdvacca
Differential Revision: D46647152
Pulled By: cortinico
fbshipit-source-id: a05108c4cae28526ac55f4f273673221e3ff4cf1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37856
These strings are spoken to the user when using an ascessibility role or state not natively supported by Talkback.
We can enable these for translation by removing flags to disable localization, and adding descriptions to each string. These are derived from MDN for ARIA (used for iOS strings), along with Android and iOS documentation.
Note that this was explicitly disabled as part of D15087192 because of creating spam which was hitting the GitHub repo, but when translation was enabled for the dev menu, this ended up being a non-issue after initial translation. And we really do want these to be localized.
Changelog:
[Android][Fixed] - Localize Talkback strings
Reviewed By: cortinico
Differential Revision: D46692127
fbshipit-source-id: 6da4a181e03f46bad850e4385b94155695a142a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37839
The CocoaPods build assumes that a `cmake` command is present during `pod install`. It acts gracefully if it is not and propagates an empty string path, leading to a confusing error during the build, and requiring a `pod deintegrate` after CMake is installed because of when the binary is set.
This replaces the usage with `Pod::Executable::which!`, the built-in CocoaPods method of finding an executable from `PATH` which errors out the build if not found. This will cause a failure during `pod install`, when we are looking for the command, and specify that `cmake` is the missing executable.
This branch is only taken for source builds, so this will not show up in the cases where we do not need CocoaPods.
Changelog:
[iOS][Fixed] - Descriptive Cocoapods Error if CMake is not installed
Reviewed By: cipolleschi
Differential Revision: D46670007
fbshipit-source-id: d508743d51f9b99e1bce7d4d3cef6395d5abf46d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37858
Changelog: [Internal]
in this diff, i add a test that runs `start` validates that the lifecycle `hostDidStart:` is called as a result.
notably, i created a custom shim for `RCTInstance` to completely stub out its behavior.
Reviewed By: cipolleschi
Differential Revision: D46508066
fbshipit-source-id: e815aee64d06b160f2cbdc52720a8e698d11c680
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37851
## Changelog
[Internal] -
The `testId` value in practice can be used for other things than e2e tests - e.g. there is already a use case for Accessibility, but also we may want to log it as an extra data point with e.g. performance metrics.
This exposes a helper function to extract a `testId` from a view.
Differential Revision: D46684365
fbshipit-source-id: 17602307c468a906ef4d0679e826dbcd1eb651b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37838
We see a linker failure in the OSS build because our header exports C-style functions (not ObjC), that Objective C will assume are C ABI, but we build them as C++ functions.
Internally these are all marked as `extern "C"`, so to not deviate I did the same here to expose these always as plain C functions.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D46671506
fbshipit-source-id: 5b3005074303763d55801c4d24ac9250b96d45ba
Summary:
[Codegen 128] This PR add a `getObjectProperties` function to the Parser interface, which returns the properties of an object represented by a type annotation as requested on https://github.com/facebook/react-native/issues/34872
## Changelog:
[INTERNAL] [ADDED] - Add getObjectProperties function to codegen Parser
Pull Request resolved: https://github.com/facebook/react-native/pull/37789
Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green
Reviewed By: cipolleschi
Differential Revision: D46584748
Pulled By: rshest
fbshipit-source-id: 7f509b6f8754472a9b3048214345dc94265604ba