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

25291 Коммитов

Автор SHA1 Сообщение Дата
Jérémy Barbet ed21a3e20f fix(android): build.gradle typo (#34517)
Summary:
- Just a small typo fix

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

[Android] [Fixed] - Typo in build.gradle

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

Test Plan: - Check out the diff changes

Reviewed By: lunaleaps

Differential Revision: D39082272

Pulled By: cipolleschi

fbshipit-source-id: d62938d5a1e6802c6e7f44186adbbfa1a6715cf8
2022-08-27 22:31:06 -07:00
Paige Sun 984ee76ea8 Modularlize RCTBridgeModule.h 2/n - Fix rn-tester CI breakage on RCTBundleManager.h (#34515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34515

Changelog: [Internal]

Reviewed By: mdvacca, GijsWeterings

Differential Revision: D39079572

fbshipit-source-id: 374114a02d8bd07b0ac514db46ee0270c505e82d
2022-08-27 07:08:30 -07:00
Luna Wei c8aafb322e PanResponder
Summary: Changelog: [Internal] - Add Flow type for  PanResponder

Reviewed By: hramos

Differential Revision: D38929791

fbshipit-source-id: b4bb0cab0ae5bb07b89e8cdeb1a0a47c8135b7c6
2022-08-26 19:10:03 -07:00
Luna Wei d68bef105f AccessibilityInfo - make an exact object
Summary: Changelog: [Internal] - Make AccessibilityInfo public type an exact object

Reviewed By: NickGerleman

Differential Revision: D38921820

fbshipit-source-id: 6f264595814a817fb1101788942f9127d9cc85c1
2022-08-26 19:10:03 -07:00
Luna Wei b35b2cc8ca SafeAreaView
Summary: Changelog: [Internal] - Add flow type for SafeAreaView

Reviewed By: cipolleschi

Differential Revision: D38921819

fbshipit-source-id: be4da3c6b1241d5c3a059b7eeb1e539b3a1debde
2022-08-26 19:10:03 -07:00
Paige Sun 4230de0f58 Modularlize RCTBridgeModule.h 1/n - Move RCTBundleManager.h to its own file in ReactInternal target
Summary:
Changelog: [Internal][iOS] Modularlize RCTBridgeModule.h 1/n -  Move RCTBundleManager.h to its own file in ReactInternal target

# Why clean up RCTBridgeModule.h?
Clean up one unnecessary import of RCTBridgeModule.h.

RCTBridgeModule includes a lot of header files, and this header is imported everywhere. The ultimate goal is that files (especially React Native infra files) should only import only what they need and not import the entirely of RCTBridgeModule.h whenever possible.

This way, certain headers that are Bridge-only can be compiled out of the new architecture with a flag.

The other benefit of splitting up the headers like this is that it'll be much easier for developers to navigate between the .h and .mm files.

Reviewed By: philIip

Differential Revision: D38943262

fbshipit-source-id: 90876324de9fae25bf33c7aef820a32d7c6ce2f8
2022-08-26 17:56:51 -07:00
Harrison Spain e653f2fd15 Back out "Anti-alias rounded borders on overflow: hidden views"
Summary:
Changelog:
[Android][Removed] - Anti aliased rounded corners on overflow: hidden views

Differential Revision: D39072689

fbshipit-source-id: 41b01fa67280b7b8a7df61fdb809bb97a75c781b
2022-08-26 15:52:22 -07:00
Gabriel Donadel Dall'Agnol 9ac437f25b feat: Add support for Modal on iOS when Fabric is enabled (#34487)
Summary:
While working on a fix for https://github.com/facebook/react-native/issues/29974 (I have a draft for that already (https://github.com/gabrieldonadel/react-native/pull/16), just waiting for https://github.com/facebook/react-native/pull/34406 to get merged) I noticed that the `KeyboardAvoidingView` tests on RNTester on iOS were not working with Fabric enabled because the `ModalHostView` component was still not implemented. Upon some more investigation, I found this code suggestion from Milker90 (https://github.com/facebook/react-native/issues/33652#issuecomment-1214675790) that enables the Modal component on iOS when Fabric is enabled.

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

## Changelog

[iOS] [Added] - Add support for Modal on iOS when Fabric is enabled

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

Test Plan:
1. With Fabric enabled open the RNTester app and navigate to the Modal page
2. Test the `Modal` component through the sections changing props

https://user-images.githubusercontent.com/11707729/186289099-5223907d-b300-46bf-bfde-73259c29d544.mov

Reviewed By: christophpurrer

Differential Revision: D38981895

Pulled By: cipolleschi

fbshipit-source-id: cd493a8d2035900da2576323bc112e2565df4834
2022-08-26 10:35:53 -07:00
Lorenzo Sciandra 2452c5f16e add 0.69.5 changelog (#34499)
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.69.5

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

Test Plan: N/A

Reviewed By: dmitryrykun

Differential Revision: D39051081

Pulled By: cipolleschi

fbshipit-source-id: 857e24a19a77b85f0593945e6838216ceb5b0f5d
2022-08-26 05:45:35 -07:00
Lulu Wu 31b4a92aa9 Revert D38460203: Migrate JS error handler to MapBuffer
Differential Revision:
D38460203 (e6ef0836c1)

Original commit changeset: 98f6243e31da

Original Phabricator Diff: D38460203 (e6ef0836c1)

fbshipit-source-id: 540a48c807cea7f2898f261b82010da729f3421e
2022-08-26 03:52:57 -07:00
hurali97 cd6a91343e fix: border width top/bottom not matching the border radius (#34362)
Summary:
Fixes https://github.com/facebook/react-native/issues/33950

After analysing the values used for drawing the border specifically the top and bottom values of `mInnerClipTempRectForBorderRadius` weren't matching the needs when it comes to the case of borderTopWidth and borderBottomWidth, when the borderRadius is applied.

Asking for reviews cortinico

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

[Android] [Fixed] - Border width top/bottom not matching the border radius

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

Test Plan:
Tested in a local project, following are the outputs(Details are in the issue attached):

Before:
<img src="https://user-images.githubusercontent.com/47336142/183289227-96b20f86-1507-46f5-a79d-f61457624e8b.png" height="550">

After:
<img src="https://user-images.githubusercontent.com/47336142/183289177-6148df29-f0de-4b99-bdf0-c28a9c7d3ac7.png" height="550">

Reviewed By: hramos

Differential Revision: D38805873

Pulled By: lunaleaps

fbshipit-source-id: 69f8ff9a9caeeaf88d1c76b639271f642c2e7ea2
2022-08-25 21:03:28 -07:00
Luna Wei 8afa04a92f Fix static view config for pointerEvents
Summary: Changelog: [Internal] Add missing PointerEvents to static view config

Reviewed By: RSNara

Differential Revision: D39034349

fbshipit-source-id: a239dc7be15c9085979c8f810238c420de9c7a6f
2022-08-25 20:51:14 -07:00
Gabriel Donadel Dall'Agnol 49c9ccd3f8 feat: Add rows prop to TextInput component (#34488)
Summary:
This adds the Android only `rows` prop to TextInput as requested on https://github.com/facebook/react-native/issues/34424 mapping the existing `numberOfLines` prop to `rows`. This PR also updates the TextInputExample.android on the RNTester in order to facilitate the manual QA of this.

## Changelog

[Android] [Added] - Add rows prop to TextInput component

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

Test Plan:
1. On Android open the RNTester app and navigate to the TextInput page
2. Test the `TextInput` component through the `Fixed number of lines` section

https://user-images.githubusercontent.com/11707729/186300173-7de79799-25b8-48af-99c0-8e3abeae334f.mov

Reviewed By: christophpurrer

Differential Revision: D38981953

Pulled By: cipolleschi

fbshipit-source-id: d4d84b3c0dac7342ba9a65e2491928fbc61ff4f1
2022-08-25 15:54:32 -07:00
fabriziobertoglio1987 0b70b38547 Re-implement accessibilityHint on Android to use AccessibililltyNodeInfo#setToolTipText instead of contentDescription (#34427)
Summary:
https://github.com/facebook/react-native/issues/31056#issuecomment-786349025

>Re-implement accessibilityHint on Android so that rather that concatenate into the contentDescription, it sets the toolTipText property on the AccessibilityNodeInfo (not on the view). This is the closest analog to iOS's hint that Android has, as the text is announced after the contentDescription rather than part of it. It will will not adhere to users preferences on whether they want hints disabled or not, and still has no pause before it like real hints have, but it's far closer than using the contentDescription directly.

fixes https://github.com/facebook/react-native/issues/31056

## Changelog

[Android] [Fixed] - Re-implement accessibilityHint on Android to use AccessibililltyNodeInfo#setToolTipText instead of contentDescription

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

Test Plan: https://user-images.githubusercontent.com/24992535/184837154-5c65dbf1-1031-4d56-ac1e-066af7e08edc.mp4

Reviewed By: christophpurrer

Differential Revision: D38982158

Pulled By: cipolleschi

fbshipit-source-id: 7a616e6df9f83bd21ca02cc26b5918986a1d64f8
2022-08-25 15:37:29 -07:00
Shawn Shihang Wei 04ee52b867 Revert D38938632: Add key to prop conversion errors
Differential Revision:
D38938632 (7909b913ef)

Original commit changeset: 1dc9a544ca67

Original Phabricator Diff: D38938632 (7909b913ef)

fbshipit-source-id: ddfe699ebf2ec7b118079d9ecb9ce77f2bf4a2ac
2022-08-25 15:18:01 -07:00
Kudo Chien 82ceb8c3e3 Only show warning when overwrite existing preprocessor (#34479)
Summary:
from the original design of `StyleSheet.setStyleAttributePreprocessor()` in https://github.com/facebook/react-native/issues/11138, the overwriting warning shows when the existing preprocess is be overwritten.  the behavior changes from https://github.com/facebook/react-native/commit/33b385825c72. This PR revises the logic back to original design.

## Changelog

[Internal] [Fixed] - Show warning only when overwriting existing preprocessor in `StyleSheet.setStyleAttributePreprocessor()`

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

Test Plan:
Unit Test

```
 PASS  Libraries/StyleSheet/__tests__/StyleSheet-test.js
  setStyleAttributePreprocessor
    ✓ should not show warning when set preprocessor first time (2 ms)
    ✓ should show warning when overwrite the preprocessor (1 ms)
```

Reviewed By: dmitryrykun

Differential Revision: D38940676

Pulled By: cipolleschi

fbshipit-source-id: 80cf30fff62f4a02c17f7f42b3260a6011d5fc82
2022-08-25 15:03:32 -07:00
Harrison Spain 7708cdccef Anti-alias rounded borders on overflow: hidden views
Summary:
When a view is rendered with a combination of `overflow: hidden` and `borderRadius: >0`, the `ReactViewGroup` would apply the border radius using Canvas `clipPath`. In Android graphics, clipPath is not an anti-aliased operation and caused aliasing artifacts.

Changing the method to a bitmask using the `PorterDuff` method results in the same functionality, but with hardware accelerated antialiasing.

https://github.com/facebook/react-native/issues/24486

Changelog:
[Android][Change] - Views with overflow: hidden and borderRadius: >0 now render anti-aliased borders.

Reviewed By: javache

Differential Revision: D38914878

fbshipit-source-id: 45ac7e4aece7a76c4216412175e49d3d73b6f391
2022-08-25 14:25:08 -07:00
Vojtech Novak 18542b6ef5 fix: RCTAlertController's UserInterfaceStyle to follow root window (#34218)
Summary:
The motivation of this PR is for the Alert to follow the same style override (`overrideUserInterfaceStyle` being light/dark) as the one used by the root window (`UIApplication.sharedApplication.delegate.window`).

This is something that has worked previously because `RCTPResentedViewController()` was used to present the Alert (the behavior has changed in f319ff321c). With the former approach, the alert would "inherit" the `userInterfaceStyle` of the view controller it was presented within (and that one, in turn, would "inherit" from `UIApplication.sharedApplication.delegate.window`).

With the current approach, the "style inheritance" does not work with the view controller being created [here](f3db6cc527/React/CoreModules/RCTAlertController.m (L24)).

Because this viewcontroller instance does not have where to "inherit" the styling from, the styling might be different from the rest of the app. This PR fixes that.

## Changelog

[iOS] [Fixed] - fix: RCTAlertController's UserInterfaceStyle to follow root window

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

Test Plan:
Instead of

```
self.overrideUserInterfaceStyle = UIApplication.sharedApplication.delegate.window.overrideUserInterfaceStyle;
```

you can do

```
self.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
```

and observe the result. So if the override is set, it'll manifest itself. If it's not set, the value of `UIApplication.sharedApplication.delegate.window.overrideUserInterfaceStyle` will be `UIUserInterfaceStyleUnspecified`, and it'll have no effect.

<details>
  <summary>screenshot</summary>

![Simulator Screen Shot - iPhone 11 - 2022-07-18 at 21 40 06](https://user-images.githubusercontent.com/1566403/179616673-d0e48e07-50b5-41a1-afb7-0aa8f7ec37b5.png)
</details>

Reviewed By: dmitryrykun

Differential Revision: D38660799

Pulled By: cipolleschi

fbshipit-source-id: c979266900e27be7a4732bdb6e9a496906534931
2022-08-25 11:09:10 -07:00
Gabriel Donadel Dall'Agnol be7c50fefd feat: Add support for "Prefer Cross-Fade Transitions" into AccessibilityInfo (#34406)
Summary:
This PR adds `prefersCrossFadeTransitions()` to AccessibilityInfo in order to add support for "Prefer Cross-Fade Transitions", exposing the iOS settings option as proposed here https://github.com/react-native-community/discussions-and-proposals/issues/452.
I believe this would be especially helpful for solving https://github.com/facebook/react-native/issues/31484

#### TODO
- [ ]  Submit react-native-web PR updating AccessibilityInfo documentation.

## Changelog

[iOS] [Added] - Add support for "Prefer Cross-Fade Transitions" into AccessibilityInfo

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

Test Plan:
**On iOS 14+**

1.  Access Settings > "General" > "Accessibility" > "Reduce Motion", enable "Reduce Motion" then enable "Prefer Cross-Fade Transitions".
2. Open the RNTester app and navigate to the Accessibility page

https://user-images.githubusercontent.com/11707729/154588402-7d050858-3c2d-4d86-9585-928b8c66941b.mov

Reviewed By: cipolleschi

Differential Revision: D38711316

Pulled By: makovkastar

fbshipit-source-id: b9965cd4285f1aa0f1fa927080370a22329c2f62
2022-08-25 10:45:15 -07:00
Lulu Wu e6ef0836c1 Migrate JS error handler to MapBuffer
Summary:
Changelog:
[iOS][Changed] Replace Folly with MapBuffer for passing js error data

Reviewed By: sammy-SC

Differential Revision: D38460203

fbshipit-source-id: 98f6243e31da42cc601727545b331392300cee20
2022-08-25 08:55:25 -07:00
Pieter De Baets 7909b913ef Add key to prop conversion errors
Summary:
Improve errors thrown when prop conversion fails by adding the property being converted. Removes the specialization of convertRawProp for std::optional since we can handle that in a fromRawValue specialization instead.

To make this work, we need to remove noexcept from a number of calls. This noexcept behaviour was making these exceptions effectively uncatcheable. The original motivation of D23787492 (57dd48b246) is correct, as we cannot reliably pass on exceptions to JS and assume that the state will be recoverable, so instead we log an error and carry on with the default value available. We should improve how the error gets reported to the user, as it will currently be hidden in logcat.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D38938632

fbshipit-source-id: 1dc9a544ca679463a8aad5cc632bd918f42b15d1
2022-08-25 08:15:06 -07:00
Luna Wei 355568e848 DatePickerIOS
Summary: Changelog: [Internal] Add flow definition for DatePickerIOS

Reviewed By: yungsters

Differential Revision: D38871304

fbshipit-source-id: 3c40be45e3117253b490e85cf96ab250fd579f98
2022-08-25 07:35:09 -07:00
Luna Wei 163171ccab Button
Summary: Changelog: [Internal] - Add a type definition for Button

Reviewed By: NickGerleman

Differential Revision: D38850510

fbshipit-source-id: ffe137d01478d4a641afb85380a27522a058e91f
2022-08-24 15:18:45 -07:00
Luna Wei 6f60c5f3cd Add Flow type for ActivityIndicator
Summary: Changelog: [Internal] - Add a type definition for ActivityIndicator

Reviewed By: NickGerleman

Differential Revision: D38850509

fbshipit-source-id: c3ca50be8fbcec0f0f43b036f8768f4462fa4991
2022-08-24 15:18:45 -07:00
Christoph Purrer 355feafff6 react-native-code-gen Add Union Type support for C++ TurboModules
Summary:
There are cases where we want to pass a union type into a TurboModule method which is handy to restrict certain arguments to a restricted set of values, e.g. restricting quality to ```'low'```, ```high``` or resolution to ```720```, ```1080```.

- We are not generating an ```union``` type in C++ but rather just cast type safe to the corresponding member type.

- We don't support mixed primitive union types at this time, e.g. ```export type ChooseSomething = 'One' | 'Two' | 3 | false;``` does not work.

- We can support mixed object union types such as ... ```export type ChooseObject = {} | {low: string};``` - which need special logic in the C++ TM to correctly parse the resulting jsi::Object

This is for C++ only, Java and ObjC are not supported atm.

Changelog:
[General][Added] - react-native-code-gen Add Union Type support for C++ TurboModules

Reviewed By: javache

Differential Revision: D38919688

fbshipit-source-id: 0fd37545b32b4f2059a8babda62dab4a85de37a9
2022-08-24 14:47:39 -07:00
Marshall Roch f3def13a92 Deploy 0.185.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: bradzacher

Differential Revision: D38886330

fbshipit-source-id: 7b3fa0c4c4ccfffa54770dac0ccd686d4e4753d5
2022-08-24 06:13:47 -07:00
Riccardo Cipolleschi ff7f5a332f Update the cache keys to fix Hermes (#34491)
Summary:
This PR bumps the Hermes cache keys because they got corrupted due to some sync delay between Hermes and React Native.

## Changelog

[iOS] [Fixed] - CI broken due to Hermes Commit

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

Test Plan: CI should be green

Reviewed By: dmitryrykun

Differential Revision: D38976132

Pulled By: cipolleschi

fbshipit-source-id: 16df11ede8947d8376d316b126eefcf0177d16de
2022-08-24 05:16:33 -07:00
Pieter De Baets dd48509185 Unbreak LAYOUT_ANIMATION_VERBOSE_LOGGING
Summary:
Noticed this logging was broken when enabling the flag.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D38616851

fbshipit-source-id: acf0ab75918b389586cb713c2edf5a6bf83ee7a2
2022-08-24 05:09:12 -07:00
Gabriel Donadel Dall'Agnol de75a7a22e feat: Add readOnly prop to TextInput component (#34444)
Summary:
This adds the `readOnly` prop to  TextInput as requested on https://github.com/facebook/react-native/issues/34424 mapping the existing `editable` prop to `readOnly` so that `readOnly={false}` maps to `editable={true}` and `readOnly={true}` represents ` editable={false}`. This PR also updates the TextInputExample on the RNTest in order to facilitate the manual QA of this.

## Changelog

[General] [Added] - Add readOnly prop to TextInput component

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

Test Plan:
1. Open the RNTester app and navigate to the TextInput page
2. Test the `TextInput` component through the `Editable and Read only` section

https://user-images.githubusercontent.com/11707729/185295132-036443c8-1d5e-4567-a15e-5f1173cb0526.mov

Reviewed By: lunaleaps

Differential Revision: D38912786

Pulled By: necolas

fbshipit-source-id: faeb59ed8695732be682ec55406a2de0cb7e619a
2022-08-23 18:50:51 -07:00
Vincent Riemer 32af9e6e8d Fix buttons property value for non-hoverable pointers
Summary:
Changelog: [iOS][Internal] - Fix buttons property value for non-hoverable pointers

The previous diff ensured that on iOS you could run through the entirety of the non-hoverable pointer event attributes test but that also revealed some failing tests related to the `buttons` property when using a non-hoverable pointer. This diff fixes that by ensuring that we only forward the result of the `buttonMask` to `buttons` when the pointer is a mouse, and assume that it is an emulated left click otherwise.

Reviewed By: lunaleaps

Differential Revision: D38914239

fbshipit-source-id: c573e934d0e9c0ac2af4945dc5360840ddc87d4d
2022-08-23 12:54:48 -07:00
Lulu Wu c4ddaa8fdb Reland D38460202 and fix tests
Summary: Reland D38460202 (e874e5facb) and fix test errors.

Reviewed By: RSNara

Differential Revision: D38846070

fbshipit-source-id: 05a889aabe7e25225ff7464f69900c459c82dd47
2022-08-23 12:14:07 -07:00
Samuel Susla b3e8c0fbf9 Flush animation queue directly in useAnimatedProps
Summary:
changelog: [internal]

Call flushQueue directly from useAnimatedProps to avoid mismatch between `NativeAnimatedHelper.API.setWaitingForIdentifier` and `NativeAnimatedHelper.API.unsetWaitingForIdentifier`

Previously, animation queue only got called if every `setWaitingForIdentifier` call was matched by `unsetWaitingForIdentifier`. If an error is thrown, this is not the case and they get out of sync. WHen they get out of sync, they never recover and animation queue is never flushedddddd.

Reviewed By: yungsters

Differential Revision: D38938858

fbshipit-source-id: c38fdef05cc70ce274b8e16114ffe49cc2dcb9b3
2022-08-23 08:53:59 -07:00
Neil Dhar 3bae268782 Add external ArrayBuffers to JSI (#793)
Summary:
X-link: https://github.com/facebook/hermes/pull/793

Add a JSI API for constructing `ArrayBuffer`s from a user provided
`jsi::MutableBuffer`.

Changelog: [General][Added] Added ability to construct ArrayBuffers from existing memory buffers.

Reviewed By: jpporto

Differential Revision: D37744467

fbshipit-source-id: 9d9ece00d1dbde341846c45fa30c935b5fa81e9a
2022-08-23 08:35:34 -07:00
Riccardo Cipolleschi 49a235484e Reverting shallow checkout in circleci because its breaking CI (#34480)
Summary:
As per title, the shallow checkout was breaking some workflows, so we are reverting it

## Changelog

[General] [Changed] - Revert shallow checkout

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

Test Plan: CI should be green

Reviewed By: dmitryrykun

Differential Revision: D38940528

Pulled By: cipolleschi

fbshipit-source-id: 691faf2749911278923ca2d42c974e5307a06261
2022-08-23 06:43:01 -07:00
Nick Gerleman ef77a4218d Stop special-casing Android 11+ from large form-factor `keyboardShouldPersistTaps` behavior
Summary:
ScrollView has special-case logic to dismiss keyboard on tap, controlled via the `keyboardShouldPersistTaps` property. The first click does not propagate to children of the scrollview if the tap causes the keyboard to be dismissed. This behavior is motivated by a soft keyboard on phones which takes away space from the viewport.

ScrollView historically determined if a soft-keyboard was open via querying if there was a focused TextInput. This meant that clicks to a ScrollView would be eaten, even on form factors using phsyical keyboards.

A couple years ago I added https://github.com/facebook/react-native/pull/30374 to only eat clicks when keyboard events have indicated that a soft keyboard is present. I special-cased Android out of the change, because of platform issues with its reliability of keyboard events.

After D38500859 (1e48274223) rolls out we can start to remove that special-casing, of devices which report "android" for Platform.OS.

Reviewed By: javache

Differential Revision: D38528887

fbshipit-source-id: a745b478b18abe4ef32cbdd8a14ca6dfdb5e738f
2022-08-23 05:46:58 -07:00
Nick Gerleman fd1e82a10f Do not eat taps/clicks in ScrollView when soft-keyboard is detached from viewport
Summary:
If currently focused on a TextInput, clicking an item in a ScrollView takes two clicks.

This is because of `keyboardShouldPersistTaps`, which will fire despite a lack of keyboard events on Android due to special-casing.

This behavior is jarring in scenarios like VR where the soft keyboard is detached from the application. This change avoids eating taps, in this case, where a soft keyboard is open but not inset.

Reviewed By: genkikondo

Differential Revision: D38529237

fbshipit-source-id: a10c5dbf04e6288e0e9e0c805215054bc883339f
2022-08-23 02:25:11 -07:00
Ravi Shah f5f6896e61 Revert D37055069: Add key to prop conversion errors
Differential Revision:
D37055069 (80d626a66a)

Original commit changeset: 8ce121a9b187

Original Phabricator Diff: D37055069 (80d626a66a)

fbshipit-source-id: b364e29f6c2d75c19392f705910d753a328e798d
2022-08-22 15:58:37 -07:00
Héctor Ramos 5f0fac572d Bump Xcode version to 13.4.1 (#34472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34472

Use Xcode 13.4.1 in Circle CI.

Changelog: [Internal]

Reviewed By: dmitryrykun

Differential Revision: D38880494

fbshipit-source-id: 2e24b411c448ed6de7099416122bf3c97ddcf985
2022-08-22 14:37:41 -07:00
Pieter De Baets 80d626a66a Add key to prop conversion errors
Summary:
Improve errors thrown when prop conversion fails by adding the property being converted. Removes the specialization of `convertRawProp` for `std::optional` since we can handle that in a `fromRawValue` specialization instead.

To make this work, we need to remove `noexcept` from a number of calls. This noexcept behaviour was making these exceptions effectively uncatcheable. The original motivation of D23787492 (57dd48b246) is correct, as we cannot reliably pass on exceptions to JS and assume that the state will be recoverable, so instead we log an error and carry on with the default value available. We should improve how the error gets reported to the user, as it will currently be hidden in logcat.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D37055069

fbshipit-source-id: 8ce121a9b187f068d3ab790c6fae66d53e6338d2
2022-08-22 09:57:10 -07:00
Jérémy Barbet 0a59c284a9 - Typo in AppDelegate.mm (#34462)
Summary:
- Fix a typo in the word "feture" (-> "feature")

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

[iOS] [Fixed] - Typo in AppDelegate.mm

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

Test Plan: - Read the diff change

Reviewed By: dmitryrykun

Differential Revision: D38900680

Pulled By: cipolleschi

fbshipit-source-id: cdc5fb183cb7f5485a553dde7ea381f27f83e903
2022-08-22 03:03:37 -07:00
Dmitry Rykun e0a71fc7b5 Cleanup temporary files after source map generation.
Summary:
Changelog:
[iOS][Fixed] - When source maps are enabled, clean up temporary files from the build directory. Reduces bundle size by at least 1MB.

Reviewed By: cipolleschi

Differential Revision: D38866158

fbshipit-source-id: 0f46faf4e767bb7417b24f283fbe19cfa022941a
2022-08-19 10:23:22 -07:00
Dmitry Rykun 61106ac680 Fix react-native-xcode.sh build script
Summary:
This diff fixes USE_HERMES checks.

Changelog
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh.

Reviewed By: cipolleschi

Differential Revision: D38704558

fbshipit-source-id: 90a8648fd1094fcf9ab085f37efce9b811e707bc
2022-08-19 09:50:42 -07:00
Michał Pierzchała 0c2fe96998 Upgrade RN CLI to v9.0.0 and Metro to 0.72.1 (#34447)
Summary:
Stable v9 of the CLI, no major changes compared to previous alpha releases.

Metro release notes: https://github.com/facebook/metro/releases/tag/v0.72.1

cc kelset huntie

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

[General] [Changed] - Upgrade RN CLI to v9.0.0, Metro to 0.72.1

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

Test Plan: CI

Reviewed By: huntie

Differential Revision: D38838499

Pulled By: robhogan

fbshipit-source-id: 552e2e708270557e2b74c1a3b8d3325774fb0c48
2022-08-19 09:13:55 -07:00
Tomek Zawadzki 50b1270298 Remove unused variable `NODE_MODULES_DIR` from `build.gradle` in app template (#34459)
Summary:
This PR removes unused variable `NODE_MODULES_DIR` passed from `build.gradle` to `CMakeLists.txt` which causes the following CMake warnings to appear in the logs:

```
> Task :app:configureCMakeDebug[arm64-v8a]
C/C++: debug|arm64-v8a :CMake Warning:
C/C++: debug|arm64-v8a :  Manually-specified variables were not used by the project:
C/C++: debug|arm64-v8a :    NODE_MODULES_DIR
```

First I changed the value of `NODE_MODULES_DIR` to some non-existent path (i.e. `-DNODE_MODULES_DIR=/foo/bar`) to confirm that the variable is indeed unused. Then I completely removed it from `arguments` and the CMake warning disappeared.

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

[Android] [Fixed] - Removed unused variable `NODE_MODULES_DIR` from `build.gradle` in app template

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

Test Plan:
1. Create a new RN 0.70.0-rc.3 app from template with `npx react-native@next init RN070RC3 --version 0.70.0-rc.3`
2. Set `newArchEnabled=true` in `settings.gradle`
3. Open `android` directory in Android Studio
4. Run Gradle Sync
5. Build the app
6. Search for `NODE_MODULES_DIR` in the logs
7. Notice the CMake warning
8. Remove the line from this PR
9. Build the app again
10. Search for `NODE_MODULES_DIR` in the logs
11. Confirm there are no occurrences

Reviewed By: neildhar

Differential Revision: D38864127

Pulled By: cortinico

fbshipit-source-id: b41440edcdba63945e3b08cef897a250686c13ba
2022-08-19 08:12:01 -07:00
Breadman Da e142de0928 Make CircleCI run shallow clones of the React Native repo (#34455)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34455

# Changelog
[General][Fixed] - Fix shallow cloning break on main.

Introduced in [#34438](https://github.com/facebook/react-native/pull/34438)
Failed to fix in [#34453](https://github.com/facebook/react-native/pull/34453)

Reviewed By: cipolleschi

Differential Revision: D38859731

fbshipit-source-id: 8c5f5ee04ff0f08a6a3af1266ef399a36fde9ae8
2022-08-19 04:42:47 -07:00
Breadman Da fb936dfffb Make CircleCI run shallow clones of the React Native repo (#34453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34453

# Changelog
[General][Fixed] - Fix shallow cloning break on main.

Introduced in [#34438](https://github.com/facebook/react-native/pull/34438)

Reviewed By: cipolleschi

Differential Revision: D38858746

fbshipit-source-id: c632bad0dd4ed646065a6daa838035dc9ee5caf2
2022-08-19 03:15:55 -07:00
Nicola Corti bc84ec42ee Blacklist sdks/hermes from Metro resolution (#34452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34452

This will unblock the RN `test_android` CI Job as currently two versions
of `hermes-parser` are picked up during package resolution.

Changelog:
[Internal] [Fixed] - Blacklist sdks/hermes from Metro resolution

Reviewed By: cipolleschi

Differential Revision: D38856931

fbshipit-source-id: 49d941f762ba0ef953c5c42b0ca13ac1c74b5ba5
2022-08-19 02:32:02 -07:00
throwaway-fishery 674783574a Make CircleCI run shallow clones of the React Native repo (#34438)
Summary:
## Changelog
[General][Changed] - Change all instance of `checkout` to shallow checkout with a default `--depth` value of 1.
Keep booleans fully lowercase `true`, `false`.

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

Reviewed By: cipolleschi

Differential Revision: D38784506

Pulled By: throwaway-fishery

fbshipit-source-id: 679f25219d9099da1cb0c5b6cff6db6f48ab6f2e
2022-08-19 01:39:48 -07:00
Luna Wei d3b5cb00b9 Add a pseudo flow declaration for AccessibilityInfo
Summary: Changelog: [Internal] - Create a type declaration for AccsesibilityInfo for clearer signal when our public API types change

Reviewed By: yungsters

Differential Revision: D38712552

fbshipit-source-id: cc7c727d41fb03ca714cb05fd10dc32038374fd0
2022-08-18 17:56:00 -07:00
Vincent Riemer 7ccb292540 Apply pointer entering/leaving tracking to touch-initiated pointer events
Summary:
Changelog: [iOS][Internal] - Apply pointer entering/leaving tracking to touch-initiated pointer events

This diff takes the refactoring done in the previous diff in this stack and applies it to the pointer events which are converted from discrete touch events. In addition this adds a check when an ActiveTouch is created to see if the pointer in question was hovering before the touch started or not, which is stored and leveraged once the touch is lifted to determine if we should treat the pointer as leaving the screen entirely or not.

Reviewed By: lunaleaps

Differential Revision: D38762330

fbshipit-source-id: 08452783e01bf5944c57b94a292805b2d69d4384
2022-08-18 16:04:06 -07:00