Граф коммитов

22842 Коммитов

Автор SHA1 Сообщение Дата
Kacie Bawiec 7ebafc0066 Add animation queue to modern createAnimatedComponent
Summary:
Add animation queuing back into createAnimatedComponent_EXPERIMENTAL.js, which is a concurrent-safe version of createAnimatedComponent.

T93269035 for details on why this is needed.

# How does this work?

In the old createAnimatedComponent, Animations were queued by calling `setWaitingForIdentifier` before render, and then calling `unsetWaitingForIdentifier` after render.

In this diff, instead we are calling `setWaitingForIdentifier` in an `useLayoutEffect` before calling `useAnimatedProps`, and we are calling `unsetWaitingForIdentifier` in a `useEffect` after `useAnimatedProps`. So the ordering for the effects are:

1. `useLayoutEffect` with `setWaiting`
2. `useLayoutEffect`s in `useAnimatedProps`
3. `useEffect`s in `useAnimatedProps`
4. `useEffect` with `unsetWaiting`.

There's a React guarantee that **if one effect is called, all of them will be called**, so we don't have a concern about the queue getting locked.

## **Main concerns:**
1. This works in my test cases, but it's not the same behavior as the old createAnimatedComponent (which is wait before and unset wait after render). This may still be ok because the relevant side effects in render from that component have been moved to `useLayoutEffect` or `useEffect` in `useAnimatedProps` (so the ordering is still the same?).
2. I'm not sure about the ordering of `onLayoutEffect`, `onLayout` callbacks, and `useEffect`. createAnimatedComponent_EXPERIMENTAL doesn't use `onLayout`, but with this new method of queuing, **`onLayout` calls will likely be called before the animation queue has been flushed**. It's not clear to me whether this is bad.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D29467458

fbshipit-source-id: 2be23a8968404526d0fa394a7879fda8b5ffbfdc
2021-07-08 09:29:38 -07:00
Justin Huntington bc1e602e0c Add ScrollView.automaticallyAdjustsScrollIndicatorInsets prop (on iOS) (#29809)
Summary:
iOS 13 added a new property to `UIScrollView`: `automaticallyAdjustsScrollIndicatorInsets`, which is `YES` by default.  The property changes the meaning of the `scrollIndicatorInsets` property.  When `YES`, any such insets are **in addition to** whatever insets would be applied by the device's safe area.  When `NO`, the iOS <13 behavior is restored, which is for such insets to not account for safe area.

In other words, this effects ScrollViews that underlay the device's safe area (i.e. under the notch).  When `YES`, the OS "automatically" insets the scroll indicators, when `NO` it does not.

There are two problems with the default `YES` setting:

1. It means applying `scrollIndicatorInsets` to a `ScrollView` has a different effect on iOS 13 versus iOS 12.
2. It limits developers' control over `scrollIndicatorInsets`.  Since negative insets are not supported, if the insets the OS chooses are too large for your app, you cannot fix it.

Further explanation & sample code is available in issue https://github.com/facebook/react-native/issues/28140 .

This change sets the default for this property to `NO`, making the behavior consistent across iOS versions, and allowing developers full control.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Changed] - ScrollView scrollIndicatorInsets to not automatically add safe area on iOS13+

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

Test Plan:
Updated the RNTester example to explain what to expect. Also removed the `pageScreen` modal example for now as mentioned in my Github comment.

{F628636466}

Here are screenshots of the demo app (from the original bug) before (with safe area applied to insets) & after (without safe area applied to insets):

![before](https://user-images.githubusercontent.com/428831/91644197-ea03a700-ea07-11ea-9489-be27820930eb.png)

![after](https://user-images.githubusercontent.com/428831/91644200-eff98800-ea07-11ea-8788-daf1e783639d.png)

Reviewed By: p-sun

Differential Revision: D28229603

Pulled By: lunaleaps

fbshipit-source-id: 2e774ae150b1dc41680b8b7886c7ceac8808136a
2021-07-07 20:23:36 -07:00
Joshua Gross 4ad4426daf Ship "state update scroll race" to ScrollView and HorizontalScrollView
Summary:
As a followup to T91209139, ship "state update scroll race" in code. This also ships it for HorizontalScrollView since it's been validated for vertical scroll views.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D29595601

fbshipit-source-id: 64b6a23e2dab2c13123e132d9d899fb769d03172
2021-07-07 16:23:10 -07:00
Joshua Gross 421df26266 Mitigate T94864568 by dropping TouchEvents that do not have a MotionEvent
Summary:
I suspect that T94864568 is caused by TouchEvents being dispatched after they've been recycled. This needs further analysis, but to stop the bleeding, we can drop events at the point they'd be dispatched before the crash, and log a soft error.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D29594749

fbshipit-source-id: f50df8df2125b83126616ceaf4e529127d154c7c
2021-07-07 15:23:14 -07:00
Luna Wei 28e8c6a716 Styling updates and typo fixes
Summary:
Changelog: [Internal] Fix things in RNTester
* Make SectionList-contentInset example iOS only and update styling
* Fix a typo in SectionList-onEndReached example
* Fix module example styling and pressed state styling for Android

Reviewed By: kacieb

Differential Revision: D29571327

fbshipit-source-id: 5cbb68781536e21ca73ca22b01343379306babd4
2021-07-07 13:58:28 -07:00
Luna Wei 1ad6e6096a Rename header to titlebar
Summary: Changelog: [Internal] - Rename RNTesterHeader to RNTTitleBar

Reviewed By: kacieb

Differential Revision: D29571325

fbshipit-source-id: 192b73af63f2e924c8beb55e96855ebfe9afa6fb
2021-07-07 13:58:28 -07:00
Luna Wei cf2cc9e285 Update title to example
Summary: Changelog: [Internal] Update title when navigating to an example

Reviewed By: kacieb

Differential Revision: D29545092

fbshipit-source-id: 7ce2f7d978601a5e11e2d60a8fd17be0249ce122
2021-07-07 13:58:28 -07:00
Luna Wei b62a40afde Fix jump in title for iOS
Summary: Changelog: [Internal] - iOS title jumps currently due to SafeAreaView re-mounting because of the layout structure we use. Simplified the layout tree

Reviewed By: kacieb

Differential Revision: D29545113

fbshipit-source-id: 9ed764c1c9f3da7c58baf8028454859bd50ded60
2021-07-07 13:58:28 -07:00
Joshua Gross 3b569b8aff Ensure that TouchEvent is initialized with a valid MotionEvent
Summary:
It is unlikely but possible that the crash T94864568 is caused by a TouchEvent being initialized with a null MotionEvent. Regardless, we should guard against this case.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D29594750

fbshipit-source-id: 3a409b716a9f1eec8017002ae7e23273677e53ba
2021-07-07 13:36:34 -07:00
Samuel Susla b52950bda2 Apply correct text attributes in TextInput.setTextAndSelection
Summary:
Changelog: [internal]

Make sure correct text attributes are used inside of view command.

Reviewed By: sshic

Differential Revision: D29585943

fbshipit-source-id: 4748c843ff586f1dd42f3a89460afb624f9b371a
2021-07-07 07:11:03 -07:00
Nishan Bende d85d72d0d9 fix: TouchableNativeFeedback ripple starts on previous touch location (#31777)
Summary:
TouchableNativeFeedback's ripple starts from previous location on subsequent presses. This is similar to https://github.com/facebook/react-native/pull/31669

Fixes https://github.com/facebook/react-native/issues/28944

Issue

https://user-images.githubusercontent.com/23293248/123521731-1f375f00-d6d6-11eb-8e4c-fc5ffb322e67.mov

Fix

https://user-images.githubusercontent.com/23293248/123521735-2bbbb780-d6d6-11eb-88b2-be75342cf22a.mov

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - TouchableNativeFeedback ripple starts on previous touch location.

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

Test Plan: Tested TouchableNativeFeedback examples in rn-tester app. Registering coordinates before pressed command fixes the issue.

Reviewed By: lunaleaps

Differential Revision: D29496515

Pulled By: kacieb

fbshipit-source-id: 77ac626181a61eee2cd30c4d48e52d10d800f2d8
2021-07-06 17:50:35 -07:00
Kudo Chien ebe939b18a Upgrade folly to fix NDK 21 build issue (#31802)
Summary:
Upgrade folly for the https://github.com/facebook/folly/pull/1593 fix for NDK 21 failure

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Upgrade folly to 2021.06.28.00

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

Test Plan:
`./gradlew :ReactAndroid:installArchives`
`./gradlew packages:rn-tester:android:app:installJscRelease`
`./gradlew packages:rn-tester:android:app:installHermesRelease`

Reviewed By: RSNara

Differential Revision: D29547027

Pulled By: ShikaSD

fbshipit-source-id: a10c7c65f459091bd0e7cca750a9b9e067189b73
2021-07-06 10:35:25 -07:00
Nick Gerleman bf2e1c9763 Replace #import in C++ Header with #include (#31805)
Summary:
#import is common in Objective C, but is a vendor-specific extension of C++, which breaks MSVC compat. Fix an #import that made its way into C++ code.
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Fixed] - Replace #import in C++ Header with #include

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

Reviewed By: sammy-SC

Differential Revision: D29553429

Pulled By: javache

fbshipit-source-id: d609981f0c6a756eafb58d50e98975625d08de21
2021-07-06 02:43:08 -07:00
Samuel Susla 3bce393766 Clean up enable_state_scroll_data_race_ios experiment
Summary:
Changelog: [internal]

Clean up the experiment.

Reviewed By: JoshuaGross

Differential Revision: D29547129

fbshipit-source-id: 08ecbf5d362385b9d287348c7a4a508ca24a42bf
2021-07-05 14:14:47 -07:00
Luna Wei c06d8d01ca Support 3 levels of navigation
Summary: Changelog: [Internal] RNTester to support 3 levels of navigation

Reviewed By: kacieb

Differential Revision: D29481463

fbshipit-source-id: e48281cce7fccd7096446c5f0f5583f2588b5028
2021-07-01 14:35:30 -07:00
Luna Wei 8765b93bae Generalize RNTPressableRow
Summary: Changelog: [Internal] - Extract ExampleModuleRow and use Pressable

Reviewed By: kacieb

Differential Revision: D29480756

fbshipit-source-id: d256513bec497feeb429e9484ffe367b52e5b2ad
2021-07-01 14:35:30 -07:00
Luna Wei 9fb2659f56 Move SectionList examples together
Summary: Changelog: [Internal] - Move SectionList examples together. An interim state for next diff to add a 3rd level of navigation so each example is rendered in separate surface.

Reviewed By: kacieb

Differential Revision: D29480143

fbshipit-source-id: f7f10920bd4ab938665f17f0a80debaff55b9788
2021-07-01 14:35:30 -07:00
Luna Wei fd08255b0b Refactor SectionListExample
Summary: Changelog: [Internal] - Refactor SectionListExample

Reviewed By: kacieb

Differential Revision: D29480050

fbshipit-source-id: edaa21e12d4be0fbe3d6cf147c74b8144eb7c3de
2021-07-01 14:35:30 -07:00
Luna Wei fa3243ad33 Rename things in RNTester
Summary:
Changelog:
[Internal] - Rename some types and components in RNTester to support work for tertiary levels of navigation.

module = component | api
moduleExample = an example of a certain feature a module

Reviewed By: kacieb

Differential Revision: D29381875

fbshipit-source-id: c348bcbb73aaf95e85928bb14080a097e685cc78
2021-07-01 14:35:30 -07:00
Ruslan Serebriakov d5676f8370 CKComponentLayout
Summary:
fastmod --accept-all "CKComponentLayout" "RCLayout"
Changelog: [Internal]

## Changelog:

[Internal] - Renaming

Reviewed By: cuva

Differential Revision: D29228868

fbshipit-source-id: 2a5601eb7464e2cff3302781030c175e972f38bb
2021-07-01 09:04:46 -07:00
Kacie Bawiec 40a93914c6 Move Pressable Sticky Header Example to RNTester
Summary:
Add a test case showing off a pressable sticky header to RNTester.

Note that this test case does not follow the styling of the other ScrollView Examples. I chose not to make it follow the styling because the existing examples need to be refactored later to not use custom buttons.

Changelog:
[General][Added] Add Pressable Sticky Header example to ScrollViewExamples in RNTester

Reviewed By: lunaleaps

Differential Revision: D29437827

fbshipit-source-id: 3ccee5df99bc6f00a04e1ecbd47fbe86b1eda4dc
2021-06-30 15:44:31 -07:00
Joshua Gross 34903ba418 Add mechanism to enforce certain Views always being visible in the View hierarchy
Summary:
See comments in ReactClippingProhibitedView for details and motivation behind this new feature.

You may have a View class inherit from the ReactClippingProhibitedView interface in order to enable this feature for instances of that View type.

This can be added to Views that should /never/ be clipped from the View hierarchy - namely, TTRC components or other telemetry components that always need to be rendered in order for some feature to function.

Changelog: [Added] Opt-in mechanism to allow native Android Views to be marked as "not clippable", soft exceptions will be logged if these Views are clipped from the View hierarchy

Reviewed By: sshic

Differential Revision: D29472439

fbshipit-source-id: b3be53df836b452aed5dc40514ff585ce0ad812b
2021-06-30 10:39:55 -07:00
Pieter De Baets e6b9508f12 Fix crash when PlatformColor is used as backgroundColor
Summary:
@public

When PlatformColor is used with backgroundColor, this line would throw, as the object type is not convertible to int.

Changelog:
[Android][Fixed] - Fix Crash in ViewProps.isLayoutOnly

Reviewed By: JoshuaGross

Differential Revision: D29430151

fbshipit-source-id: a1fe801925430dad3a17871bdebb79d942775280
2021-06-30 01:19:53 -07:00
Ramanpreet Nara 8c746dfc7e Fix CMD + OPT + R with Bridgeless mode only
Summary:
When you reload React Native surfaces via the CMD + OPT + R keystroke, this is the actual code that executes:

https://www.internalfb.com/code/fbsource/[9c79fc6a17b7738b391a605412abf1cb15ef8ea1]/xplat/js/react-native-github/React/CoreModules/RCTDevSettings.mm?lines=172-175%2C179-183

It's only executed when RCTDevSettings is instantiated by the bridge. So, if only bridgeless surfaces are loaded, then CMD + OPT + R doesn't work.

## Fix
In this diff, I ensure that
1. We set up the reload listener when RCTDevSettings is *first* instantiated
2. We clear the reload listener when all instances of RCTDevSettings are invalidated.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D29437952

fbshipit-source-id: 9f2ff8340575c0ed881df26249433b2075bbd2ac
2021-06-29 14:55:40 -07:00
Ramanpreet Nara c7d34527c9 Specify whether DevMenu is bridgeless or bridge
Summary:
The Facebook app can have both bridge and bridgeless surface. Each type of surface has its own DevMenu. It's important to specify which DevMenu is being rendered, because not doing so can make for some confusing/frustrating devx (e.g: the bridgeless dev menu shows up for bridge surfaces: https://pxl.cl/1L1m7).

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D29439980

fbshipit-source-id: 24de1e6b44e5315c0cee0684d0db5df31514d3e2
2021-06-29 14:41:49 -07:00
Yedidya Feldblum 77279067f1 avoid mixing direct unlocking with lock-holders
Summary:
When using lock-holder objects, it is typically required to conduct all unlocking and relocking through them. That way, the RAII lock-holder does not attempt to unlock an unlocked mutex should the code throw after unlocking but before relocking.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D29238721

fbshipit-source-id: 2403ce8c9e86f96b56a35a456e017486a2854c74
2021-06-29 14:38:33 -07:00
George Zahariev 7c47420de7 Explicitly turn off indexed_access flowconfig option in Xplat
Summary:
A future version of Flow will make the `indexed_access` option on by default. Turn it off explicitly in xplat until we're ready to deploy.

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D29468755

fbshipit-source-id: 1ae5bb5f57315a2dab3072cc25689c3fc72ef871
2021-06-29 14:31:15 -07:00
Joshua Gross 41ecccefcf Immediately destroy EventEmitterWrapper on update instead of waiting for GC
Summary:
Immediately destroy EventEmitterWrapper on update instead of waiting for Java GC. This can resolve JSI::~Pointer deallocation crashes by clearing out EventEmitter and therefore EventTarget sooner, before RN teardown.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D29415386

fbshipit-source-id: 05517bfd9e2cc2bd1b8c58d4f84c84f6f547268a
2021-06-26 12:21:16 -07:00
Joshua Gross afafbf8ec4 Log soft exception instead of crashing if ref is null on TextInput onPress
Summary:
See title.

Changelog: [internal]

Reviewed By: yungsters

Differential Revision: D29410457

fbshipit-source-id: 0b9a9836baa0b5b7deb88cd73f4f634ca10c5868
2021-06-25 19:49:04 -07:00
David Alves b673e352fb Use weak hash map for react scroll view helper
Summary:
This prevents us from leaking things via this static field.

Changelog: [Android][Changed] Native ScrollView listeners list maintains weak references to listeners to avoid memory leaks

Reviewed By: JoshuaGross

Differential Revision: D29317937

fbshipit-source-id: 4daeb8b5533cccaebcb03acf3d595dfa58de7883
2021-06-25 13:24:01 -07:00
Nick Gerleman 5cb2debbea Add "CellRenderMask" Region Tracking Structure (#31420)
Summary:
A CellRenderMask helps track regions of cells/spacers to render. It's API allows adding ranges of cells, where its otput be an ordered list of contiguous spacer/non-spacer ranges.

The implementation keeps this region list internally, splitting or merging regions when cells are added. This output will be used by the render function of a refactored VirtualizedList.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Added] - Add "CellRenderMask" Region Tracking Structure

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

Test Plan: Validated via UTs.

Reviewed By: lunaleaps

Differential Revision: D28293161

Pulled By: rozele

fbshipit-source-id: a5e4e2144a90387aabe0974650429018440abf67
2021-06-24 07:57:01 -07:00
Samuel Susla d472efbd72 Remove feature flag for promises block guard
Summary:
Changelog: [internal]

Promises block guard is shipped. Let's remove gating.

Reviewed By: RSNara

Differential Revision: D29262010

fbshipit-source-id: c15e033573b11f0a3470b1ddfbef07b6f03ba069
2021-06-24 03:33:05 -07:00
Pieter Vanderwerff 36318b6776 Deploy v0.154.0 to xplat
Reviewed By: gkz

Differential Revision: D29348735

fbshipit-source-id: 148da76969df1b82a3b2ed0862ee269adcff3a10
2021-06-23 20:19:08 -07:00
Danilo Bürger c974cbff04 Allow PlatformColor to work with RCTView border colors (#29728)
Summary:
# See PR
https://github.com/facebook/react-native/pull/29728

# From PR Author
Using `PlatformColor` with border colors doesn't work currently when switching dark mode as the information is lost when converting to `CGColor`. This change keeps the border colors around as `UIColor` so switching to dark mode works.

```ts
<View
  style={{
    borderColor: DynamicColorIOS({ dark: "yellow", light: "red" }),
    borderWidth: 1,
  }}
>
...
</View>
```
This view will start with a red border (assuming light mode when started), but will not change to a yellow border when switching to dark mode. With this PR, the border color will be correctly set to yellow.

## Changelog

[iOS] [Fixed] - Allow PlatformColor to work with border colors

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

Test Plan:
1. Assign a `PlatformColor` or `DynamicColorIOS` to a view border color.
2. Toggle between dark / light mode. See the colors change.

Reviewed By: lunaleaps

Differential Revision: D29268376

Pulled By: p-sun

fbshipit-source-id: 586545b05be0beb0e6e5ace6e3f74b304620ad94
2021-06-23 13:37:22 -07:00
Tim Yung 123d184944 ImageSource: Convert `ImageURISource` to Interface
Summary:
Changes the `ImageURISource` Flow type into an interface.

- This enables both objects and class instances to be subtypes of `ImageURISource`.
- This makes it invalid to spread `ImageURISource` as a type, so `interface X extends ImageURISource` can instead be used.
- This makes it invalid to spread `ImageURISource` as a value, so `getImageSourceProperties(x)` can instead be used.
- This makes it invalid to use `$Exact` with `ImageURISource`.

Changelog:
[General][Changed] - `ImageURISource` Flow type is now an interface instead of an object.

Reviewed By: timrc

Differential Revision: D29323508

fbshipit-source-id: 647c2f9b0bfead6d7e56bdb7108e623cbf8b6c89
2021-06-23 13:15:02 -07:00
Samuel Susla fa3697bd9e Back out "Add option to disable sending scroll events to Paper"
Summary:
Changelog: [internal]

Original commit changeset: fa4d8944ad6b

Not sending onScroll events events to Paper has no effect.

Reviewed By: mdvacca

Differential Revision: D29229662

fbshipit-source-id: b84a2614bfd42c64ca67ca6a1cd9d0a815c11ad0
2021-06-23 02:02:03 -07:00
Peter Argany e83feffeba Back out "Avoid re-encoding images when uploading local files"
Summary:
This was causing an upload error in FB Dating, will need to re-land with the fix.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D29320144

fbshipit-source-id: 5d09dd2171b5696afe89cffa064947f0a0bb413d
2021-06-22 19:18:22 -07:00
Joshua Gross f33e6f08b2 Delete unused struct
Summary:
This struct is no longer used.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D29312925

fbshipit-source-id: b766014ecb7b6c5dc96d54a94d465e104e292f5f
2021-06-22 15:42:01 -07:00
Andrei Shikov 01c3bcdab0 Support string type for commands
Summary:
String type seems to be already supported by codegen, but it was not included in the list for command methods.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D29306740

fbshipit-source-id: 44b267c09f471dc601759ed2f7211a9e0fc1bb90
2021-06-22 15:31:47 -07:00
Kacie Bawiec d4d22fbfb9 React Native sync for revisions c96b78e...568dc35
Summary:
This sync includes the following changes:
- **[43f4cc160](https://github.com/facebook/react/commit/43f4cc160 )**: Fix failing test ([#21697](https://github.com/facebook/react/pull/21697)) //<Dan Abramov>//
- **[d0f348dc1](https://github.com/facebook/react/commit/d0f348dc1 )**: Fix for failed Suspense layout semantics ([#21694](https://github.com/facebook/react/pull/21694)) //<Brian Vaughn>//
- **[bd0a96344](https://github.com/facebook/react/commit/bd0a96344 )**: Throw when `act` is used in production ([#21686](https://github.com/facebook/react/pull/21686)) //<Andrew Clark>//
- **[9343f8720](https://github.com/facebook/react/commit/9343f8720 )**: Use the server src files as entry points for the builds/tests ([#21683](https://github.com/facebook/react/pull/21683)) //<Sebastian Markbåge>//
- **[502f8a2a0](https://github.com/facebook/react/commit/502f8a2a0 )**: [Fizz/Flight] Don't use default args ([#21681](https://github.com/facebook/react/pull/21681)) //<Sebastian Markbåge>//
- **[a8f5e77b9](https://github.com/facebook/react/commit/a8f5e77b9 )**: Remove invokeGuardedCallback from commit phase ([#21666](https://github.com/facebook/react/pull/21666)) //<Dan Abramov>//
- **[dbe3363cc](https://github.com/facebook/react/commit/dbe3363cc )**: [Fizz] Implement Legacy renderToString and renderToNodeStream on top of Fizz ([#21276](https://github.com/facebook/react/pull/21276)) //<Sebastian Markbåge>//
- **[101ea9f55](https://github.com/facebook/react/commit/101ea9f55 )**: Set deletedTreeCleanUpLevel to 3 ([#21679](https://github.com/facebook/react/pull/21679)) //<Dan Abramov>//
- **[1a106bdc2](https://github.com/facebook/react/commit/1a106bdc2 )**: Wrap eventhandle-specific logic in a flag ([#21657](https://github.com/facebook/react/pull/21657)) //<Dan Abramov>//
- **[cb30388d1](https://github.com/facebook/react/commit/cb30388d1 )**: Export React Native `AttributeType` Types ([#21661](https://github.com/facebook/react/pull/21661)) //<Timothy Yung>//
- **[c1536795c](https://github.com/facebook/react/commit/c1536795c )**: Revert "Make enableSuspenseLayoutEffectSemantics static for www ([#21617](https://github.com/facebook/react/pull/21617))" ([#21656](https://github.com/facebook/react/pull/21656)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions c96b78e...568dc35

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D29303157

fbshipit-source-id: 90952885eb2264f4effa04070357b80700bb9be3
2021-06-22 14:29:17 -07:00
Kevin Gozali fb58fa1734 iOS: proxy minimumSize to RCTSurface, but as a noop
Summary:
Previously, RCTRootView added support for minimumSize as a workaround for some initial layout use cases. Going forward, we don't need this anymore. So let's add a proxy property but log an error if anyone calls it.

Changelog: [iOS][Changed] - Proxy minimumSize to RCTSurface as a noop

Reviewed By: JoshuaGross

Differential Revision: D29284227

fbshipit-source-id: 98b2dfc905c6c7e1adc03216e3a1cc3fda0a4133
2021-06-22 13:29:48 -07:00
Luna Wei fc9c326912 Use Animated.event implementation in AnimatedMock
Summary: Changelog: [Internal] - Animated.event from my limited understanding attaches Animated.Values to native views. In terms of animation, Animated.Values are already handled by AnimatedMock to skip interpolation.

Reviewed By: GijsWeterings

Differential Revision: D29241590

fbshipit-source-id: 98650883dad53d6f77dbc398ba0cac903194deca
2021-06-22 08:16:42 -07:00
Samuel Susla f175ff5c04 Remove feature flag for async event beat v2
Summary:
Changelog: [internal]

AsynchronousEventBeatV2 is shipped. Let's remove gating.

Reviewed By: fkgozali

Differential Revision: D29261752

fbshipit-source-id: 844cfc494c077e36945a7fa65f9368c2165d5c8c
2021-06-22 06:21:09 -07:00
Samuel Susla 090f828bdd Remove redundant dependency of runtimescheduler
Summary:
Changelog: [internal]

This dependency is redundant and is causing CircleCI to fail: https://app.circleci.com/pipelines/github/facebook/react-native/9495/workflows/c6002413-bd5f-431f-b23d-c1ee820cbebf/jobs/206781

Reviewed By: ShikaSD

Differential Revision: D29292209

fbshipit-source-id: a974e48300c96669ec041cb145ce57fe5c2a7fe2
2021-06-22 06:18:16 -07:00
Luna Wei 77366cd869 Remove Picker from OSS
Summary: Changelog: [General][Removed] - Remove Picker code from Android

Reviewed By: ShikaSD

Differential Revision: D29123164

fbshipit-source-id: 4471ea5f52885735ead07a656452ed5ef2bff65b
2021-06-21 23:00:42 -07:00
David Vacca 7f117394af Refactor Image to log component stacktraces for images rendering non-fb sources
Summary:
This diff refactors the Image component in order to log the component hierarchy stacktraces for images rendering non-fb sources

changelog: [internal] internal

Reviewed By: yungsters

Differential Revision: D29266451

fbshipit-source-id: 826230b1a18a5809b340ef0767d80a281e20477a
2021-06-21 20:29:27 -07:00
Samuel Susla 130b0f69ee Move RuntimeScheduler initialisation to the start of the runtime
Summary:
Changelog: [internal]

Reland of D29131766 (18165367b0) which had to reverted because it caused binary size regression in instagram.

Size check for `automation_instagram_stablesize_release` and `automation_igtv_release`
{F626711916}

Reviewed By: JoshuaGross

Differential Revision: D29263302

fbshipit-source-id: cc8f5609ebaed9ddf666f7c57cdbf3dbf77a8f78
2021-06-21 16:15:11 -07:00
Luna Wei ad0ccac0d6 Remove Picker from OSS
Summary:
Changelog:
[General][Removed] - Remove Picker/PickerIOS export from react-native and delete JS related code

Reviewed By: kacieb

Differential Revision: D29122947

fbshipit-source-id: 9f754396d1f221fde57ec4dec8e29af598432102
2021-06-21 15:19:09 -07:00
Luna Wei fafd2903f1 Update Moving Box Example
Summary: Changelog: [Internal] - Update expectations on RNTester's Animated Moving Box example. We don't restore defaults for the animated value on unmount. Also adds a Reset option to the example.

Reviewed By: kacieb

Differential Revision: D29143505

fbshipit-source-id: abb1e87530313cfbfe9c4985e651667d28589a67
2021-06-21 10:51:56 -07:00
Joshua Gross 006f5afe12 Guard against unsafe EventEmitter setup and teardown
Summary:
Because of T92179998, T93607943, and T93394807, we are still seeking resolution to tricky crashes wrt the use of EventEmitters.

I believe the recent spike is because of two recent changes: we pass in EventEmitters earlier, during PreAllocation; and we clean them up earlier, during stopSurface, to avoid jsi::~Pointer crashes.

Additionally, the gating previously added around the PreAllocation path was incorrect and led to more nullptrs being passed around as EventEmitters.

To mitigate these issues:

1) I am adding/fixing gating to preallocation and early cleanup paths
2) I am making EventEmitterWrapper more resilient by ensuring EventEmitter is non-null before invoking it.
3) I am making sure that in more cases, we pass a non-null EventEmitter pointer to Java.
4) I am backing out the synchronization in EventEmitterWrapper (java side) as that did not resolve the issue and is a pessimisation

There are older, unchanged paths that could still be passing in nullptr as the EventEmitter (Update and Create). As those have not changed recently, I'm not going to fix those cases and instead, we can now rely on the caller to ensure that the EventEmitter is non-null before calling.

Changelog: [internal]

Differential Revision: D29252806

fbshipit-source-id: 5c68d95fa2465afe45e0083a0685c8c1abf31619
2021-06-19 22:57:12 -07:00