Commit Graph

38536 Commits

Author SHA1 Message Date
Lorenzo Sciandra ac206aa814 removing unused Detox (#32907)
Summary:
I realized while checking for a few other things that Detox's presence in the repo is actually not really motivated - since Jul 2020 the few tests that were using it were disabled https://github.com/facebook/react-native/commit/120ff7ccdebebdf814e478259ba1e4a8ef6f513e never to be reactivated since.

I noticed this while attempting to updating the Detox version to latest... which made me notice that the repo is still on a 16.x version while latest is 19.x (there are like 10 pages of releases between them: https://github.com/wix/Detox/releases) and I came to the conclusion that it's probably easier to just remove the old dusty code and eventually reintroduce it in the future if we ever consider it necessary.

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

[General] [Removed] - Removing Detox from CI.

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

Test Plan: CI - nothing breaks.

Reviewed By: lunaleaps

Differential Revision: D33623199

Pulled By: cortinico

fbshipit-source-id: 7d8d133629b62b66959b309f2ca21852d396c9fc
2022-01-20 08:51:47 -08:00
Gabriel Donadel Dall'Agnol b276b736f8 fix: Screen reader event name on RNTester AccessibilityExample (#32926)
Summary:
Fix an issue in the AccessibilityExample on RNTester where the `Screen Reader` item would listen for the `reduceMotionChanged` event instead of the `screenReaderChanged` event

## Changelog

[General] [Fixed] - Fix screen reader event name on RNTester AccessibilityExample

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

Test Plan:
1. Build iOS app
2. Navigate to the Accessibility page
3. Switch over to settings and change VoiceOver at `Settings>Accessibility>VoiceOver>VoiceOver`
4. Switch back to the app and see the results

https://user-images.githubusercontent.com/11707729/150266745-6a9eb547-00a7-4b94-bf19-b8d6e6f76122.mp4

Reviewed By: kacieb

Differential Revision: D33681780

Pulled By: cortinico

fbshipit-source-id: fbd4f3d9ef63997f2b4a40afc8a5adfe6172e525
2022-01-20 08:38:01 -08:00
Oliver Sartun f45889ef95 Bump SoLoader to 0.10.3 (#32922)
Summary:
Closes https://github.com/facebook/react-native/issues/32325
Closes https://github.com/facebook/react-native/issues/32735

There are various crashes related to the SoLoader (example: https://github.com/facebook/react-native/issues/32325, https://github.com/facebook/react-native/issues/32735, https://github.com/facebook/SoLoader/issues/74, https://github.com/facebook/SoLoader/issues/84) which [seem to get resolved by](https://github.com/facebook/react-native/issues/32325#issuecomment-965889224) upgrading to [v0.10.3](https://github.com/facebook/SoLoader/releases/tag/v0.10.3).

The upgrade was already done in [`…/soloader/BUCK`](https://github.com/facebook/react-native/blob/main/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK#L28-L44) (https://github.com/facebook/react-native/commit/58532ed52fa2dabe1d4595ba6f2e079940190174) but the `SO_LOADER_VERSION` gradle variable was still on v0.10.1.

## Changelog

[Android] [Changed] - Bump Soloader to 0.10.3

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

Test Plan: This is my very first RN PR and unfortunately I have troubles running the tests. The [proposed tests](https://github.com/facebook/react-native/wiki/Tests) use Buck anyway and the Buck file was already upgraded so those tests wouldn't change presumably. And I can't get the [`rn-tester`](https://github.com/facebook/react-native/tree/main/packages/rn-tester) to run.

Reviewed By: christophpurrer

Differential Revision: D33664774

Pulled By: ShikaSD

fbshipit-source-id: 6be5ddaa688657c1bbb42b3a9892bcf3cb168132
2022-01-20 06:21:06 -08:00
Nicola Corti 574a773f8f Do not remove libjscexecutor.so from release builds (#32932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32932

As the title says, we dont' want to remove `libjscexecutor.so` when
baking release builds and having JSC enable as this leads to instacrashes.

Fixes #32928
Fixes #32927

Changelog:
[Android] [Fixed] - Do not remove libjscexecutor.so from release builds

Reviewed By: ShikaSD

Differential Revision: D33681932

fbshipit-source-id: 5b59fd1fb76c80c191198d65c916bbbd9232c75b
2022-01-20 04:20:14 -08:00
CodemodService FBSourceClangFormatLinterBot ceb01db25f Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D33677079

fbshipit-source-id: 997b73bebdcf83e09138bddc4bce257d0740e874
2022-01-20 04:09:51 -08:00
Eric Rozell 4a227ce2ab Add platformConfig to native animations and nodes (#32736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32736

The ability to pass an additional property bag to further configure NativeAnimated is useful for a few reasons, e.g., experimentation with multiple implementations of the NativeAnimated module.

The specific use case this solves is on react-native-windows, where there are two underlying animation graph options, one "optimized" animation graph that uses UI.Composition, and another similar to the approach to iOS and Android that uses a frame rendering callback.

The platform configuration can be supplied to the animation node when `useNativeDriver` is set to `true`, and we pass the platform configuration object to the connected AnimatedValue and all it's children.

Changelog:
[General][Added] - Option to supply `platformConfig` to NativeAnimated

Reviewed By: yungsters

Differential Revision: D32988285

fbshipit-source-id: ab8a7bbf197573fc9e9a4737c255f124321295ac
2022-01-19 19:45:21 -08:00
Paige Sun 5fa3807c34 Fix SnapshotExample in rn-tester
Summary:
Changelog: [General][Fix] Fix SnapshotExample in rn-tester

Before this diff, the <Image> has no height. You can tell because the backgroundColor of <Image> is black but it doesn't show up on this surface.

Reviewed By: RSNara

Differential Revision: D33649085

fbshipit-source-id: 1b0fa0a82bce29923afee000d0828cbd90845abf
2022-01-19 16:28:40 -08:00
Brad Zacher c0e489b729 remove duplicate class members
Summary:
Flow currently allows duplicate members on classes. At runtime the "last" member wins out and all previous values for the member are discarded.
This diff manually removes duplicate members, and fixes resulting flow errors by converting methods to arrow function properties.

Reviewed By: pieterv

Differential Revision: D33664966

fbshipit-source-id: 0f712ac96af4df593c0918fcbadd70624ddde4a6
2022-01-19 15:35:57 -08:00
Paige Sun b13e41d98e Migrate ScreenshotManager from NativeModule to TurboModule
Summary:
Changelog: [JS] Migrate ScreenshotManager from NativeModule to TurboModule. Fix SnapshotExample in rn-tester.

`const ScreenshotManager = NativeModules.ScreenshotManager;` makes all of RNTesterAppRoute render blank in Bridgeless, because we throw a jsi::JSError when JS calls `NativeModule.get` while in Bridgeless.

Reviewed By: RSNara

Differential Revision: D33640935

fbshipit-source-id: 124a3b43e1440a7ca0071c95c4388350d2e4affa
2022-01-19 14:19:13 -08:00
Liam Jones 9d2df5b8ae Fix for iOS displaying a RedBox for LogBox handled errors (#32641)
Summary:
Fix for iOS displaying a RedBox for LogBox handled errors, this has been happening since RN 0.65 (in 64.2 and earlier, if it was handled by LogBox then it wouldn't trigger RedBox)

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

## Changelog

[iOS] [Fixed] - Stop RedBox from appearing for LogBox handled errors

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

Test Plan: Manually tested. Seems to fix things (and RedBox still displays for things like 'Could not connect to development server') but I would appreciate RSNara or someone else who is more familiar with the code to confirm that the original switch was a mistake and not something deliberately changed.

Reviewed By: christophpurrer

Differential Revision: D33661481

Pulled By: cortinico

fbshipit-source-id: c9c262adb3f977ae3f13beb9575d3eaa2445f663
2022-01-19 12:17:03 -08:00
Janic Duplessis 3a07dcf81e Allow passing ReadableNativeMap/Array to push/put methods (#32910)
Summary:
This allow adding ReadableNativeArray/Map to a WritableNativeArray/Map. There is no reason why this can't be allowed, the types were actually updated in https://github.com/facebook/react-native/commit/1a2937151b8d36e8741ef9d4fbe7d2ebf65cb775#diff-d1dc45892b3ba242aed9a1bf7219d2838fae8c7a654c402ba70bc4b100149624, but the assertion remains.

## 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] - Allow passing ReadableNativeMap/Array to push/put methods

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

Test Plan: Tested that RN tester builds and run correctly on android.

Reviewed By: christophpurrer

Differential Revision: D33646510

Pulled By: yungsters

fbshipit-source-id: 878f1994b73ed1cf830966ab296b9c0325630da1
2022-01-19 11:17:00 -08:00
Michaël De Boey c279a186fa chore(deps): update jscodeshift (#32905)
Summary:
This will include https://github.com/facebook/jscodeshift/pull/473, which will fix the problems with the `colors` package (see https://github.com/facebook/jscodeshift/issues/474)

## 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] [Security] - update `jscodeshift`

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D33623209

Pulled By: yungsters

fbshipit-source-id: 38f366cb2e004cca55cd921c61a9e88439c8e784
2022-01-19 10:54:15 -08:00
Nicola Corti 450967938a Do not include Facebook license on users codegen'd code (#32840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32840

Closes #31516
I've cherry-picked the original PR that had merge conficts + updated all
the headers as the one for the TurboModule generators were not handled.

Original Commit Message from acoates

The codegen generates a Facebook copyright notice at the top of the generated files.

While this might make sense on the core files, this codegen will be run on external components too.
The notice also refers to a LICENSE file in the root of this project, which might not be there if this is run on another project.
I did a quick look at some of the codegen that we ship within windows dev tools, and it looks like we normally just have comments
saying the file was codegen'd and so the file shouldn't be manually edited.
Open to suggestions on what the comment header should say.

Changelog:
[General] [Changed] - Do not include Facebook license on users codegen'd code

Reviewed By: ShikaSD

Differential Revision: D33455176

fbshipit-source-id: b247e72efb242e79d99b388c80e4126633e5234d
2022-01-19 08:07:35 -08:00
Sam Kline c8d823b9bd Reset ReactInstanceManager state on failure to allow retries (#32901)
Summary:
This fixes https://github.com/facebook/react-native/issues/32898 by reseting ReactInstanceManager state when `createReactContext` throws. By resetting the state, we allow future attempts at creating the React context.

## Changelog

[Android] [Fixed] - Fixed empty screen after retrying a BundleDownloader failure in dev mode

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

Test Plan: Go through the steps to reproduce listed in https://github.com/facebook/react-native/issues/32898 and see that the React Native application starts.

Reviewed By: cortinico

Differential Revision: D33634178

Pulled By: ShikaSD

fbshipit-source-id: e54d12d5f33c9c7c0ca213113871b88c2f1dc261
2022-01-19 05:06:18 -08:00
Pieter De Baets 3addafa525 Support constructing UIEdgeInsets with single value
Summary:
This is only required in the old renderer, as in Fabric the parsing behaviour is shared across platforms (https://github.com/facebook/react-native/blob/main/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L264). JS changes are following in D33453327.

Changelog: [iOS][Fixed] Enable hitSlop to be set using a single number.

Reviewed By: philIip

Differential Revision: D33453326

fbshipit-source-id: f15a4fd1d26dcac6f40b064be1a8266051b6aedf
2022-01-19 03:08:31 -08:00
Asaf Korem a46a99e120 fix(iOS): remove alert's window when call to hide. (#32833)
Summary:
Resolves this issue: https://github.com/facebook/react-native/issues/32304.
**NOTE:** This PR is based on a prior PR for this fix: https://github.com/facebook/react-native/pull/32305, I've co-authorized its creator for this change (paddlefish).

Without this change, calling to hide an alert, leaves a `UIWindow` that blocks user interactions with the screen.

The correct way to remove a `UIWindow` in iOS is to set its hidden property to `YES`. Also, it is required to remove all references to the window (the associated `windowScene` for example) and ARC will automatically free this `UIWindow`.

The line after this change, set the `_alertWindow` reference to `nil`, but the window is already associated with a scene (see the screenshots from [this PR](https://github.com/facebook/react-native/pull/32305#discussion_r720521707)). So we also need to remove the `windowScene` from that window, as recommended by Apple: https://developer.apple.com/documentation/uikit/uiwindowscene/3198091-windows.
>To remove the window from the current scene, or move it to a different scene, change the value of the window's windowScene property.

## 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] [Fixed] - remove alert's window when call to `hide`.

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

Test Plan: See https://github.com/facebook/react-native/pull/32305

Reviewed By: hramos

Differential Revision: D33460430

Pulled By: lunaleaps

fbshipit-source-id: b13c2c7ee6404f1e1c787265bc4af8a31005bcf1
2022-01-19 01:09:17 -08:00
Gabriel Donadel Dall'Agnol 43e07a4941 chore(dangerfile): Auto-label pull requests opened against release branches (#32917)
Summary:
## Summary

Update dangerfile in order auto-label pull requests opened against release branches

Closes https://github.com/facebook/react-native/issues/32692

## 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] -  Auto-label pull requests opened against release branches

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

Test Plan:
As I don't have admin rights to this repo I tested this script on [a PR in my fork](https://github.com/gabrieldonadel/react-native/pull/1) by running

```
 yarn danger pr https://github.com/gabrieldonadel/react-native/pull/1
```

https://user-images.githubusercontent.com/11707729/150026370-4cce7831-c4ee-4269-b6a8-646f965826c5.mov

As you can see in the video once I run the script it automatically adds the label

Reviewed By: lunaleaps

Differential Revision: D33647174

Pulled By: yungsters

fbshipit-source-id: a7e7cab458b4cb7ff2cf318c4df1e9fb5d91a9f7
2022-01-18 23:53:04 -08:00
Andrei Shikov 0a5481924c React Native sync for revisions fe905f1...51947a1
Summary:
This sync includes the following changes:
- **[51947a14b](https://github.com/facebook/react/commit/51947a14b )**: Refactored how React/DevTools log Timeline performance data ([#23102](https://github.com/facebook/react/pull/23102)) //<Brian Vaughn>//
- **[c09596cc6](https://github.com/facebook/react/commit/c09596cc6 )**: Add RN_FB bundles for react-is ([#23101](https://github.com/facebook/react/pull/23101)) //<Moti Zilberman>//
- **[9a7e6bf0d](https://github.com/facebook/react/commit/9a7e6bf0d )**: Add --no-show-signature to "git show" commands ([#23038](https://github.com/facebook/react/pull/23038)) //<Stefan Sundin>//
- **[2f26eb85d](https://github.com/facebook/react/commit/2f26eb85d )**: Add exports field to react-refresh's package.json ([#23087](https://github.com/facebook/react/pull/23087)) //<Gray Zhang>//
- **[811634762](https://github.com/facebook/react/commit/811634762 )**: add enableTransitionTracing feature flag ([#23079](https://github.com/facebook/react/pull/23079)) //<Luna Ruan>//

Changelog:
[General][Changed] - React Native sync for revisions fe905f1...51947a1

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii, kacieb

Differential Revision: D33634332

fbshipit-source-id: a83b663a122a2cb79225ca33a007fe1774728c03
2022-01-18 20:09:38 -08:00
Paige Sun 7f69325e94 (Easy) Remove usage of already-removed CrashyCrash from RNTester
Summary:
`const {CrashyCrash} = NativeModules` makes all of RNTesterAppRoute render blank in Bridgeless.

Remove this test example because the CrashyCrash has not existed since 2019, and no similar module exists in open source. [[github]](https://github.com/facebook/react-native/commit/8ec7e0966cf83ed29a39aab47c686bc60a124983)

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D33644122

fbshipit-source-id: ed10e8bf8ea9af9d5904afc2a7d9c2b3b3606978
2022-01-18 18:51:21 -08:00
Andrei Shikov b173bf3c0e Minor MapBuffer renames for consistency
Summary:
Rename `_header` to `header_` to align with the C++ naming scheme we use.
Rename `readKey` to `readUnsignedShort` as purpose of the method have changed.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D33637127

fbshipit-source-id: a82f4d6c1b753b21e0567fbe919af98e4c78105d
2022-01-18 18:00:07 -08:00
Joshua Gross 2151d11527 Fix T110060790
Summary:
In the case of T110060790, there is a JavaScript crash that causes RN teardown to race with a ScrollView event being emitted, which ends up being reported as the "real" cause of the crash.

This is not correct, and it's better to just ignore this case. If there's no EventDispatcher, it means something has gone wrong (usually teardown) before, RN is in an inconsistent state, and we should
not crash here or report here.

Changelog: [Android][Fixed] Fix crash from ScrollView that occurs while reporting an error from JS

Reviewed By: mdvacca

Differential Revision: D33644692

fbshipit-source-id: 41c3defde795b804239cc8401c8aff71d017d59d
2022-01-18 16:15:37 -08:00
Pieter De Baets 08e76772fe Avoid repeated value read in SubtractionAnimatedNode
Summary:
Minor optimization, but spotted this while reviewing the implementation for D33622997

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33622996

fbshipit-source-id: 8712753803fc46e6a046d50f77454a813e4a641a
2022-01-18 13:53:43 -08:00
Pieter De Baets b2105711a0 Support Animated.event extracting values from array
Summary:
`onPointerMove` events get dispatched with an `offset: [x, y]` attribute (API is not yet available in OSS, so subject to change), but `EventAnimationDriver` in RN Android is not able to extract values with such keys (even though the equivalent JS implementation does allow it).

(TODO: verify iOS behaviour)

Changelog:
[General][Added] - Animated.event can be used to extract values with numeric keys from native events

Reviewed By: mdvacca

Differential Revision: D32531117

fbshipit-source-id: 918a5443c5d8f5f8200d86bb67f84e8bc175c1d3
2022-01-18 13:53:43 -08:00
Andrei Shikov c338fff521 Cast MapBuffer bytes to struct to read header
Summary:
The struct is copied directly to the buffer, so it is safe to read it back.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D33624036

fbshipit-source-id: 7ee2b28b815690ab471832c0c622a075b5dd7d78
2022-01-18 08:04:54 -08:00
Andrei Shikov 5b489d5f95 Use vector for dynamic data in MapBufferBuilder
Summary:
Replaces dynamic manually managed array with a vector of bytes, removing the need for managing memory manually.

This approach is a little bit slower than before, as vector is allocating memory more conservatively. This can be improved in the future by providing an estimate for the data size.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D33611759

fbshipit-source-id: a0e5e57c4e413206a9f891cd5630ecc9088a9bf7
2022-01-17 13:15:49 -08:00
Andrei Shikov b1ef4405ee Use struct for building mapbuffer buckets
Summary:
Instead of copying integer values into key/value data array, this implementation keeps a structured vector of `Bucket` structs (which is sized to be serialized later).

This approach provides multiple benefits to modify and access buckets (e.g. sort them based on the key, allowing for out of order inserts (D33611758))

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D33601231

fbshipit-source-id: 62ace1374936cb504836d6eae672e909ea404e3f
2022-01-17 13:15:49 -08:00
Gabriel Donadel Dall'Agnol 0cc80b4d0c fix: KeyboardAvoidingView _updateBottomIfNecessary typo (#32894)
Summary:
While working on a fix for https://github.com/facebook/react-native/issues/29974 I notice that the `_updateBottomIfNecessary` function inside `KeyboardAvoidingView` was misspelled, so I decided to open a PR fixing it.

## Changelog

[General] [Fixed] - Fix typo in _updateBottomIfNecessary function on KeyboardAvoidingView component

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

Test Plan: Shouldn't require much testing as this is just renaming a private function of `KeyboardAvoidingView`

Reviewed By: philIip

Differential Revision: D33620554

Pulled By: cortinico

fbshipit-source-id: 69b8969bef09cf58b9b1c8a9154dc52686187f8a
2022-01-17 11:36:57 -08:00
Andrei Shikov a054379a54 Remove short conversions in MapBuffer
Summary:
MapBuffer uses unsigned short in C++, but Java doesn't really have a type that represents that. That means that MapBuffer would be limited to max 32768 values instead of 65536, which doesn't make much sense as a limitation.
Considering weird (and usually not performant) handling of short values in Java in general, this change replaces them with ints, converting keys from short when needed with `key & 0xFFFF`.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D33595308

fbshipit-source-id: a7adde8a207bb4aa1d81d367ab5d7b41ace2e291
2022-01-17 11:13:15 -08:00
Andrei Shikov ead669524e Check if the allocated views set for exists for surface on mount
Summary:
Adds a check to verify that we are not trying to insert a new view id into a non-existent set.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D33621031

fbshipit-source-id: 8468af69bea250a70d656789ea819c39b55a9de6
2022-01-17 06:32:37 -08:00
Andrei Shikov 0b48ef7ca8 Add more complex perf test for the mapbuffer
Summary:
Benchmarks performance/correctness of mapbuffer with several different types of data

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33608299

fbshipit-source-id: 81b1e195aecac60ad1cc3ca416d1cf7b09feab32
2022-01-16 23:07:40 -08:00
Andrei Shikov ea712f825a Use reference when copying strings into mapbuffer
Summary:
This method can produce unnecessary copy of the string, replacing it with reference to optimize.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33607765

fbshipit-source-id: e04eddffec063c0c8e173bfdf690e7b8e1050525
2022-01-16 23:07:40 -08:00
Ramanpreet Nara 6b42bcc1f4 Fix NVC for RCTModalHostView
Summary:
## iOS Failure
```
 LOG  SVC RCTModalHostView Invalid
 LOG  {
  "missing": {},
  "unexpected": {
    "validAttributes": {
      "statusBarTranslucent": true,
      "hardwareAccelerated": true,
      "animated": true
    }
  },
  "unequal": {}
}
```

Reviewed By: sshic

Differential Revision: D33409398

fbshipit-source-id: 4651878207d0dca1a559fef2191f7538217c093a
2022-01-14 16:31:50 -08:00
Ramanpreet Nara 28f5abc717 Fix NVC for RCTSlider
Summary:
## Android Failures
```
LOG  SVC RCTSlider Invalid
 LOG  {
  "missing": {
    "directEventTypes": {
      "topSlidingComplete": {
        "registrationName": "onSlidingComplete"
      }
    }
  },
  "unexpected": {
    "bubblingEventTypes": {
      "paperValueChange": {
        "phasedRegistrationNames": {
          "captured": "onValueChangeCapture",
          "bubbled": "onValueChange"
        }
      },
      "topValueChange": {
        "phasedRegistrationNames": {
          "captured": "onValueChangeCapture",
          "bubbled": "onValueChange"
        }
      }
    },
    "directEventTypes": {
      "paperSlidingComplete": {
        "registrationName": "onSlidingComplete"
      }
    },
    "validAttributes": {
      "disabled": true,
      "maximumTrackImage": {
        "process": "[Function resolveAssetSource]"
      },
      "minimumTrackImage": {
        "process": "[Function resolveAssetSource]"
      },
      "thumbImage": {
        "process": "[Function resolveAssetSource]"
      },
      "trackImage": {
        "process": "[Function resolveAssetSource]"
      }
    }
  },
  "unequal": {}
}
```

## iOS Failures
```
 LOG  SVC RCTSlider Invalid
 LOG  {
  "missing": {},
  "unexpected": {
    "bubblingEventTypes": {
      "paperValueChange": {
        "phasedRegistrationNames": {
          "captured": "onValueChangeCapture",
          "bubbled": "onValueChange"
        }
      }
    },
    "directEventTypes": {
      "paperSlidingComplete": {
        "registrationName": "onSlidingComplete"
      }
    },
    "validAttributes": {
      "enabled": true
    }
  },
  "unequal": []
}
```

Reviewed By: yungsters

Differential Revision: D33409401

fbshipit-source-id: 519b6e35246e6671dbea1f374435d92937d96c1d
2022-01-14 16:31:50 -08:00
Ramanpreet Nara 4ac209ca1d Fix NVC for RCTMap
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33354718

fbshipit-source-id: 76f837a552c043be75933eea018e0db8ee1ae238
2022-01-14 16:31:50 -08:00
Nicola Corti ffb2c8c2f4 Removed .github/stale.yml as we're now using the Github Action
Summary:
As the title says, probot/stale is really unpredictable and happens to spam
a lot of issues, making hard for us to follow up on those that are really
relevant.

We're now using actions/stale and this file is no longer necessary.

Changelog:
[Internal] [Changed] - Removed .github/stale.yml as we're now using the Github Action

Reviewed By: mdvacca

Differential Revision: D33585581

fbshipit-source-id: 02a645ca98985edcee22d24c1ad4c0b7056fc15d
2022-01-14 13:47:42 -08:00
Paige Sun 5e07347948 6/6 Style: Improve flow typing for UIManagerInjection
Summary: Changelog: [JS] Style: Improve flow typing for UIManagerInjection for static view configs

Reviewed By: yungsters

Differential Revision: D33522890

fbshipit-source-id: 4b0d4da4932473e2316abf25b00896c33f285b63
2022-01-14 13:44:57 -08:00
Marshall Roch 66dc211436 truncate JSTimers errors array instead of making it nullable
Summary:
instead of `errors: ?Array<Error>` and setting it back to `null` to clear errors, which Flow is not very happy with, we can make it always an array and truncate it with `errors.length = 0`.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D33584184

fbshipit-source-id: 81b424e69e60203c645bafbac12177ffcdc0c6ef
2022-01-14 09:06:56 -08:00
Andrei Shikov 3cf0291008 Configure plugin repositories to use Gradle Portal last
Summary:
Gradle Plugin Portal proxies jcenter which is quite unstable these days. This change updates plugin repositories to look into maven central and google first and use gradle plugin repo only as a fallback.

Changelog: [Internal] - Prioritize maven central for Gradle plugins

Reviewed By: cortinico

Differential Revision: D33550827

fbshipit-source-id: b436b05b0fd07865b56dd3e442d8399678dfff85
2022-01-13 06:02:44 -08:00
Nicola Corti 72d949e254 Bump gradle-plugin to 0.0.4
Summary:
I'm bumping the Gradle Plugin to the latest stable. That's needed as the newest
plugin now specifies a Maven `group` and can leverage implicit dependency substitution.

Changelog:
[Internal] [Changed] - Bump gradle-plugin to 0.0.4

Reviewed By: ShikaSD

Differential Revision: D33530286

fbshipit-source-id: 904f0a6585b468322f611ed82c57cee7025305d7
2022-01-12 09:38:14 -08:00
Andrei Shikov f33892081a Cleanup ReadableMapBuffer
Summary:
Cleans up `ReadableMapBuffer` APIs and migrates to use `std::vector` instead of raw pointer array.

Also uses `fbjni` utility to allocate the bytes instead of making manual JNI calls.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D33513027

fbshipit-source-id: afe7d320d12830503de4c9994117d849f0b25245
2022-01-12 08:13:32 -08:00
Andrei Shikov aaff15c2c8 Use std::vector to manage MapBuffer storage
Summary:
Replaces raw array pointer inside `MapBuffer` with `std::vector`, which is more conventional "safer" way of storing dynamically sized arrays.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33512115

fbshipit-source-id: d875a2240f7938fd35c4c3ae0e7e91dc7456ff32
2022-01-12 08:13:32 -08:00
Moti Zilberman efc56b2790 Move react-shallow-renderer from devDependencies to dependencies
Summary:
React Native includes a `ReactNativeTestTools` file that imports `react-shallow-renderer`. This file is used by Jest tests. Since this file might be consumed by tests outside of the RN repo, the dependency should be promoted to `dependencies` to ensure it is actually present when RN is installed from npm.

Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D33475662

fbshipit-source-id: 8068294a8b6cade17754699c49a2dfe6d45d86de
2022-01-12 06:03:47 -08:00
Lorenzo Sciandra 37bd9793d5 add 0.67 changelog entry (#32529)
Summary:
Draft PR that adds the changelog for 0.67. Generated via the changelog-generator script from 0.66.1 to 0.67-rc0, then updated up to 0.67-rc2, then to latest current (0.67.0-rc.6)

This is the new version of https://github.com/react-native-community/releases/pull/255. To make sure to not lose the feedback on the script on that PR, it has been [recorded here](https://github.com/react-native-community/releases/issues/257).

This PR should be fairly cleaned up compared to its counterpart, but please give it a read 👀 to make sure the entries are correct. The empty sections are currently still in place just in case some new entries should have to be added there.

This will only be published & merged once 0.67.0 is ready/almost ready to go.

## 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] [Changed] - Add changelog for 0.67

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

Test Plan: N/A

Reviewed By: lunaleaps, cortinico

Differential Revision: D33532931

Pulled By: GijsWeterings

fbshipit-source-id: b8cbbbea5cf6489a04009f047ce500df62a66767
2022-01-12 02:36:40 -08:00
Moses DeJong 5baf6875f7 TurboModules: use weakSelf for block sent to main thread
Summary:
TurboModules: use weakSelf for block sent to main thread.

Changelog:
[iOS][Fixed] - Use weakSelf in objc block instead of self.

Reviewed By: RSNara

Differential Revision: D33488938

fbshipit-source-id: d03c98fb59fbd1fc4b67686251ebec541e5d3e6c
2022-01-11 23:21:51 -08:00
Ramanpreet Nara 0ee66889e0 Fix SVC for AndroidHorizontalScrollView
Summary:
## Failure
```
 LOG  {
  "missing": {
    "validAttributes": {
      "borderBottomLeftRadius": true,
      "borderRightColor": {
        "process": "[Function processColor]"
      },
      "borderRadius": true,
      "borderLeftColor": {
        "process": "[Function processColor]"
      },
      "borderColor": {
        "process": "[Function processColor]"
      },
      "borderTopRightRadius": true,
      "borderBottomColor": {
        "process": "[Function processColor]"
      },
      "borderTopColor": {
        "process": "[Function processColor]"
      },
      "borderStyle": true,
      "borderBottomRightRadius": true,
      "borderTopLeftRadius": true,
      "removeClippedSubviews": true
    }
  },
  "unexpected": {},
  "unequal": []
}
```

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33341777

fbshipit-source-id: c44661411e690b4536d9e979b79f34e200c3720b
2022-01-11 14:22:15 -08:00
Ramanpreet Nara 5bc7b02fc7 Fix SVC for AndroidHorizontalScrollContentView
Summary:
## Failure
```
 LOG  SVC AndroidHorizontalScrollContentView Invalid
 LOG  {
  "missing": {
    "validAttributes": {
      "removeClippedSubviews": true
    }
  },
  "unexpected": {},
  "unequal": []
}
```

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D33341774

fbshipit-source-id: 8f287ba00252f8456ad642eaedf38fa3aa2a11ff
2022-01-11 14:22:15 -08:00
Ramanpreet Nara fcf01b8c7a Fix SVC for RCTImageView
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33341778

fbshipit-source-id: fb51664706febce570808b6018e98637d5f0d42a
2022-01-11 14:22:15 -08:00
Ramanpreet Nara 067bcb5325 Fix SVC for RCT{Multiline,Singleline}TextInput
Summary:
See title.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33341775

fbshipit-source-id: be1c876375b1106d51e871805c23d345906b4631
2022-01-11 14:22:14 -08:00
Ramanpreet Nara 9022849505 Fix SVC for RCTScrollView
Summary:
## Failure
```
 LOG  SVC RCTScrollView Invalid
 LOG  {
  "missing": {
    "validAttributes": {
      "borderBottomLeftRadius": true,
      "borderRightColor": {
        "process": "[Function processColor]"
      },
      "borderRadius": true,
      "borderLeftColor": {
        "process": "[Function processColor]"
      },
      "borderColor": {
        "process": "[Function processColor]"
      },
      "borderTopRightRadius": true,
      "borderBottomColor": {
        "process": "[Function processColor]"
      },
      "borderTopColor": {
        "process": "[Function processColor]"
      },
      "borderStyle": true,
      "borderBottomRightRadius": true,
      "borderTopLeftRadius": true,
      "removeClippedSubviews": true
    }
  },
  "unexpected": {
    "directEventTypes": {
      "topScrollToTop": {
        "registrationName": "onScrollToTop"
      }
    },
    "validAttributes": {
      "alwaysBounceHorizontal": true,
      "alwaysBounceVertical": true,
      "automaticallyAdjustContentInsets": true,
      "automaticallyAdjustKeyboardInsets": true,
      "automaticallyAdjustsScrollIndicatorInsets": true,
      "bounces": true,
      "bouncesZoom": true,
      "canCancelContentTouches": true,
      "centerContent": true,
      "contentInset": {
        "diff": "[Function pointsDiffer]"
      },
      "contentInsetAdjustmentBehavior": true,
      "directionalLockEnabled": true,
      "indicatorStyle": true,
      "inverted": true,
      "keyboardDismissMode": true,
      "maintainVisibleContentPosition": true,
      "maximumZoomScale": true,
      "minimumZoomScale": true,
      "onMomentumScrollBegin": true,
      "onMomentumScrollEnd": true,
      "onScroll": true,
      "onScrollBeginDrag": true,
      "onScrollEndDrag": true,
      "onScrollToTop": true,
      "pinchGestureEnabled": true,
      "scrollEventThrottle": true,
      "scrollIndicatorInsets": {
        "diff": "[Function pointsDiffer]"
      },
      "scrollToOverflowEnabled": true,
      "scrollsToTop": true,
      "showsHorizontalScrollIndicator": true,
      "zoomScale": true
    }
  },
  "unequal": []
}
```

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32225225

fbshipit-source-id: 0f236256dcbcab4fe66165b5e36df2b5f785d94e
2022-01-11 14:22:14 -08:00
Ramanpreet Nara 76613ec4cd Generate one Bubbling/Direct event entry when custom top name is provided
Summary:
## Context
Inside native ViewConfigs, events are declared using these bubbling/direct EventType maps:
```
{
  uiViewClassName: '...',
  bubblingEventTypes: {
    topFoo: {
      registrationName: "onFoo"
    }
  },
  directEventTypes: {},
  validAttributes: {
  },
}
```

**Pattern:** Note that the top name (i.e: topFoo) is just the registration name (i.e: onFoo) but with "on" replaced with "top".

On Android, registration names and top names don't have to follow this pattern. The top name can be **anything.** See ReactionsDockView:

https://www.internalfb.com/code/fbsource/[c430d46ed69a03a9d9f40cefa335a6d8bb92f8ec]/fbandroid/java/com/facebook/feedback/reactions/ui/overlay/react/ReactionsDockViewManager.java?lines=26-28%2C32-34%2C38

Here, ReactionDismissedEvent.EVENT_NAME is "topDismiss"

https://www.internalfb.com/code/fbsource/[c9f92314a5c46e561a831100dab82164808b05d0]/fbandroid/java/com/facebook/feedback/reactions/ui/overlay/react/ReactionDismissedEvent.java?lines=10-11%2C26

And so to provide you the flexibility to specify a custom topName, the codegen supports a customTopName in the direct/bubbling event types:

```
onDismissWithFeedbackReaction: DirectEventHandler<Event, 'topDismiss'>,
```

This generates the two bubbling event type entries in ReactionsDockView:
```
{
  uiViewClassName: '...',
  bubblingEventTypes: {
    // custom top name
    topDismiss: {
      registrationName: "onDismissWithFeedbackReaction"
    },
    // what the top name should actually be
    topDismissWithFeedbackReaction: {
      registrationName: "onDismissWithFeedbackReaction"
    }
  },
  directEventTypes: {},
  validAttributes: {
  },
}
```

**The Problem:** The entry created for "topDismissWithFeedbackReaction" is not necessary. This additional entry creates a discrepancy between ReactionsDockView's static ViewConfig and native ViewConfig. Therefore, this diff removes the second unnecessary entry.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D33418730

fbshipit-source-id: 3988ff6906ad1b2e1ef988a19c64d1e042381ab1
2022-01-11 14:22:14 -08:00