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

26694 Коммитов

Автор SHA1 Сообщение Дата
Ruslan Lesiutin 91397d4247 refactor(bump-all-updated-packages): support force-bump to next minor version of the package (#35810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35810

Changelog: [Internal]

`bump-all-updated-packages` script now supports `release-branch-cutoff` argument

If this argument is provided, the script will bump each public package to next minor version

Updated [wiki](https://github.com/facebook/react-native/wiki/Release-and-its-automated-processes) with relevant information about how to use it

Reviewed By: cortinico

Differential Revision: D42455329

fbshipit-source-id: a40d2f5dc356f22d3182da3a118c6383b634817d
2023-01-12 03:35:41 -08:00
David f47b5b8b5d Exclude `react-native-flipper` when `NO_FLIPPER=1` to prevent iOS build fail (#35686)
Summary:
- Flipper issue: https://github.com/facebook/flipper/issues/3995#issuecomment-1333863641

iOS build fail with an error:

```sh
node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPlugin.h:9:9: 'FlipperKit/FlipperConnection.h' file not found

#import <FlipperKit/FlipperConnection.h>
```

## Changelog

[IOS] [FIXED] - Exclude `react-native-flipper` when `NO_FLIPPER=1` to prevent iOS build fail

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

Test Plan:
```sh
npx react-native init RN0710RC5 --version 0.71.0-rc.5
cd RN0710RC5
yarn add react-native-flipper
NO_FLIPPER=1 pod install --project-directory=ios
yarn ios # will fail
```

Reviewed By: rshest

Differential Revision: D42368444

Pulled By: cipolleschi

fbshipit-source-id: a8614ccadb98970ebae15d8743136fa60ead318c
2023-01-12 02:53:28 -08:00
Luna Wei ac54a5ba2b Remove SafeAreaView flow declaration
Summary: Changelog: [Internal] Remove flow declaration for SafeAreaView in preparation for TS generation

Reviewed By: christophpurrer

Differential Revision: D42349686

fbshipit-source-id: b792313b18f3804d8c68955afd918ec8cbb0b80f
2023-01-11 14:29:37 -08:00
Luna Wei da415398bd Remove AccessibilityInfo.flow
Summary: Changelog: [Internal] Remove flow declaration in preparation for TS generation

Reviewed By: christophpurrer

Differential Revision: D42350837

fbshipit-source-id: 05e80226931cdea04e7f14ddf2876297ab31ada7
2023-01-11 14:29:37 -08:00
Luna Wei 69716ad9ff Make PanResponder an ES Module
Summary: Changelog: [General][Changed] ESM PanResponder

Reviewed By: christophpurrer

Differential Revision: D42272981

fbshipit-source-id: 1191e8f3425aed024b77365da1ad42f44099e94a
2023-01-11 14:29:37 -08:00
Nicola Corti 573734f4e6 Remove PAT_TOKEN and PAT_USERNAME from CircleCI (#35808)
Summary:
This is a cleanup change needed after the CircleCI security incident.
We should be using the `Authorization: Bearer` header to trigger `rn-diff-purge` instead of using username & password authentication.

Source: https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event

## Changelog

[INTERNAL] - Remove PAT_TOKEN and PAT_USERNAME from CircleCI

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

Test Plan:
I've tested this locally with:

```
curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \
                    -H "Accept: application/vnd.github.v3+json" \
                    -H "Authorization: Bearer [...]" \
                    -d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"test.test.test\" }}"
```

and the run was succesfully fired by react-native-bot:
https://github.com/react-native-community/rn-diff-purge/actions/runs/3894079133

Reviewed By: lunaleaps

Differential Revision: D42456065

Pulled By: cortinico

fbshipit-source-id: 475e9ca80760522cc08bad37d85c5af6727922d3
2023-01-11 10:58:25 -08:00
Adnan-Bacic 7324c22ff9 add-coverage-to-gitignore (#35809)
Summary:
There is a large amount of autogenerated files in the coverage folder when running `jest --coverage`.

This folder is also in .gitignore for react projects created with `create-react-app`

Originally suggested here: https://github.com/react-native-community/discussions-and-proposals/discussions/569

## Changelog

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

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

[GENERAL] [ADDED] - Added "coverage" folder generated på `jest --coverage` to .gitignore

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

Test Plan:
1. cd template
2. yarn
3. yarn test --coverage

Im not sure why many of the files in the template folder have an underscore(_) in the filenames instead of a dot(.). When creating a react-native project they have a dot. So if you run the above commands, the coverage folder will not be ignored since its not in `.gitingore` but in `_gitignore`. However, if you temporarily create a `.gitignore` file, you will see that the coverage folder is ignored.

4. Temporarily create `.gitignore` file to verify that coverage folder is ignored

Reviewed By: cortinico

Differential Revision: D42454560

Pulled By: jacdebug

fbshipit-source-id: 0be007d3ba3dde47814c0ce0fb8b0ff9f67d637b
2023-01-11 10:13:15 -08:00
Ruslan Lesiutin 4d8ba7b9fd refactor(scripts/monorepo/tests): moved related tests to scripts/monorepo/__tests__
Summary:
Changelog: [Internal]
just a small cleanup, moved all tests related to monorepo scripts under `/scripts/monorepo`

Reviewed By: cortinico

Differential Revision: D42308455

fbshipit-source-id: 7743a2af1381ff748556c15b89cf980f8f907674
2023-01-10 13:23:06 -08:00
Ruslan Lesiutin ec28c5bbaa feat(react-native-github): a script to automate patch version bumping of packages (#35767)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35767

Changelog: [Internal]

Introducing a script, which can be used to identify all packages inside `/packages`, which contain any changes after the last time its version was changed

How it works step by step:

```
check that no git changes are present

for each package:
    if package is private -> skip

    grep id of the last commit that changed package
    grep id of the last commit that changed version of the package

    if these ids are different:
        bump package patch version

commit changes if required
```

Can be executed only in git environment and by running: `node ./scripts/bump-all-updated-packages`

 ---

Also adding a separate script `align-package-versions.js`, which can be used to update versions of packages inside consumer packages

```
check that no git changes are present

for each package x:
   for each package y:
       if y has x as dependency:
           validate that y uses the latest version of x

if some changes were made:
   run yarn
```

 ---

Q: Why `run_yarn` step was removed from CircleCI flow?
A: For *-stable branches, there are no yarn workspaces and all packages are specified as direct dependencies, so if we update `react-native/assets-registry` to the next version, we won't be able to run `yarn` for react-native root package, because updated version is not yet published to npm

To avoid this, we first need publish new versions and then update them in consumer packages

 ---
The final flow:
1. Developer uses `node ./scripts/bump-all-updated-packages` to bump versions of all updated packages.
2. Commit created from step 1 being merged or directly pushed to `main` or `*-stable` branches
3. A workflow from CircleCI publishes all updated versions to npm
4. Developer can use `align-package-versions.js` script to create required changes to align all packages versions

Reviewed By: cortinico

Differential Revision: D42295344

fbshipit-source-id: 54b667adb3ee5f28d19ee9c7991570451549aac2
2023-01-10 13:23:06 -08:00
Kudo Chien a80cf96fc8 Add jsinspector prefab target (#35796)
Summary:
react-native-v8 requires the `jsinspector` for its js inspector feature. this pr adds the `jsinspector` to the prefab target list.

## Changelog

[ANDROID][ADDED] - Add `jsinspector` to the prefab target

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

Test Plan:
```
$ ./gradlew :ReactAndroid:installArchives

# check prefab files in aar

$ unzip -l android/com/facebook/react/react-android/1000.0.0/react-android-1000.0.0-release.aar | grep 'prefab\/modules\/jsinspector'
$ unzip -l android/com/facebook/react/react-android/1000.0.0/react-android-1000.0.0-debug.aar | grep 'prefab\/modules\/jsinspector'
```

Reviewed By: cipolleschi

Differential Revision: D42430272

Pulled By: cortinico

fbshipit-source-id: fd9a02fd9c33cf5d349e1a79da6f78267196efc8
2023-01-10 09:44:49 -08:00
Riccardo Cipolleschi 88a1b8e18d Use FileMock and DirMock instead of Monkey Patching (#35792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35792

This Diff fixes a problem we have when running Ruby tests.

The previous approach was monkey-patching the Ruby File and Dir classes to override some behaviours we needed during tests. However, these classes are also used by the test runners to properly read and run the tests, therefore when the tests were failing, the stream weren't closed properly and we received the wrong errors.

This problem was also preventing us from adopting other Ruby tools like SimpleCov to compute code coverage.

## Changelog:
[internal] - refactor Ruby tests not to monkey patch Dir and File

Reviewed By: dmytrorykun

Differential Revision: D42414717

fbshipit-source-id: 879b9928da1a083ebf9c81b1f510eaa039376042
2023-01-10 06:43:39 -08:00
Nick Gerleman 8bef1b345b Remove "YG_ENABLE_EVENTS" Preprocessor Definition
Summary:
This is always enabled internally, so we should just turn it on everywhere.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D42406509

fbshipit-source-id: c9cdd4fcf907d66cd276e0aec608a2e7db7ca5fb
2023-01-09 13:59:19 -08:00
Jonathan Lehman 9e0cb5a5ba Fix Hermes warnings/errors from stricter compiler settings in Horizon
Summary:
Changelog: [Internal][Fixed]
Fixed strict compiler errors and warnings

Reviewed By: mattbfb

Differential Revision: D42217295

fbshipit-source-id: 0943a4f6f5607f9499c7c92d6627877260d749fb
2023-01-09 09:58:55 -08:00
Ruslan Lesiutin 0ff7b7fac2 refactor(react-native-github): move DatePickerIOS to internal (#35366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35366

# Changelog:
[JS][Removed] - removed DatePickerIOS module
[iOS][Removed] - removed DatePickerIOS module

Reviewed By: lunaleaps

Differential Revision: D41163591

fbshipit-source-id: fda31d6f3a5d7a9ca3e50ae3b4817e7deb22819c
2023-01-09 08:53:29 -08:00
Nicola Corti 97e844fad0 Update fingerprint for SSH deploy key (#35791)
Summary:
Rotating a private SSH key we had left to rotate.

## Changelog

[INTERNAL] - Update fingerprint for SSH deploy key

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

Test Plan: n/a

Reviewed By: cipolleschi

Differential Revision: D42413025

Pulled By: cortinico

fbshipit-source-id: 571f304e8cc2dad19c41e5413ed3c7d4c078ba60
2023-01-09 04:34:41 -08:00
Nick Gerleman e55277c331 Import "Fix percent absolute position and size calcuate different with web" behind experimental feature (#1028) (#1201)
Summary:
Fixes https://github.com/facebook/yoga/issues/850

https://github.com/facebook/yoga/issues/850 describes a conformance issue where positioning of an absolute child using percentages is not calculated against the correct box size.

This takes the fix for that in https://github.com/facebook/yoga/pull/1028, regenerates tests, and fixes tests so that the experimental feature can be enabled. Goal is to run this as an experiment internally to see if we can enable by default.

Changelog:
[Internal]

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

Reviewed By: yungsters

Differential Revision: D42282358

Pulled By: NickGerleman

fbshipit-source-id: 57c0dd9b0f1c47cb9335ff6e13d44b4646e5fa58
2023-01-08 13:41:27 -08:00
Ruslan Lesiutin ac66512eb3 Revert D41069547: Multisect successfully blamed D40984397 for test or build failures (#35789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35789

Changelog: [Internal]

This diff is reverting D41069547 (fee9510b2d) D41062668 (4c40014d43) D40984397 (05968d16e1)
D40984397 (05968d16e1) has been identified to be causing the following test or build failures:

We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.

allow-large-files

Differential Revision: D42371475

fbshipit-source-id: daa01c9215811c397f5cef958fd4620f36295b60
2023-01-06 13:06:17 -08:00
Nishan 5a912ccc09 fix: margin auto conversion in fabric (#35635)
Summary:
Auto margin is not working as expected in fabric views. Below snippet results in different outputs in fabric and non-fabric runtime.

```jsx
<View style={{ backgroundColor: "black", width: "100%", height: "100%" }}>
  <View style={{ marginLeft: "auto", width: 100, height: 100, backgroundColor: "pink" }} />
</View>
```
### Current Result | Expected Result

<div style="display: flex;">
<img width="100" alt="Screenshot 2022-12-14 at 11 00 22 AM" src="https://user-images.githubusercontent.com/23293248/207513912-633910e2-cf92-4f50-b839-c5abfa8041fb.png">

<img width="100" alt="Screenshot 2022-12-14 at 10 55 31 AM" src="https://user-images.githubusercontent.com/23293248/207513196-94650c60-ffe5-4475-9a95-2a59f8f0e9d9.png">
</div>

## Issue

This issue doesn't happen on non-fabric as it uses [YGNodeStyleSetMarginAuto](9f9111bd7b/ReactCommon/yoga/yoga/Yoga.cpp (L749)) to set the auto margins. In fabric, it uses the [convert function](2a15f91902/ReactCommon/react/renderer/components/view/conversions.h (L375)). The change in this PR can affect some other styles e.g. padding, borders. We could also create a different setter just for margins.

## Changelog

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

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [FIXED] - margin auto style conversion in fabric

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

Test Plan:
- Test above snippet in fabric and non fabric runtime.

- I think we should have test cases for RN + layouts. Maybe we can use something like https://github.com/FormidableLabs/react-native-owl

Reviewed By: sammy-SC

Differential Revision: D42080908

Pulled By: NickGerleman

fbshipit-source-id: 6715c292fc40d82c425d79867099d8a6a3663dba
2023-01-06 10:13:00 -08:00
Nicola Corti 44cb07b40a Remove unused .netrc file from CircleCI (#35785)
Summary:
Removing a stale configuration that was configuring username/password before publishing to NPM. This is effectively unused + the Github Token there is invalid therefore can be removed.

## Changelog

[INTERNAL] - Remove unused .netrc file from CircleCI

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

Test Plan: n/a

Reviewed By: cipolleschi

Differential Revision: D42385163

Pulled By: cortinico

fbshipit-source-id: 0dbbf44459d59f792da4221d6100800a2f4efda2
2023-01-06 07:19:02 -08:00
Gabriel Donadel Dall'Agnol 4ae4984094 feat: Add logical border radius implementation (#35572)
Summary:
This PR implements logical border-radius as requested on https://github.com/facebook/react-native/issues/34425. This implementation includes the addition of the following style properties

- `borderEndEndRadius`, equivalent to `borderBottomEndRadius`.
- `borderEndStartRadius`, equivalent to `borderBottomStartRadius`.
- `borderStartEndRadius`, equivalent to `borderTopEndRadius`.
- `borderStartStartRadius`, equivalent to `borderTopStartRadius`.

## Changelog

[GENERAL] [ADDED] - Add logical border-radius implementation

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

Test Plan:
1. Open the RNTester app and navigate to the `RTLExample` page
2. Test the new style properties through the `Logical Border Radii Start/End` section

https://user-images.githubusercontent.com/11707729/206623732-6d542347-93f9-40da-be97-f7dcd5f66ca9.mov

Reviewed By: necolas

Differential Revision: D42002043

Pulled By: NickGerleman

fbshipit-source-id: a0aa9783c280398b437aeb7a00c6eb3f767657a5
2023-01-06 06:00:03 -08:00
Lorenzo Blasa 66927ec3aa Bump Flipper to 0.174.0 (#35777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35777

As Flipper version is a bit old, let's bump it to the latest stable: 0.174.0.

This is a follow-up from D41492705 (db3ac93001).

At the time, it wasn't possible to update to the latest stable Flipper as crashes were observed due to NDK mismatch.

allow-large-files

Changelog:
[iOS] [Changed] - Bump Flipper to 0.174.0

Reviewed By: cortinico, cipolleschi

Differential Revision: D42345736

fbshipit-source-id: 501e068aebfc25f6a50332391a7940aa9eec6fd6
2023-01-06 02:28:27 -08:00
Ruslan Shestopalyuk 7252c66292 Optimize size of an ViewProps instance by reducing enum storage sizes
Summary:
[Changelog][Internal]

The diff changes underlying storage types used by different enums that are used in ViewProps data structure, together with some eventual field rearranging to reduce padding overhead.

This **shaves off 128 bytes** from each `ViewProps` instance, which is **a ~10% improvement**.

Given that an average RN app may have thousands of shadow tree nodes, and correspondingly `ViewProps` instances in flight (e.g. Oculus Store has 2-3K of them nominally), the overall memory win is about **300K+** for this change only. Plus slightly better cache locality, which never a bad thing either.

Reviewed By: mdvacca

Differential Revision: D42372127

fbshipit-source-id: d3a832af2b2e89f50a5b8e04d24d0df92869ea4d
2023-01-05 23:35:56 -08:00
Joshua Selbo 9cc31ce5f9 Redo: [androidx] Remove legacy-support-core-ui" (#35782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35782

Changelog: [Internal]

Reviewed By: hick209

Differential Revision: D42369915

fbshipit-source-id: 5c6745deb6db84d488fa8d70e9f07c46c3962333
2023-01-05 15:46:03 -08:00
Nick Tourte 7222926e0c Revert D42369492: Add basic tests for JsErrorHandler
Differential Revision:
D42369492 (68c0b063ed)

Original commit changeset: 3d984ac90dae

Original Phabricator Diff: D42369492 (68c0b063ed)

fbshipit-source-id: d0b21d62855a168451386b769b85913975efb303
2023-01-05 13:25:50 -08:00
Moti Zilberman 68c0b063ed Add basic tests for JsErrorHandler (#35781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35781

Changelog: [Internal]

Adds basic unit tests for `JsErrorHandler`. The tests contain TODO comments where incorrect behaviour is exposed.

Reviewed By: RSNara

Differential Revision: D42369492

fbshipit-source-id: 3d984ac90dae295e4b85f3512bff362b121ec97e
2023-01-05 12:38:41 -08:00
Moti Zilberman 5009ad33a6 Make MapBuffer movable
Summary:
Changelog: [Internal]

`MapBuffer` already has a move constructor but did not have a move assignment operator prior to this diff. Changing this requires removing the `const` qualifier from `bytes_`, but this seems OK in practice as it will still be treated as `const` by all the `const` accessors on `MapBuffer`.

Reviewed By: RSNara

Differential Revision: D42369493

fbshipit-source-id: f0fcce533d8e0883dcf85d7262620ea77f377644
2023-01-05 12:38:41 -08:00
fabriziobertoglio1987 dcc5dbe562 adding togglebutton to attributedstring conversions (#35632)
Summary:
fixes runtime error `E/ReactNativeJNI(24576): Unsupported AccessibilityRole value: togglebutton` when using togglebutton accessibilityRole with Text. Related da899c0cc4

## Changelog

[GENERAL] [FIXED] - Fixes crash when using togglebutton accessibilityRole with Text

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

Reviewed By: lunaleaps

Differential Revision: D42360628

Pulled By: rshest

fbshipit-source-id: afca8f540d972e1df0c390b3dff8875f07804e97
2023-01-05 12:11:46 -08:00
Moti Zilberman 4c911a2dec Filter out Hermes internal bytecode frames from error stack traces
Summary:
Changelog: [Fixed][General] Filter out Hermes internal bytecode frames (Promise implementation) from error stack traces

Currently, React Native strips native frames from call stacks reported via ExceptionsManager / LogBox. This diff does the same for *internal bytecode* frames in Hermes, which are functionally similar to native frames: they are implementation details of the engine for which source code isn't readily available.

In particular this change will avoid confusing symbolication tools that may otherwise try to treat `InternalBytecode.js` frames as belonging to the main React Native bundle (and produce garbage output).

Reviewed By: GijsWeterings

Differential Revision: D42367135

fbshipit-source-id: b7904f10c7ff6956e7b736b575dde1ce45028200
2023-01-05 11:05:39 -08:00
Joshua Selbo f723ab002e Change AndroidX provided_deps to deps
Summary: Changelog: [Internal]

Reviewed By: hick209

Differential Revision: D42349731

fbshipit-source-id: df6f54638d57ca31f5e6548fe554911710878c31
2023-01-05 10:38:04 -08:00
Moti Zilberman b4d4e85aa8 Refactor types + tests of parseHermesStack
Summary:
Changelog: [Internal]

* Migrate `parseHermesStack.js` to modern Flow syntax
* Use inline snapshots in `parseHermesStack-test.js`

Reviewed By: jacdebug

Differential Revision: D42367093

fbshipit-source-id: 854b11283729ce9f3c2ea6e3b0c46c7f7a767a56
2023-01-05 07:28:22 -08:00
Riccardo Cipolleschi cb9eaa6db0 Refactor hermes logic to make it branch agnostic (#35709)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35709

This change refactors the logic to choose which version of hermes we have to pick

## Changelog:
[iOS][Changed] - Refactor hermes choosing logic

Reviewed By: cortinico, dmytrorykun

Differential Revision: D42211405

fbshipit-source-id: d19c0f2c523c5596d18a1f904e3b26d96ea1a77a
2023-01-05 06:58:38 -08:00
Ruslan Lesiutin fee9510b2d refactor(ReactNative/Slider): moved iOS sources to internal (#35365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35365

# Changelog:
[iOS][Removed] - removed iOS sources of Slider module

Reviewed By: NickGerleman

Differential Revision: D41069547

fbshipit-source-id: 8faf96701f69e19074fafac45b1c95b939c2b1ac
2023-01-05 06:12:47 -08:00
Ruslan Lesiutin 4c40014d43 refactor(ReactNative/Slider): moved android sources to internal
Summary:
# Changelog:
[Android][Removed] - removed android sources of Slider module

Reviewed By: NickGerleman

Differential Revision: D41062668

fbshipit-source-id: fe628527f757d4fefa8ecf2c0c952aaf8d4acec2
2023-01-05 06:12:47 -08:00
Ruslan Lesiutin 05968d16e1 refactor(react-native-github): internalized Slider JS files
Summary:
# Changelog:
[JS][Removed] - Removed Slider module js files

Reviewed By: NickGerleman

Differential Revision: D40984397

fbshipit-source-id: 8ff451d0f4d821af96c45277956042fa181dd4c5
2023-01-05 06:12:47 -08:00
Ruslan Lesiutin 06cf36bcd4 refactor(rn-tester): removed usages of Slider
Summary:
# Changelog:
[Internal][Removed] - removed usages of Slider inside rn-tester package

Reviewed By: lunaleaps

Differential Revision: D40984396

fbshipit-source-id: 6c623c0972bfdac624368506401cf3200340069f
2023-01-05 06:12:47 -08:00
Ruslan Shestopalyuk 55db1b23ff Better event mapping handling in prop setter (#35775)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35775

[Changelog][Internal]

Follow-up to D42344715 (f70a2f6e38).

I realized that the problem that was fixed there could have been avoided, to begin with, by crafting the corresponding macro more carefully.

This gives both more readable and less fragile code.

Reviewed By: mdvacca

Differential Revision: D42345323

fbshipit-source-id: d4b6d5a95aab360ef0aac3ecb0f157d5325271b6
2023-01-05 02:59:37 -08:00
Zhiyao Zhou e625616118 Revert D42014650: Remove legacy-support-core-ui
Differential Revision:
D42014650 (6fe6d084b0)

Original commit changeset: 4a4cf263fbd8

Original Phabricator Diff: D42014650 (6fe6d084b0)

fbshipit-source-id: 4eb8b6636b4c1672867ba66865c4bcda5421e6a1
2023-01-05 01:22:11 -08:00
Joshua Selbo 6fe6d084b0 Remove legacy-support-core-ui
Summary: Changelog: [Internal]

Reviewed By: hick209

Differential Revision: D42014650

fbshipit-source-id: 4a4cf263fbd8471dd905e53ea8ee6acacae68010
2023-01-04 22:29:53 -08:00
Arushi Kesarwani 9f6b532bdb Changing the Loading View of Android to rely on the native implementation instead of Toast (#35773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35773

Changelog:
[Android][Added] - For supporting Dev Loading View across multiple platforms, changing the Loading View of Android to rely on the native implementation instead of Toast while keeping backwards comptability.

Reviewed By: rshest

Differential Revision: D42286466

fbshipit-source-id: 38749cdbc11208b81a6199467bac00cbc1850c92
2023-01-04 15:01:20 -08:00
Ruslan Shestopalyuk f70a2f6e38 Fix mapping of the "onResponderMove" event via props parsing (#35772)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35772

[Changelog][Internal]

Noticed when looking into the events handling code - this looks like a copy/paste error, presumably introduced in D37050215 (47280de85e).

The correct event name is `onResponderMove`, as evident from all other places in code and the documentation.

Reviewed By: sammy-SC

Differential Revision: D42344715

fbshipit-source-id: fbf1648efaee696edcc7c945ebc0e8423246138b
2023-01-04 14:09:44 -08:00
Luna Wei fdc2836305 Fix processColor ESM for codegen
Summary: Changelog: [Internal] Fix broken usage of `processColor`

Reviewed By: GijsWeterings

Differential Revision: D42346452

fbshipit-source-id: 20be00210f5b68c15292c8a8c1cd918b23fb1fd6
2023-01-04 13:58:40 -08:00
abing 0c53420a7a Fix RCTAlertController not showing when using SceneDelegate on iOS 13.0+ (#35716)
Summary:
On iOS 13.0+, app may use SceneDelegate for multiple windows support or CarPlay support. RCTAlertController can't find the correct root vc in such scene based apps.

## Changelog

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

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

[iOS] [Fixed] - Fix RCTAlertController not showing when using SceneDelegate on iOS 13.0+.

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

Reviewed By: cipolleschi

Differential Revision: D42253653

Pulled By: makovkastar

fbshipit-source-id: ae4e833abca2af7af8028f3af9bd8d3f60ebd392
2023-01-04 11:40:34 -08:00
Liam Xu 2217ea4136 Repair when RCTRedBoxGetEnabled is false , inoperative in RCTExceptio… (#35576)
Summary:
Repair when RCTRedBoxGetEnabled is false , the red box will still be on display,It resolve that I send test-pack to QA with Xcode Archive on DEBUG env.

## Changelog
[General] [Changed] - Append RCTRedBoxGetEnabled() in RCTExceptionsManager.mm

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

Test Plan: Xcode Archive on DEBUG env, the red box will be not on display.

Reviewed By: cipolleschi

Differential Revision: D41809649

Pulled By: skinsshark

fbshipit-source-id: 7d6be3479decf369c415f6a08dec9611b1441b1d
2023-01-04 09:23:38 -08:00
Ruslan Shestopalyuk 21dbc67c03 Use a more robust method of finding out which events to report
Summary:
[Changelog][Internal]

Use the [list of supported events](https://www.w3.org/TR/event-timing/#sec-events-exposed) explicitly to both filter and transform reported event types, which makes this both more robust and less ambiguous.

The mapping is using a compile-time hash/lookup, similarly to how we do it with the ViewProps in the RN core.

Reviewed By: rubennorte

Differential Revision: D42342655

fbshipit-source-id: 3d0b2465fd5611db110c4792913e0a92e76cd067
2023-01-04 08:57:40 -08:00
Ruslan Shestopalyuk 3aea05651d Remove "first-input" event type from Event Timing API logging implementation (#35771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35771

[Changelog][Internal]
Based on the internal discussion, we don't want to report `first-input` event types for RN (just use plain `event` instead), in the way that [Event Timing API standard suggests](https://www.w3.org/TR/event-timing), as this is doesn't have that clear semantics in the context of RN, also to keep it simpler.

Reviewed By: rubennorte

Differential Revision: D42341923

fbshipit-source-id: eff2487dee17ef082604e4c807b4d41485328114
2023-01-04 08:29:15 -08:00
Jakub Piasecki 805b88c7a4 Fix possible `ConcurrentModificationException` when accessing the list of view managers (#35770)
Summary:
With the current implementation, it's possible to get a reference to the list of view managers while it's being populated, which in some cases results in `ConcurrentModificationException` thrown [here](9c57a7f209/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java (L80)). This PR updates the logic, so the reference to the list is updated (and returned) only when it's ready.

## Changelog

[ANDROID] [FIXED] - Fix possible `ConcurrentModificationException` in `UIManagerModuleConstantsHelper::createConstants`

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

Reviewed By: cortinico

Differential Revision: D42342107

Pulled By: rshest

fbshipit-source-id: 8d799535c811edeefa1903fbf7a46bff22691e59
2023-01-04 04:38:38 -08:00
Luna Wei 9c57a7f209 ESM ActivityIndicator
Summary: Changelog: [General][Changed] ActivityIndicator and remove .flow

Reviewed By: yungsters

Differential Revision: D42203449

fbshipit-source-id: 52ab1111166d23b7304e8406f299d23f9fd6f399
2023-01-03 18:09:06 -08:00
Luna Wei 9af5c3330c ESM LogBox
Summary: Changelog: [General][Changed] - ESM Logbox

Reviewed By: yungsters

Differential Revision: D42202344

fbshipit-source-id: 8b09fb261c61bd3fb3ab8df66e5732046187cdd8
2023-01-03 18:09:06 -08:00
Luna Wei b6064495f5 ESM RCTNetworking
Summary: Changelog: [General][Changed] - ESM RCTNetworking

Reviewed By: yungsters

Differential Revision: D42201538

fbshipit-source-id: 26139061550c8c86d02b688fa828d475036ac792
2023-01-03 18:09:06 -08:00
Luna Wei 0aece02cb0 ESM requireNativeComponent
Summary: Changelog: [General][Changed] - ESM requireNativeComponent

Reviewed By: yungsters

Differential Revision: D42200329

fbshipit-source-id: f1120f06362dc25e48551b3f2421bbda7b68c571
2023-01-03 18:09:06 -08:00