Commit Graph
34076 Commits
Author SHA1 Message Date
Ramanpreet Nara 6f10110555 Remove Deprecated TurboModuleManagerDelegate APIs
Summary:
This deprecated API makes TurboModuleManager's module creation algorithm harder to follow. Let's remove it.

Changelog: [Android][Removed] - Remove TurboModuleManagerDelegate.getLegacyCxxModule

Reviewed By: mdvacca

Differential Revision: D45158031

fbshipit-source-id: f72af3d62e51a4c8427d41975f51d1c9dd31c6c8
2023-04-21 16:37:04 -07:00
Ramanpreet Nara ac2a4d8e6c Remove getNative* TurboModuleRegistry APIs
Summary:
These getNative* TurboModuleRegistry APIs make the TurboModuleManager harder to understand. They should have never been introduced.

Let's remove them for added clarity.

Changelog: [Android][Removed] - Remove TurboModuleManager.getNativeModule,getNativeModules,hasNativeModule

Reviewed By: mdvacca

Differential Revision: D45158032

fbshipit-source-id: 6f904dfe43fe7b2c215070a19f474acceddbf2f8
2023-04-21 16:37:04 -07:00
Nick Gerleman 1f1918e473 Remove C++ form of YGNodeSetChildren (#37013)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37013

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

Brings Yoga public interface back to a nice pure C ABI.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45138827

fbshipit-source-id: 8df7e4fd03afcda9a714d193b0430c122a7a7574
2023-04-21 15:36:17 -07:00
David Vacca 43c202fa95 Fix lint warnings in Drawer classes (#37024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37024

Fix lint warnings in Drawer classes

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D45123914

fbshipit-source-id: 46d2f6326b4231dcefb42f286437daec53c51fae
2023-04-21 15:17:29 -07:00
Nick Gerleman f3abf4243c Remove YGNode "reserved_" field (#36991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36991

D15296732 added a byte to each YGNode exposed via private API, to stash random junk in. At the time, not adding to node size because of how fields ended up aligning. I'm not sure if this is still the case, but this is subject to change (e.g. adding a single extra flag).

There is a per-node "context" already that can store arbitrary data, and this reserved space isn't public, so this API is already a bit suspect.

The only place it is used is in instrumentation in fbandroid, enabled only in benchmarks, to store an enum to forward to QPL for what framework it thinks created the Yoga Node.

This is already broken for React Native (worked for Paper only), and afaict isn't used anywhere. But it also has little reason to be caching more information on the node (beyond maybe saving a couple memory accesses) since it derives this information from the node config already.

This removes the field.

Changelog:
[Internal]

Reviewed By: rshest

Differential Revision: D45137133

fbshipit-source-id: 75755b21102f7928b3ad947051c35b1a6566ef40
2023-04-21 13:54:50 -07:00
Samuel Susla bd64699f0a Reset internal state of RCTScrollViewComponentView in scrollViewDidEndDragging
Summary:
changelog: [internal]

`_isUserTriggeredScrolling` must be NO when user interaction stops. This was not the case when user scrolled -> lifted finger but the scroll did not decelerate into position. The case with deceleration is handled in method `scrollViewDidEndDecelerating`.

Reviewed By: javache

Differential Revision: D45147325

fbshipit-source-id: 1b55dc708c4c7d6cffa917a822eb2b569b22dbb2
2023-04-21 10:43:17 -07:00
Samuel Susla 81d8992ceb Fix outdated viewport offset on Fabric surface (#37020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37020

changelog: [internal]

if host view's position on screen changes, `RootShadowNode` has to be notified of this. Otherwise the state of UI is not correctly reflected in ShadowTree, leading to inconsistencies. For example, when trying to get views position in window, it won't be correct when hosting view isn't full screen.
Overriding `setFrame` only works for cases where it is hosting view's parent changing its position. But there are other cases where the position may change on the screen, like when hosting view's parent is moved by movable navigation bar. This does not affect frame of hosting view but it does change its position on the screen. To know about this event, we need to override `layoutSubviews`. `layoutSubviews` is called by UIKit whenever its internal flag `_needsLayout` is set to YES.

Reviewed By: javache

Differential Revision: D45122502

fbshipit-source-id: b7b1b08a8b3accffce7e3c71f7d19887caf6462f
2023-04-21 10:43:17 -07:00
Nick Gerleman 516642c101 Remove YGTraversePreOrder (#37014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37014

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

This is unused, and kinda missed the intent of Yoga.h and YG* functions being a C ABI.

Reviewed By: rshest

Differential Revision: D45138646

fbshipit-source-id: 743e7d0f43c122932c3a6f43ce564c0f209b4771
2023-04-21 09:58:07 -07:00
Nicola Corti e242a65c5b Update actOnLabel to include the official reproducer (#37023)
Summary:
I'm adding a reference to our official template in the Needs: Repro label response

## Changelog:

[INTERNAL] - Update actOnLabel to include the official reproducer

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

Test Plan: n/a

Reviewed By: mdvacca

Differential Revision: D45183426

Pulled By: cortinico

fbshipit-source-id: cd97981eda49ff7123f6beb05b6eb64b4899ded0
2023-04-21 09:35:16 -07:00
Ruslan Shestopalyuk 2058da8f20 Unrevert "use stable sort for performance entries" (#37017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37017

Changelog: [Internal]

Re-submitting https://github.com/facebook/react-native/pull/36998, which was reverted earlier due to the internal compatibility check issues.

Reviewed By: cipolleschi

Differential Revision: D45177862

fbshipit-source-id: f47ef496e3d7531b5e077310c72def80b024be6e
2023-04-21 05:14:11 -07:00
Ruslan Shestopalyuk 10aad32bef Re-submit Performance.mark/duration argument removal from the API (#37016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37016

Changelog: [Internal]

Re-submitting https://github.com/facebook/react-native/pull/36997, which was reverted earlier due to the internal compatibility check issues.

Reviewed By: cipolleschi

Differential Revision: D45177697

fbshipit-source-id: 9a4a55e45d4530770b16247374d03bd4ccc7fa21
2023-04-21 05:14:11 -07:00
Nicola Corti 74f256b6f0 Gradle to 8.1 (#37018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37018

Just bumping Gradle version to the latest stable.
This brings configuration caching as stable, which is quite of a big deal.

Changelog:
[Android] [Changed] - Gradle to 8.1

Reviewed By: yungsters

Differential Revision: D45177537

fbshipit-source-id: 6a47208b69d5591d299451e5a610cc3f5e9afe66
2023-04-21 04:52:54 -07:00
Christoph Purrer 57c36927f7 Fix jsErrorHandler/JsErrorHandler.h import error on Windows (#37012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37012

Changelog: [Internal]

Our default clang compiler setting on Windows doesn't allow to mismatch folder and headername space naming conventions

Reviewed By: yungsters

Differential Revision: D45165950

fbshipit-source-id: 459848960513bd06ad0c2dbaef5d8c44305e4567
2023-04-21 01:33:20 -07:00
David Vacca 363224ea62 Deprecate EventBeatManager constructor (#36905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36905

In this diff I'm deprecating EventBeatManager constructor that receives a Context as a parameter.

bypass-github-export-checks

changelog: [Android][Deprecated] deprecating EventBeatManager constructor that receives a Context as a parameter.

Reviewed By: fkgozali

Differential Revision: D44759827

fbshipit-source-id: cb117c26af0a43fe245f8778a55dfbea756b3ce6
2023-04-20 19:43:33 -07:00
Nick Gerleman 4ae77c0ad4 Remove BitUtils Usage in YGNode (#1250)
Summary:
X-link: https://github.com/facebook/yoga/pull/1250

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

BitUtils functions in Yoga are like bit fields, with more steps, and more error prone (you need to work with explicit offsets which can be tricky for anything variable length). Replace usage with a bitfield struct. Eventually I'd like to remove the BitUtils functions in general.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45133645

fbshipit-source-id: aa1430df5e2fb71ed9d2a5f5b1a35429b71c7069
2023-04-20 17:38:55 -07:00
David Vacca 4260494574 Refactor FabricUIManager (#37011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37011

Refactor FabricUIManager to use labmda and remove lint warnings

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D45164998

fbshipit-source-id: 56ee5b4d9d2c234c517757a8963f03443e5935d4
2023-04-20 17:18:51 -07:00
Phillip Pan 2fe14df09a properly format pragma marks
Summary:
Changelog: [Internal]

so ANNOYING

Reviewed By: christophpurrer, sammy-SC

Differential Revision: D45022199

fbshipit-source-id: 367a9b652987e1590a966928870de1ba61a4bad3
2023-04-20 16:26:38 -07:00
Phillip Pan 5a7799eead make getModuleInstanceFromClass: required
Summary:
Changelog: [iOS][Breaking]

continuing getting rid of optional methods, but this does have a behavioral change. if the delegate does not provide the module instance, then we lazily create it. before we were returning nil, idk why. this will be a breaking change if you have any classes that conform to `RCTTurboModuleManagerDelegate`

#saynotoruntimechecks

Reviewed By: cipolleschi

Differential Revision: D45022139

fbshipit-source-id: 9635332caf3db7bb9306f99ee5c0d577091d38ea
2023-04-20 16:26:38 -07:00
Phillip Pan fbf196dd05 make getModuleClassFromName: required (#36968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36968

Changelog: [iOS][Breaking]

we should be using `optional` never. this will be a breaking change if you have any class that conform to `RCTTurboModuleManagerDelegate`

#saynotoruntimechecks

Reviewed By: cipolleschi

Differential Revision: D45022003

fbshipit-source-id: d1b3cf72bae82070704f20de4558949189da462a
2023-04-20 16:26:38 -07:00
David Vacca fce5aa7c5f Reduce Visibility of public API (#37008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37008

Reduce Visibility of public methods that should be private

changelog: [Internal] internal

Reviewed By: luluwu2032

Differential Revision: D45153669

fbshipit-source-id: 2177a114eaa701d79a21d8a25bd299bf681dc4b8
2023-04-20 16:11:54 -07:00
Oleksandr Melnykov 9e0d198727 Back out "Clean up uneeded "duration" parameter from the Performance.mark API"
Summary:
Changelog: [Internal]

Original commit changeset: ce3d14940124

Original Phabricator Diff: D45141978

Reviewed By: GijsWeterings

Differential Revision: D45161958

fbshipit-source-id: 22d79e8e8d0670fd220391f7e5ea92ca257ff982
2023-04-20 15:36:16 -07:00
Oleksandr Melnykov d77798b270 Back out "Use stable sort for performance entries"
Summary:
Changelog: [Internal]

Original commit changeset: 77ff0093bead

Original Phabricator Diff: D45142500

Reviewed By: GijsWeterings

Differential Revision: D45161907

fbshipit-source-id: 546d36a8d1f2bf8c8e26279b172f62e303b51dc0
2023-04-20 15:36:16 -07:00
Christoph Purrer 65f5cd7995 Use C++17 namespace format everywhere (#36987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36987

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D45130727

fbshipit-source-id: 66f9fbd2a3a5f4d637b59bee77d085a35117d69d
2023-04-20 14:19:50 -07:00
Nick Gerleman da71c40f81 Undeprecate Config setting APIs (#1251)
Summary:
X-link: https://github.com/facebook/yoga/pull/1251

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

YGNode::setConfig was deprecated as part of D15416474 in an apparent goal to remove config pointers per-Node.

While I don't know the history of the motivation here, these config pointers were never removed, and we will be doubling down on per-node configs for StrictLayout, so we will want to undeprecate this.

This also exposes functions to the public C ABI, but I didn't spend the effort to create language projections for it.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45133646

fbshipit-source-id: 2bb15c4825717793529cdad8542447d11e723e35
2023-04-20 14:01:14 -07:00
Tim Yung f84256a924 RN: Upgrade to deprecated-react-native-prop-types@4.1.0
Summary:
Upgrades React Native to `deprecated-react-native-prop-types@4.1.0`, which includes many of the new prop types in React Native v0.72.

See: https://github.com/facebook/react-native-deprecated-modules/blob/main/deprecated-react-native-prop-types/CHANGELOG.md

Changelog:
[General][Changed] - Upgrade to deprecated-react-native-prop-types@4.1.0

Reviewed By: rickhanlonii

Differential Revision: D45155955

fbshipit-source-id: 36e715c2338b667755bd1e522b7d5a2611103779
2023-04-20 13:19:41 -07:00
Ramanpreet Nara eab32f19af Report loaded modules when first module load fails (#36980)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36980

With the TurboModule interop layer, some modules aren't being loaded at all. This logging will help us root cause the problem: is the issue with the TurboModule system, or with instantiating a particular module.

Changelog: [Internal]

Reviewed By: cortinico, mdvacca

Differential Revision: D45102812

fbshipit-source-id: 5c5f55d5857c694270a83c38b68cae0fdb2c3b50
2023-04-20 11:58:26 -07:00
Ramanpreet Nara 963739047b Separate turbo and legacy module caches (#36986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36986

global.nativeModuleProxy and global.__turboModuleProxy should not share the same cache.

Otherwise, global.nativeModuleProxy could return TurboModules, and global.__turboModuleProxy could return legacy native modules.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D45131296

fbshipit-source-id: 472059dc95d760a5eb8fc376606b30e614ee86c5
2023-04-20 11:42:21 -07:00
Ramanpreet Nara 0c1b7d374c Simplify the gating for the Fb4a TurboModule interop test (#36985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36985

This diff simplifies TurboModuleManagerDelegate. Now, it doesn't do any filtering.

What TurboModuleManagerDelegate does:
- If the TurboModule interop layer is on, getLegacyModule(moduleName) starts returning legacy modules.
- If the TurboModule interop layer is off, getLegacyModule(moduleName) returns null.

This should help with T144183369. In that crash, some native modules are returned as null. And complicated filtering could be a contributor to that problem. So, simplifying filtering might mitigate that issue.

Even if it doesn't, this makes the TurboModuleManager easier to understand, which makes root causing/mitigating that problem easier.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D45131297

fbshipit-source-id: 9e37804e09c9f04ab0610f5b444574ae65c9d638
2023-04-20 11:42:21 -07:00
Oleksandr Melnykov 53d3629a65 Back out "Link to fbsource"
Summary: Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D45149829

fbshipit-source-id: 915ddb7d3027cff822aff57a5b8abaca1d6cb12e
2023-04-20 11:15:51 -07:00
yaqi.liu 5059ddc5ce KeyboardAvoidingView: update bottom height when frame height is changed (#36970)
Summary:
Fix this issue: https://github.com/facebook/react-native/issues/29499

- We should change the bottom height if the frame height of KeyboardAvoidingView is changed

In some scenarios, the height of `KeyboardAvoidingView` would be changed because its container is re-layouted. So `onLayout` of `KeyboardAvoidingView` may be triggered more than once.

https://github.com/facebook/react-native/blob/bbc3657ff4efd0218e02ad9a3c73725a7f8a366c/packages/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L114-L125

But at line 122 above, `_updateBottomIfNecessary ` would be called only for the first trigger of `onLayout`. That means, if the height of `KeyboardAvoidingView` is changed, the bottom height can't be updated.

#### See the videos below:

##### before

In this video, `KeyboardAvoidingView ` is rendered twice, and the height is changed from 844 to 753, `bottomHeight ` is not updated when the height changed, so there is a white gap below the `continue` button. Once I re-open the keyboard, `_updateBottomIfNecessary` is called again, then the white gap disappeared.

https://user-images.githubusercontent.com/25719782/232962924-c69adc11-deb9-4426-9b5c-4e990a0470db.mp4

##### after

https://user-images.githubusercontent.com/25719782/232962956-a163020f-5f40-4d82-9f6c-5ee67416c489.mp4

## Changelog:

[GENERAL] [CHANGED] - change `_onLayout` to update bottom height when frame height is changed

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

Reviewed By: rshest

Differential Revision: D45138176

Pulled By: NickGerleman

fbshipit-source-id: b7ce6d75622ed6e8f104ae0d8441e1cb97cfa15b
2023-04-20 10:46:54 -07:00
Nick Gerleman 290774fd80 Do not run OSS changelog validator on diffs exported from Phabricator (#36994)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36994

We already run changelog validation internally which has specific exemptions for codemods and dirsynced directories. Do not run twice, now that we need to export diffs.

An alternative solution would be to port the logic to the OSS changelog generator and stop running the internal one, but that would increase latency, and we have made fixes to the internal once as recent as two weeks ago in D44746795.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D45135111

fbshipit-source-id: e23c2613b183f75a148d1b38b31c259acc9c9fc5
2023-04-20 10:11:43 -07:00
Ruslan Shestopalyuk 8e046cbbd7 Use stable sort for performance entries (#36998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36998

For performance entries that have the same start/end time it makes more sense to report them back to `PerformanceObserver` in the same order they were logged.

This kind of determinism is arguably better both in terms of API, and from the point of view of testing.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D45142500

fbshipit-source-id: 77ff0093bead45dc2f15efc4b903dc181927565a
2023-04-20 10:05:53 -07:00
Samuel Susla 1250b8afb1 Revert D45145742: Synchronously flush the transition lane scheduled in a popstate event (#26025)
Differential Revision:
D45145742

Original commit changeset: 196fe3539ee8

Original Phabricator Diff: D45145742

fbshipit-source-id: ad9e911cf702f539e44d785db030d664a48ebe42
2023-04-20 09:11:41 -07:00
acdlite 7f495a3cf2 Synchronously flush the transition lane scheduled in a popstate event (#26025)
Summary:
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

Browsers restore state like forms and scroll position right after the
popstate event. To make sure the page work as expected on back or
forward button, we need to flush transitions scheduled in a popstate
synchronously, and only yields if it suspends.
This PR adds a new HostConfig method to check if `window.event ===
'popstate'`, and `scheduleMicrotask` if a transition is scheduled in a
`PopStateEvent`.

## How did you test this change?

yarn test

DiffTrain build for commit https://github.com/facebook/react/commit/d121c67004a2e6b0bb5d341843663ef213f64863.

Reviewed By: kassens

Differential Revision: D45145742

Pulled By: sammy-SC

fbshipit-source-id: 196fe3539ee8588a31012d6af86a5ce0cd7fc973
2023-04-20 07:53:57 -07:00
Lulu Wu 8f0307b124 Add bolts task files as internal dependency (#36824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36824

After this diff, RNTester Android can build successfully, and it should be safe to land this stack to move Venice Android to OSS folders

Changelog:
[Android][Changed] - Add bolts task files as internal dependency

Reviewed By: cortinico

Differential Revision: D44729814

fbshipit-source-id: 80926dc548bb269bb9c69efab4c7620a3fb9fdc2
2023-04-20 07:53:37 -07:00
Facebook Community BotandFacebook Community Bot 5428b55113 Re-sync with internal repository (#37005)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2023-04-20 19:14:31 +01:00
Samuel Susla 2d9c81780c Initialise ScrollView state with content offset from props (#36961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36961

changelog: [internal]

Initial state must reflect content offset, otherwise ShadowTree will not know about the contentOffset until user scrolls.

This was affecting both, iOS and Android.

Reviewed By: mdvacca

Differential Revision: D45087358

fbshipit-source-id: 8812c2d3fe97e017938a9a81acbb31d579a00d45
2023-04-20 07:36:59 -07:00
Alex Hunt 6971540c90 Rename "Debug Menu" title to "Dev Menu" on iOS (#36981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36981

We are (following a quick internal RFC) looking to standardise the term "[in-app] [Developer|Debug] menu" to "Dev Menu" in the React Native Debugging docs (and all docs references). (Indeed, the prevalent existing use in docs was already "Developer menu".) This PR aligns naming in the `RCTDevMenu` component on iOS.

See also https://github.com/facebook/react-native-website/pull/3692.

Changelog:
[iOS][Changed] - Rename "Debug Menu" title to "Dev Menu"

Reviewed By: christophpurrer

Differential Revision: D44872456

fbshipit-source-id: c222bb2c551a4f434a1dc0efbb8d4f75c785aa11
2023-04-20 07:16:02 -07:00
Ruslan Shestopalyuk dec8562494 Clean up uneeded "duration" parameter from the Performance.mark API (#36997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36997

I've noticed that `Performance.mark`, for some reason, has been using an explicit `duration` parameter throughout, whereas it doesn't really make sense - neither from the web standard perspective, nor in general.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D45141978

fbshipit-source-id: ce3d149401249882f673c4bb6727eb1560469fa3
2023-04-20 06:31:27 -07:00
Lulu Wu 244c9ff549 Move QPL bindings to internal
Summary:
Changelog:
[Android][Changed] - Move QPL bindings to internal

Reviewed By: RSNara

Differential Revision: D45046703

fbshipit-source-id: 6383c718bf75dd6436136cdc881c9f59f18a452f
2023-04-20 04:39:08 -07:00
Lulu Wu dd8454b689 Migrate "robolectric4_test" to "rn_robolectric_test" (#36812)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36812

```robolectric4_test``` is internal and would fail CircleCI tests so we have to migrate away from it.

Changes:
> load("fbsource/tools/build_defs/oss:rn_defs.bzl") -> load("//tools/build_defs/oss:rn_defs.bzl")

> fb_android_library -> rn_android_library

> robolectric4_test -> rn_robolectric_test

I have to disable one test ```BridgelessReactContextTest.getJSIModuleTest``` since it keeps failing to create FabricUIManager which has static code in initialization, I've tried multiple ways but didn't work so disabled it temporarily to unblock.

bypass-github-export-checks

Changelog:
[Android][Changed] - Migrate "robolectric4_test" to "rn_robolectric_test" for bridgeless tests

Reviewed By: cortinico

Differential Revision: D44704765

fbshipit-source-id: 25729617a4d97f4d95a92c550ba42238f09664cb
2023-04-20 03:08:45 -07:00
fortmarek 43732081be Update CHANGELOG with 0.71.7 release (#36973)
Summary:
Adding changelog for 0.71.7 release

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

[Internal] [Changed] - add changelog entry for 0.71.7

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

Test Plan: N/A

Reviewed By: rshest, GijsWeterings

Differential Revision: D45114903

Pulled By: cortinico

fbshipit-source-id: c460858dd29d0c9da421bdaafb715ee71b9dd61f
2023-04-20 01:54:41 -07:00
Lorenzo Sciandra d61d343e41 add 0.70.9 changelog (#36975)
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.70.9

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

Test Plan: N/A

Reviewed By: NickGerleman

Differential Revision: D45115818

Pulled By: cortinico

fbshipit-source-id: a175a1ea6b864b21300f7f89731f3f501084949a
2023-04-20 01:53:16 -07:00
Christoph Purrer 79c42e7259 Use C++17 namespace format (#36983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36983

Changelog: [Internal]

This updates ReactCommon/react code to use C++17 namespace format which was already used partially in other files

Reviewed By: NickGerleman

Differential Revision: D45121589

fbshipit-source-id: 0be5a7bce75dc9f8cde7856684f730f4d6df9202
2023-04-19 23:41:29 -07:00
David Vacca 6babe4acfa Delete sStateDescription from BaseViewManager (#36904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36904

In this diff I'm deleting sStateDescription from BaseViewManager, which their usages were originally deleted in D17152891

bypass-github-export-checks

changelog: [Android][Deleted] Delete sStateDescription from BaseViewManager, it's safe to delete because it shouldn't be used anywhere

Reviewed By: genkikondo

Differential Revision: D44682968

fbshipit-source-id: 732c32429b2c0c107f7968ece5b2e1ed256eed90
2023-04-19 20:37:52 -07:00
David Vacca bbc3657ff4 Delete unused method exposed in BaseJavaModule (#36907)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36907

Delete unused method exposed in BaseJavaModule

bypass-github-export-checks

Changelog: [Android][Removed] Delete hasConstants() method from BaseJavaModule

Reviewed By: philIip

Differential Revision: D44678688

fbshipit-source-id: 9fd15f2097a6251fd2cf6c81c89370dd18c6bd6c
2023-04-19 18:44:54 -07:00
David Vacca 65bf785e5b Cleanup unused methods of view recycling in Android (#36906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36906

There are some unused methods of view recycling in Android

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico, genkikondo

Differential Revision: D44677790

fbshipit-source-id: 59bdbbee4f739c6427112c5a4b07c42d05e65d90
2023-04-19 16:31:55 -07:00
Christoph Purrer 4768a2762d Update license information (#36982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36982

Changelog: [Internal]

Reviewed By: shwanton, luluwu2032

Differential Revision: D45121323

fbshipit-source-id: 93eedc6b24f0a6fcd977d3afc5c77b4e3b7172ad
2023-04-19 15:22:31 -07:00
Nick Gerleman 5f0c3a3e34 Fix Android linting using old minSdkVersion (#36587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36587

Right now an arc focus'd Android Studio (and presumably Android studio in OSS) will warn on any call incompatible with API 20 and later, but we only target API 21+ (Lollipop). See D24380233 for where we removed Lollipop and earlier code in October 2020.

https://pxl.cl/2xMGG

From searching, these warnings are controlled by the closest parent `AndroidManifest.xml`. We don't use this to control the actual SDK version, but we can add one for correct lint warning.

This change does that, then removes any extraneous version checks that were added since then.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D44305441

fbshipit-source-id: f7b9b8889f4b0523a1e7b1a14808b0f587012a90
2023-04-19 15:03:07 -07:00
Lulu Wu 537c28a422 Remove @SoLoaderLibrary to avoid OSS breakage (#36821)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36821

About SoLoaderLibrary:
```
/**
 * This class is used to mark Java classes that depend on native libraries.
 *
 * <p>The purpose is to enable compile-time checking of library renaming. Adding a native target to
 * the native library merge map will cause its library name to change in release builds, which
 * SoLoader only supports if the target sets allow_jni_merging = True.
 *
 * <p>By publishing the library names to Buck via this annotation, we can validate at build time
 * that this parameter is set.
 */
```
This annotation is not supported in OSS so move it to avoid breakage

Changelog:
[Android][Changed] -Remove SoLoaderLibrary to avoid OSS breakage

Reviewed By: cortinico

Differential Revision: D44679498

fbshipit-source-id: 6255e3c5f011d999d5e5aa6ae756a783bea2ee77
2023-04-19 14:52:52 -07:00