Commit Graph
32109 Commits
Author SHA1 Message Date
Genki Kondo 5f8bbf2bd2 Mitigate flickering on color animations (#37925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37925

Vectorized animations (XY, Color) are split into multiple animations for each component that execute in parallel. Upon each of these animations completing, a rerender is triggered to sync the state back to the JS AnimatedValue nodes.

The problem with this is that calling update() on AnimatedProps when each animation completes results in potential flickering as all animations that are part of the vectorized animation may not have completed yet. For example, only the animation for the red channel of an animating color may have been completed, resulting in a temporary red color being rendered. So, for now, ignore AnimatedProps that use a vectorized animation.

Follow up will properly address vectorized animations - only call the update() when all animations complete.

Changelog:
[General][Fixed] - Mitigate flickering on color animations

Reviewed By: rshest

Differential Revision: D46778405

fbshipit-source-id: 5ecb0be95a131b22e5081024d4e094b22b57aac4
2023-06-16 10:40:39 -07:00
Riccardo Cipolleschi 71936fcf43 Fix hermes-engine in Nightlies
Summary:
With commit [332be0f](https://github.com/facebook/react-native/commit/332be0f0c84c48e0b0edd373636b0b5538fa3b2b) nightlies were broken due to a wrong update with the method we need to use to download hermes.

This change fixes that issue

## Changelog:
[Internal] - Fix hermes-engine download in Nightlies

Reviewed By: cortinico

Differential Revision: D46800717

fbshipit-source-id: 62ce94b980110f46337ce2520fa3c9fbcfe856cc
2023-06-16 10:25:49 -07:00
Nicola Corti 84fc79f453 Bump Gradle to 8.1.1
Summary:
Just keeping our Gradle version up to date.

Changelog:
[Internal] [Changed] - Bump Gradle to 8.1.1

Reviewed By: yungsters

Differential Revision: D46769069

fbshipit-source-id: b79ae35473f40e821cf6a1b8e094e33d1b1a44d7
2023-06-16 08:40:11 -07:00
Nicola Corti f38fc9ba86 Unblock test_android by using a non-internal method of OkHTTP
Summary:
test_android is currently broken due to us using `toHttpUrl` which is `Deprecated` with
.ERROR severity level in OkHTTP 4. This fixes it by using the HttpUrl.Builder class
which is always accessible in OkHTTP.

Changelog:
[Internal] [Changed] - Unblock test_android by using a non-internal method of OkHTTP

Reviewed By: sammy-SC

Differential Revision: D46799515

fbshipit-source-id: 874194f0d9be6ba48b49a86b1a17836a8310cc8d
2023-06-16 08:06:08 -07:00
Pieter De Baets a855013fc6 Use static_cast instead of static_pointer_cast where possible (#37932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37932

`static_cast<Derived &>(*sharedBase)` is preferred over `*std::static_pointer_cast<Derived>(sharedBase)`, since we don't need to copy the underlying shared_ptr to do so. The same applies for `std::const_pointer_cast`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D46766558

fbshipit-source-id: 5d0b660107b2a60340952e2b5ec2792e3ed1832a
2023-06-16 08:00:57 -07:00
Intl Scheduler fa17aad24e translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907900746121
Sandcastle Job Instance ID: 13510799856289353
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D46799013

fbshipit-source-id: fb554c0a053e01f0f7627cee2b896ee7372f6773
2023-06-16 06:37:11 -07:00
Intl Scheduler 6350f77b0a translation auto-update for i18n/analyticsapp.config.json on master
Summary:
Chronos Job Instance ID: 1125907900691355
Sandcastle Job Instance ID: 4503600601881693
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D46798911

fbshipit-source-id: 3ad5f39013157f0b4b27df470a5e3f50ca569dbb
2023-06-16 06:33:44 -07:00
Intl Scheduler ba726f6975 translation auto-update for i18n/portal_smart_camera.config.json on master
Summary:
Chronos Job Instance ID: 1125907900691355
Sandcastle Job Instance ID: 4503600601881693
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D46798916

fbshipit-source-id: 49b815201a355eb8ba1a9d964ccba88a68e66d6a
2023-06-16 06:33:44 -07:00
Intl Scheduler 4e699046a2 translation auto-update for i18n/instagram.config.json on master
Summary:
Chronos Job Instance ID: 1125907900691355
Sandcastle Job Instance ID: 4503600601881693
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D46798904

fbshipit-source-id: 3a6f475443656cb5cfe611269f7627cabd3a2173
2023-06-16 06:33:44 -07:00
Ruslan Shestopalyuk bd3d07773f Correct "does not exists" in Animated error messages (#37930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37930

# Changelog:
[Internal] -

Was looking at some [crash report](https://github.com/facebook/react-native/pull/37927) on Github and noticed that error message has a grammar error.

Searching the code revealed three more, all in Animated.

This calms down my OCD :)

Reviewed By: sammy-SC

Differential Revision: D46792795

fbshipit-source-id: 5fcf78e38d5d1540d3699e81bbf4ba036fb5c74d
2023-06-16 06:23:09 -07:00
Andrew Wang 1525c5f342 Fix the issue that local reference overflows in Yoga 1 (#37929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37929

X-link: https://github.com/facebook/litho/pull/952

X-link: https://github.com/facebook/yoga/pull/1308

Long story in short, we're trying to fix an issue with Yoga that could potentially lead to an overflow in the JNI local reference table.

Reviewed By: NickGerleman, astreet

Differential Revision: D46653732

fbshipit-source-id: 0bc34bd5a819037c046c62b651e414b249cbdcb8
2023-06-16 06:15:07 -07:00
Ruslan Shestopalyuk a4ef8b7d47 GlobalPerformanceLogger: handle cases when global.performance is not yet initialized (#37918)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37918

# Changelog:
[Internal] -

There is no guarantee that `setUpPeformance`, which establishes the `global.performance` object accordingly, will be always called before anything tries to use performance logging.

In fact, there is an example in FB4A with the early initialization of `MobileConfige`, which logs a time span to measure how long does it take to initialize.

This makes the web performance logging code safe from such scenarios.

Reviewed By: NickGerleman

Differential Revision: D46762527

fbshipit-source-id: e189cc3f587ade31a2b5d853634c35da207f5faa
2023-06-16 06:08:25 -07:00
Pankaj Khushalani f1901d43d5 migrate ReactCookieJarContainerTest to Kotlin (#37809)
Summary:
This PR migrates ReactCookieJarContainerTest.java to Kotlin as a part of the issue https://github.com/facebook/react-native/issues/37708

## Changelog:
[INTERNAL] [CHANGED] - Migrate ReactCookieJarContainerTest.java to Kotlin

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

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

Test Plan:
1. Run ./gradlew :packages:react-native:ReactAndroid:test.
2. All tests should pass.

Reviewed By: javache

Differential Revision: D46779169

Pulled By: rshest

fbshipit-source-id: b5caa9397ac1b852fc73d9c58afc4a21caeb8727
2023-06-16 04:05:49 -07:00
Ilya Zorin d097408c1c Correctly annotate ReactHost.onHostResume
Reviewed By: ezgicicek, ngorogiannis

Differential Revision: D46795053

fbshipit-source-id: 266c9f27e3db5cdf1e1bb0f9ce30e71b31f54e2d
2023-06-16 02:41:48 -07:00
Ruslan Shestopalyuk 621a7a8634 Extend expected Flow type of the global.performance object to match Performance API (#37917)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37917

# Changelog:
[Internal] -

The `global.performance` object now has all of the API defined according to the `Performance` API, so we can modify the local RN's flow definition override correspondingly.

Reviewed By: NickGerleman

Differential Revision: D46762326

fbshipit-source-id: 0d0b9ea271a91008e775d8cf59693c35758f71e5
2023-06-16 02:12:23 -07:00
Ruslan Shestopalyuk 92525ef3ae Untangle dependency loop in virtualized-lists (#37912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37912

# Changelog:
[Internal] -

I've noticed bundler spamming with cyclical dependency warnings when working on FB4A.

This gets rid of the unneeded two-way dependency between `ListMetricsAggregator <-> VirtualizeUtils`.

Reviewed By: NickGerleman

Differential Revision: D46761080

fbshipit-source-id: a25f7eebbd177e24c39dad9af7ac574f3aa30f35
2023-06-16 00:44:20 -07:00
David Vacca c5496fd93f Introduce ReactSurfaceInterface
Summary:
This diff introduces ReactSurfaceInterface (as an empty interface).
The goal is to demonstrate that we will be extending interfaces iteratively, meaning we will complete this API as we advance on the Stable API of surface in H2

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46770420

fbshipit-source-id: 48b1ee302c157ae3431d61c84322d788d149f881
2023-06-15 22:34:36 -07:00
David Vacca 0edc2f08e1 Refactor ReactApplication to support ReactHostInterface
Summary:
This diff refactors ReactApplication to support ReactHostInterface, the goal is to be able to use this interface to integrate bridgeless in RN Tester app

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46770419

fbshipit-source-id: b3e88b12aab6287396b16b277f906026a07acad6
2023-06-15 22:34:36 -07:00
David Vacca 5f088a4ddf Reduce visibility of ReactHost.getDefaultBackButtonHandler() method
Summary:
Reduce visibility of ReactHost.getDefaultBackButtonHandler() method

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46773273

fbshipit-source-id: 5608a03882ca33028f10c9e47f7ad77930eb6db9
2023-06-15 22:34:36 -07:00
David Vacca e51ff0b6e6 Refactor ReactHost to implement ReactHostInterface
Summary:
Refactor ReactHost to implement ReactHostInterface

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46770421

fbshipit-source-id: d7d6dc361ef89b3478e882a3334059c6440f1edf
2023-06-15 22:34:36 -07:00
David Vacca 582951eca6 Create ReactHostInterface
Summary:
Introduce ReactHostInterface interface

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D46746516

fbshipit-source-id: 6c0c84761fbfd2009d72b1bf138648e1b31b4730
2023-06-15 22:34:36 -07:00
Intl Scheduler e66c906454 translation auto-update for i18n/twilight.config.json on master
Summary:
Chronos Job Instance ID: 1125907900414465
Sandcastle Job Instance ID: 13510799855734354
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D46788752

fbshipit-source-id: ca4f179c658c3d1239ab5d48d09e44c266c2103d
2023-06-15 20:50:08 -07:00
Ramanpreet Nara 7bc2b730a8 Interop: Introduce Bridge proxy
Summary:
The TurboModule interop layer on iOS will ship with a Bridge proxy.

The Bridge proxy is an object that will try to simulate the Bridge's APIs, whenever possible, by delegating to Bridgeless abstractions.

## Changes
This diff introduces the Bridge proxy.
This diff starts attaching the Bridge proxy on legacy native module objects.

## How did we polyfill the APIs
The polyfills can be classified into these categories:
- implemented
- custom warning
- custom error
- default error
- deleted

When there was a sane implementation (e.g: the API belonged to [RCTCallableJSModules](https://www.internalfb.com/code/fbsource/[534223aa13d33b595edcb777189618efe20dd167]/xplat/js/react-native-github/React/Base/RCTCallableJSModules.m?lines=11), [RCTModuleRegistry](https://www.internalfb.com/code/fbsource/[9a3ba2b3176b6d1a1f161e33cec51bf892815311]/xplat/js/react-native-github/React/Base/RCTModuleRegistry.m?lines=13), [RCTBundleManager](https://www.internalfb.com/code/fbsource/[91fa1f7f49731a16aedbcd5a6740647dc21ff727]/xplat/js/react-native-github/React/Base/RCTBundleManager.m?lines=13), or [RCTBundleManager](https://www.internalfb.com/code/fbsource/[91fa1f7f49731a16aedbcd5a6740647dc21ff727]/xplat/js/react-native-github/React/Base/RCTBundleManager.m?lines=13)), it was implemented.

When it was safe to no-op the API (e.g: loading), it emit a custom warning.

When it was unsafe to call (i.e: we didn't want people calling the API) (e.g: RCTCxxBridge start), it emit a custom error.

All other APIs emit default errors.

Some APIs cannot emit errors because doing so makes the app not render: I put warnings and nooped those APIs.

I think we will have to tune these polyfills based off production crashes/results.

Reviewed By: mdvacca

Differential Revision: D46084318

fbshipit-source-id: c02535073956597a4bf91c14b1980f653cb6d3df
2023-06-15 18:05:55 -07:00
Adrian Hartanto 3e3032636d Remove okhttp internal util usage (#37843)
Summary:
Remove okhttp internal `Util` usage so it can be compatible with [okhttp 5.0.0 alpha](https://square.github.io/okhttp/changelogs/changelog/#version-500-alpha7).

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

[ANDROID] [CHANGED] - Remove okhttp3 internal util usage

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

Test Plan: None, the implementation is based on okhttp internal util

Reviewed By: NickGerleman

Differential Revision: D46764363

Pulled By: cortinico

fbshipit-source-id: e46770625f19057fa7374be15e92903d7966f880
2023-06-15 16:34:40 -07:00
Arushi Kesarwani b40bc79f40 Update debian to fix CI while updating Node (#37841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37841

**Changelog:**
[General] [Fixed] - Update debian version

Reviewed By: cortinico

Differential Revision: D46673999

fbshipit-source-id: 3d3dc4da201d77e10950507ccd61796c10674dbf
2023-06-15 16:06:18 -07:00
Vojtech Novak ca65d97d60 fix: foreground ripple crash on api < 23 (#37901)
Summary:
The Pressable component supports the `foreground` option for ripple. However, using it on old android api levels (e.g. android 5) crashes with

```
Error while updating property
nativeForegroundAndroid' of a view managed by:
RCTView
null
No virtual method setForeground(Landroid/ graphics/drawable/Drawable;)V in class Lcom/ facebook/react/views/view/ReactViewGroup; or its super classes
```

TouchableNativeFeedback.js has a check to make sure this does not happen [as seen here](https://github.com/facebook/react-native/blob/b0485bed0945061becace5af924fa60b17ab295f/packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js#L158)

I also want to point out that this PR can be closed https://github.com/facebook/react-native/pull/30466 as it's already implemented

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID] [FIXED] - foreground ripple crashed on api < 23

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan: tested locally on [another project](https://github.com/react-navigation/react-navigation/pull/11386) because I wasn't able to get RN tester running

Reviewed By: rshest

Differential Revision: D46747310

Pulled By: NickGerleman

fbshipit-source-id: 4ee9062f821f5d629a1a0151c2fef61d836d09a4
2023-06-15 15:23:40 -07:00
Nicola Corti 2ae163a7e8 Re-add the top level LICENSE file (#37916)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37916

Repos on GitHub should have a top level LICENSE file to make sure GitHub can autodiscover
the correct license for the project.

Once we moved the file inside packages/react-native/ the autodiscovery is not working anymore (it returns a 404).

Changelog:
[Internal] - Re-add the top level LICENSE file

Reviewed By: hoxyq

Differential Revision: D46764347

fbshipit-source-id: cd760c004cf97248490b43f7ba08a47ef2d23c89
2023-06-15 13:14:17 -07:00
Sam Zhou aaa15ed09b Deploy 0.209.0 to xplat (#37921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37921

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D46773358

fbshipit-source-id: a7ef8a44c4a55a8ad5be2bc637267c518895c1c3
2023-06-15 13:08:46 -07:00
Alex Hunt 8b1bf058c4 Re-enable direct debugging with JSC on iOS 16.4+ (#37914)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37914

Restores https://github.com/facebook/react-native/pull/37874 (reverted earlier today), with fix for `JSCRuntime.cpp` build on Android.

Changelog: None

Reviewed By: cortinico

Differential Revision: D46762984

fbshipit-source-id: 6d56f81b9d0c928887860993b2b729ed96c0734c
2023-06-15 12:27:32 -07:00
tarunrajput 24f7707418 add emitObjectProp in parser primitives (#37904)
Summary:
This is a follow up PR to https://github.com/facebook/react-native/issues/37872 as it was not merged correctly.

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

[Internal][Changed]: Add emitObjectProp in parser primitives

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

Test Plan: `yarn test react-native-codegen`

Reviewed By: cipolleschi

Differential Revision: D46753690

Pulled By: rshest

fbshipit-source-id: a1d0a727222066f3721f62427a51ee0317e06f13
2023-06-15 11:47:37 -07:00
Samuel Susla 1561d2906e Make React-utils its own pod (#37659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37659

changelog: [internal]

To better align with how BUCK is setup internally, let's make React utils its own pod.

Reviewed By: dmytrorykun

Differential Revision: D46358021

fbshipit-source-id: c2a48a18e9839a508a87d54685115883975f3979
2023-06-15 11:44:26 -07:00
Grégoire Van der Auwermeulen abc6e1cbf4 feat: allow custom assignment of rootView to rootViewController (#37873)
Summary:
To use a native Drawer on iPad, I can override `createRootViewController` to create a `UISplitViewController` instead of a `UIViewController`, but I then need to assign the rootView with
```objective-c
[splitViewController setViewController:mainVC forColumn:UISplitViewControllerColumnSecondary];
```
which I can currently only do by copy pasting the entire `didFinishLaunchingWithOptions` and only replacing the assignment
```objective-c
    rootViewController.view = rootView;
```

In an attempt of making it easier for developers to use a native drawer in iOS, being able to override the assignment would make it easier.

bypass-github-export-checks

## Changelog:
[iOS] [ADDED] - added override method with default implementation

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

Test Plan: Tested on iPad iOS 16 simulator

Reviewed By: cortinico

Differential Revision: D46761919

Pulled By: cipolleschi

fbshipit-source-id: c3ece0170d732133edc08f220a2f9a67da93815a
2023-06-15 08:58:24 -07:00
Pieter Vanderwerff dc2037c0f1 Switch xplat prettier config to hermes plugin (#37915)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37915

Enable the `prettier-plugin-hermes-parser` in xplat. This plugin enables the use of `hermes-parser` which is significantly faster than the current flow parser prettier bundles (improves formatting time by ~50%) and also brings support for the latest Prettier 3.0.0 printing logic for JS. This upgrade is required in order to enable upcoming Flow features that add new syntax.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D46748891

fbshipit-source-id: 3775ef9afa7c04e565fa4fcf8ca5b410f49d35a1
2023-06-15 08:23:06 -07:00
louiszawadzki 54a5ff9745 Set iOS AppState to inactive when app is launching (#37690)
Summary:
When an iOS app launches, the current `AppStateStatus` that is returned is `"unknown"`.
However, `RCTSharedApplication().applicationState` returns `UIApplicationStateInactive` - which makes sense since the app is still showing its launch screen.
I suggest to return `"inactive"` instead of `"unknown"`, since it makes more sense and `"unknown"` is not mentioned in the [official documentation](https://reactnative.dev/docs/appstate).

I also edited the annotation for the `"inactive"` status type to make it more accurate.

bypass-github-export-checks

## Changelog:

[IOS] [CHANGED] - Set initial AppState status to "inactive" instead of "unknown"

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

Test Plan:
I played a bit with the `rn-tester` app to display the `AppStateExample` [component](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/AppState/AppStateExample.js). I did not manage to display its content, but I managed to render it and log from [its render function](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/AppState/AppStateExample.js#L84).
This is what I log in the `render` function:
![image](https://github.com/facebook/react-native/assets/8973379/76212f48-6d2e-4b14-b2a4-72c58e39bf3d)

Here is the log I saw before the change:
![image](https://github.com/facebook/react-native/assets/8973379/f3c56047-dfca-4bad-b676-0fc79b990dd9)

and after the change:
![image](https://github.com/facebook/react-native/assets/8973379/8de84b31-69a7-4547-b251-483ddde68e25)

Reviewed By: cortinico

Differential Revision: D46729548

Pulled By: cipolleschi

fbshipit-source-id: 18d2d606e0b77306811bd898b28858746c713e12
2023-06-15 07:45:30 -07:00
Riccardo Cipolleschi 09c95413dd Use fileExists in replace_hermes script (#37911)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37911

Thanks to [adrianha](https://github.com/adrianha) for spotting a bug in the script that replace the Hermes engine.
I miscopied the variable to check when there is no previous build file.

This change uses the right variable and improves also the messages printed to the user.

## Changelog:
[Internal] - Fix replace_hermes_version script using the right `fileExists` variable

Reviewed By: dmytrorykun

Differential Revision: D46762041

fbshipit-source-id: fdf3da6a598ecc657ee9313a2fa41e71c01d14ce
2023-06-15 07:27:57 -07:00
Ahmad Syarifuddin Randiko 7d4f233db3 (docs): fix license url (#37909)
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
2023-06-15 06:03:04 -07:00
Riccardo Cipolleschi e6a2b2093c Revert D46719890: Re-enable direct debugging with JSC on iOS 16.4+
Differential Revision:
D46719890

Original commit changeset: 7fa5ae244577

Original Phabricator Diff: D46719890

fbshipit-source-id: 1e5478d0fd0d09a678111b133cc46c4bdc8fc282
2023-06-15 05:58:21 -07:00
Saad Najmi 5cf8f43ab1 Re-enable direct debugging with JSC on iOS 16.4+ (#37874)
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
2023-06-15 02:32:51 -07:00
Pieter Vanderwerff 894b62ce90 Fix component type references in xplat (#37903)
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
2023-06-14 21:18:55 -07:00
Genki Kondo 8c9e37561f Remove usage of passthroughAnimatedPropExplicitValues in ScrollViewStickyHeader (#37867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37867

No longer needed with D46574511.

Changelog:
[Internal] - Remove usage of passthroughAnimatedPropExplicitValues in ScrollViewStickyHeader

Reviewed By: rshest

Differential Revision: D46703731

fbshipit-source-id: 8c0f767083aa5f3791541f5ec05b5b1b625ab61f
2023-06-14 19:22:05 -07:00
Phillip Pan 0f688dc677 test runtime lifecycle callback (#37897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37897

Changelog: [Internal]

adding unit test for `instance:didInitializeRuntime`

Reviewed By: cipolleschi

Differential Revision: D46704036

fbshipit-source-id: 6418bae56ae465f6ed9addde75d4de5719f402bb
2023-06-14 17:14:02 -07:00
Phillip Pan 066d52b7a9 test host error callback (#37894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37894

Changelog: [Internal]

as title

Reviewed By: cipolleschi

Differential Revision: D46672582

fbshipit-source-id: b37f6840c2fa505a33988cbb4b89f66698b0c66c
2023-06-14 17:14:02 -07:00
Phillip Pan 1cac95d076 push error handling c++ parsing down (#37893)
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
2023-06-14 17:14:02 -07:00
Phillip Pan 7d69cd5640 test callFunctionOnJSModule (#37898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37898

Changelog: [Internal]

as title

Reviewed By: cipolleschi

Differential Revision: D46672230

fbshipit-source-id: 8180f9dc26b44d50530fc440602acbafcf24df2f
2023-06-14 17:14:02 -07:00
Phillip Pan cc7da26f44 test RCTHost doesn't leak memory (#37896)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37896

Changelog: [Internal]

example usage of the memory test utilities

Reviewed By: cipolleschi

Differential Revision: D46625917

fbshipit-source-id: 379a76e59fb58cc4e5972195df167c52170f5e4c
2023-06-14 17:14:02 -07:00
Phillip Pan e822056618 add test helpers for memory (#37895)
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
2023-06-14 17:14:02 -07:00
Phillip Pan 75d34407c1 test RCTInstance invalidation on RCTHost restart (#37899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37899

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D46547012

fbshipit-source-id: 9b157678c474120aeca3896942e368678cb5b8eb
2023-06-14 17:14:02 -07:00
Sam Goldman 1807ba6f31 Deploy Flow v0.208.1 to fbsource (#37892)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37892

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D46734451

fbshipit-source-id: 7c50c95782bc34e7f43f916fbba75fb0e5f2d09d
2023-06-14 17:00:12 -07:00
Genki Kondo b0485bed09 Return final animation values to JS when animation completes (#37886)
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
2023-06-14 13:32:50 -07:00
Riccardo Cipolleschi 875f6a7086 Restore installing DevSupport to all the config
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
2023-06-14 12:03:26 -07:00