Commit Graph
29612 Commits
Author SHA1 Message Date
szymonrybczakandFacebook GitHub Bot d077239fff Upgrade CLI to v12.0.0 (#41249)
Summary:
Related https://github.com/react-native-community/cli/issues/2143

## Changelog:

[General] [Changed] - Upgrade CLI to v12.0.0

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D50810438

Pulled By: lunaleaps

fbshipit-source-id: de96015557019446d268489c5ae534c255b3ddc8
2023-11-04 00:04:33 -07:00
Arushi KesarwaniandFacebook GitHub Bot 361556d649 NIT FabricUIManager (#41319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41319

The comment in FabricUIManager about `invalidate()` being called from JS thread is not relevant.

Even in Bridgeless it's also called from Background Thread: https://www.internalfb.com/code/fbsource/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java?lines=1383

Similarly the tag rename was missed in the rename onCatalystInstanceDestroy -> invalidate.

Changelog:
[Internal] internal

Reviewed By: mdvacca

Differential Revision: D50996760

fbshipit-source-id: 4e4f089474d02b83c0c4667af61277b70f6e08ad
2023-11-03 23:21:10 -07:00
Jorge Luis Calleja AlvaradoandFacebook GitHub Bot b36505bf06 fix: fixed types props tabIndex in view and userSelect in text (#41312)
Summary:
zfrankdesign reported that in RN 0.72.6, they receive warnings that some new props listed in the documents are missing:
View tabIndex https://reactnative.dev/docs/view#tabindex-android and Text userSelect https://reactnative.dev/docs/text#userselect. It seems the components accept these props but they were not typed.

## Changelog:

[GENERAL] [FIXED] - Missing typings for the props `tabIndex` for **View** and `userSelect` in the **Text** props were added.

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

Test Plan:
1. Instantiate a component of type View
   1.1. Should add the property tabIndex to the View component.
   1.2. Should not see a warning about the missing tabIndex property.

2. Instantiate a component of type Text
   2.1. Should add the property userSelect to the Text component.
   2.2. Should not see a warning about the missing userSelect property.

Reviewed By: NickGerleman

Differential Revision: D50982156

Pulled By: lunaleaps

fbshipit-source-id: 75b55cfb897738be0cf426912a7c10c7412d5032
2023-11-03 21:48:03 -07:00
ehsemlohandFacebook GitHub Bot 36ef6460f0 fixed (iOS) setState is not working properly for text inline image #41236 (#41287)
Summary:
Closes https://github.com/facebook/react-native/issues/41236

`setState` is not working properly for text inline image

## Fixed demo (please see the animation as in rendering pass rather than re-mounting pass)

https://github.com/facebook/react-native/assets/149237137/d4b894bf-2283-4963-8dc7-b8f5a9f81315

## How it works

**Background**

Inline views are not included in the Yoga node tree, rather, they are retained as attachments of `NSAttributedString` and are managed by the respective text fragment (`RCTTextShadowView`) that includes them (Code snippet 1).

```
<div layout="width: 393; height: 852; top: 0; left: 0;" style="" >
  <div layout="width: 393; height: 852; top: 0; left: 0;" style="flex: 1; " >
    <div layout="width: 393; height: 852; top: 0; left: 0;" style="flex: 1; " >
      <div layout="width: 393; height: 241; top: 0; left: 0;" style="padding-top: 59px; " >
        <div layout="width: 393; height: 50; top: 59; left: 0;" style="width: 100%; height: 50px; " >
          <div layout="width: 393; height: 17.3333; top: 0; left: 0;" style="" has-custom-measure="true"></div>
        </div>
        <div layout="width: 393; height: 50; top: 109; left: 0;" style="width: 100%; height: 50px; " >
          <div layout="width: 393; height: 17.3333; top: 0; left: 0;" style="" has-custom-measure="true"></div>
        </div>
        /* Text node that does not contain inline view that is supposed to be there */
        <div layout="width: 393; height: 74.3333; top: 167; left: 0;" style="margin-top: 8px; " has-custom-measure="true"></div>
      </div>
    </div>
  </div>
</div>
```
**Code snippet 1, output of  YGNodePrint() in _normal layout_ flow**

The layout of such node is handled ad-hoc (_inline layout_) inside `RCTTextShadowView` (Code snippet 2)

```
/* Inline node is calculated on its own */
<div layout="width: 48; height: 48; top: 0; left: 0;" style="overflow: hidden; width: 48px; height: 48px; min-width: 0px; min-height: 0px; " ></div>
```
**Code snippet 2, output of  YGNodePrint() in _inline layout_ flow**

**Problem description**

The issue happens when the sizes given by `setState()` are smaller than those in the last round `setState()`. Since the `min-width` and `min-height` are already populated (Code snippet 3) with greater values, the new layout pass gives rather a `noop`.

```
/* min sizes are greater than them in the new style */
<div layout="width: 48; height: 48; top: 0; left: 0;" style="overflow: hidden; width: 32px; height: 32px; min-width: 48px; min-height: 48px; " ></div>
```

**Code snippet 3, output of  YGNodePrint() in _inline layout (issue)_ flow**

**Fix description**

This biased `min-width` and `min-height` are given using the **current frame size** (i.e., sizes set in the last round `setState()`) in the _inline layout_ (in `RCTTextShadowView` § Background), whilst the same parameters are given as ~~CGSizeZero~~ `_minimumSize` in _normal layout_ (§ Background).

The change of this PR is to unify this behavior of _normal layout_ by using ~~CGSizeZero~~ `_minimumSize` as the input also for _inline layout_.

## Changelog:

[IOS] [FIXED] - `setState` is not working properly for text inline image

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

Test Plan:
- Using **rn-tester** for basic verification
- Complete plan: https://docs.google.com/spreadsheets/d/1QLuqNvqX0dM4K68ygRoHDR3S0wcK5umptmjoR7KtkaY/edit?usp=sharing

Reviewed By: cipolleschi

Differential Revision: D50967547

Pulled By: NickGerleman

fbshipit-source-id: b3b6d6919fd9d3302977dc771a41c22f7b796ba5
2023-11-03 17:49:05 -07:00
Sam ZhouandFacebook GitHub Bot 2a9caecf31 Deploy 0.220.1 to xplat (#41318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41318

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D50992189

fbshipit-source-id: 0b3b9adfdef6cffbb9f3dacce3ced8b8dbbffc4e
2023-11-03 17:08:45 -07:00
Pieter De BaetsandFacebook GitHub Bot 9b613855eb Remove CxxModuleWrapper.makeDSO (#41309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41309

Changelog: [Internal][Removed] CxxModuleWrapper.makeDSO is not actively used and has been replaced by TurboModule infra.

Reviewed By: NickGerleman

Differential Revision: D50878589

fbshipit-source-id: 9fd11c1ee860ea65f1e985a132de3216ed042752
2023-11-03 12:13:20 -07:00
Samuel SuslaandFacebook GitHub Bot 87c2453120 use c++20 likely and unlikely (#41149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41149

changelog: [internal]

RN now builds with C++ 20 and we can move away from folly::Likely.

More about [[likely]] and [[unlikely]] https://en.cppreference.com/w/cpp/language/attributes/likely

Reviewed By: cipolleschi

Differential Revision: D50540008

fbshipit-source-id: 3a59e814a62f1ee33a6af69a0c88065f23f1ef2b
2023-11-03 08:27:36 -07:00
Rubén NorteandFacebook GitHub Bot aa5141c381 Remove Systrace annotation that is breaking logged data
Summary:
We're logging a systrace section that for some reason is breaking the data in application traces. That section isn't especially relevant so we can just remove it.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50939346

fbshipit-source-id: 350a528d83c6fe6e7100275644d3d02a96700e59
2023-11-03 08:10:58 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot b955fc2a8d chore: update RNTester Cocoapods to 1.13 (#41248)
Summary:
This PR updates the internal version of cocoapods to 1.13, template already uses this version. I've also removed the root folder Gemfile as it's not necessary anymore.

## Changelog:

[INTERNAL] [CHANGED] - Update RNTester Cocoapods to 1.13

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

Test Plan:
Check if cocoapods installs correctly by running:

1. `bundle install`
2. `bundle exec pod install`

Reviewed By: dmytrorykun

Differential Revision: D50972135

Pulled By: cipolleschi

fbshipit-source-id: b7d6a4671e641b7b8f50242a3374f623e023daf4
2023-11-03 07:35:22 -07:00
Pieter De BaetsandFacebook GitHub Bot 80d816a8ee Remove unused reportStackTraces option from FrameRateLogger
Summary:
This is not supported by any native implementation.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D50641812

fbshipit-source-id: e90a1998d2239b6f96c0c4db7b112f7e75cfc6dc
2023-11-03 04:38:20 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot b19386976c Adjust export semantics for WebPerformance symbols (#41300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41300

## Changelog:
[Internal] -
Makes the corresponding module exports more uniform.

Reviewed By: rubennorte

Differential Revision: D50960468

fbshipit-source-id: 11ae849daeba2be38604bed4c678d37188ad1f78
2023-11-03 04:08:49 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 53a2742e13 Remove web performance logging from GlobalPerformanceLogger (#41299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41299

## Changelog:

It makes sense to keep Web Performance logging mechanism separate from the GlobalPerformanceLogger, removing.

Reviewed By: rubennorte

Differential Revision: D50930312

fbshipit-source-id: 3b76ff28eae8c5a2bf41faceb33cf188d8318610
2023-11-02 19:41:46 -07:00
Phillip PanandFacebook GitHub Bot fcda37f6e9 remove warning to tell user to set requiresMainQueueSetup (#41294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41294

Changelog: [Internal]

i believe this warning is outdated, i don't think having a custom initializer or exporting constants means that your module needs to be setup on main.

Reviewed By: cipolleschi

Differential Revision: D50919152

fbshipit-source-id: dc91af5fc88eca4f07a5f35adb888160b978cc38
2023-11-02 17:21:13 -07:00
Phillip PanandFacebook GitHub Bot 1301da8e02 remove unnecessary requiresMainQueueSetup (#41295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41295

Changelog: [Internal]

modules will be setup on main queue for any the following criteria:
- override requiresMainQueueSetup and set it to yes
- have a method that starts with `init`
- have `constantsToExport` implemented

these methods return `NO` but don't fulfill the latter criteria, so we should just delete them

Reviewed By: cipolleschi

Differential Revision: D50919151

fbshipit-source-id: 662bd067a1bae0f81acfabfc95b2a2af0c0a3180
2023-11-02 17:21:13 -07:00
RickandFacebook GitHub Bot a2a219c27e eslint-config: add rule for config to work properly (#41272)
Summary:
add [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign#rule-details) to react-native/eslint-config package.

without this rule, redefine global variable there is no hint,
<img width="462" alt="截屏2023-11-01 14 20 40" src="https://github.com/facebook/react-native/assets/130942798/ff87633d-b1a1-4a8f-9f3f-e2e30f5b87ab">
with this rule enabled:
<img width="648" alt="截屏2023-11-01 14 27 09" src="https://github.com/facebook/react-native/assets/130942798/23ec322f-66e2-49a3-b6df-b3ba2549681b">

platform: vscode@latest, macos@14.0 (23A344)
## Changelog:

[General] [Fixed]  - eslint config global vars redefine there is no message tip

<!-- Help reviewers and the release process by writing your own changelog entry.
- add `no-global-assign` to eslint config to enable globals
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

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

Test Plan: tested locally

Reviewed By: yungsters

Differential Revision: D50893943

Pulled By: cipolleschi

fbshipit-source-id: 2d418e1ca64722ebf48b52c2c0fe36fb392d7cb9
2023-11-02 16:23:56 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 22c4099aef Feature flag removal: isGlobalWebPerformanceLoggerEnabled
Summary:
## Changelog:
[Internal] -

There is no need for this feature flag anymore, cleaning up.

Reviewed By: rubennorte

Differential Revision: D50925309

fbshipit-source-id: 39ff3d1f85c1df5ba2be287d4b7df2a4222acdba
2023-11-02 15:25:43 -07:00
David VaccaandFacebook GitHub Bot d5e1eb8a86 Expose JSEngineResolutionAlgorithm into ReactHost interface
Summary:
Expose JSEngineResolutionAlgorithm into ReactHost interface

This is another step to reduce visibility of ReactHostImpl class and rely only on ReactHost

changelog: [internal] internal

Reviewed By: philIip

Differential Revision: D50910031

fbshipit-source-id: da893ef0574c26bc90867f45b55d5b1e244885fc
2023-11-02 14:52:41 -07:00
George ZaharievandFacebook GitHub Bot 9c135eb928 Update scripts to support AsExpressions
Summary:
Update various scripts to support AsExpressions, found by looking for scripts currently handling `TypeCastExpression`

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D50822952

fbshipit-source-id: c88c04a507d94ddbc6458a68fd36509463e91953
2023-11-02 14:09:03 -07:00
Pieter De BaetsandFacebook GitHub Bot 9240d5160d Merge JSException and JavaScriptException
Summary:
Consolidate JSException and JavaScriptException. `JSException` was only ever created by `JMessageQueueThread`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D50641818

fbshipit-source-id: 46686468891fe1498e17f3b40b619e8c2324d7a9
2023-11-02 12:01:40 -07:00
SunbreakandFacebook GitHub Bot 310a21d0fb fix: remove unused exclude in podspec (#41265)
Summary:
Remove unused `s.exclude_files` since `React-logger.podspec` doesn't include `SampleCxxModule.*`

## Changelog:

[INTERNAL] [FIXED] - remove unused exclude in podspec

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

Test Plan: None

Reviewed By: fkgozali

Differential Revision: D50930461

Pulled By: cipolleschi

fbshipit-source-id: ff6d4b3a9f2258de5c5f8f0448a269c9cc0548e1
2023-11-02 09:54:33 -07:00
Saúl Ibarra CorretgéandFacebook GitHub Bot 79eac9666d Fix running iOS timers when the proximity sensor is engaged (#41262)
Summary:
When the proximity sensor is engaged and it detects "close", the screen is disabled so timers stop working. Treat the close proximity status as if the app went into the background so CADisplayLink based timers are not used.

bypass-github-export-checks

## Changelog:

[iOS] [Fixed] - Fix running timers when the proximity sensor detects close

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

Reviewed By: dmytrorykun

Differential Revision: D50839017

Pulled By: cipolleschi

fbshipit-source-id: 3f7dc47d346eb88b687c8219fc905cf2a42262fe
2023-11-02 09:48:50 -07:00
zhongwuzwandFacebook GitHub Bot a257e9f5f0 Fixes Dev menu pop up multiple times when Tap command D continuously (#41234)
Summary:
Fixes Dev menu pop up multiple times when Tap command `D` continuously, demo like below:
https://github.com/facebook/react-native/assets/5061845/b4c2b38d-ece6-4d4e-a823-23eaa7cad001

## Changelog:

[IOS] [FIXED] - Fixes Dev menu pop up multiple times when Tap command `D` continuously

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

Test Plan: Press `D` continuously, the menu pop up and dismiss correctly.

Reviewed By: cipolleschi

Differential Revision: D50925959

Pulled By: blakef

fbshipit-source-id: 50fac9b4cea94c15a06ebc1b6092ebc9909cd9d2
2023-11-02 07:39:30 -07:00
Gabriel DonadelandFacebook GitHub Bot d6163d7f43 Update ios pod post_install logic for detecting if hermes is enabled (#41286)
Summary:
Follow up of https://github.com/facebook/react-native/pull/41284#issuecomment-1789516046

We should not rely on  checking if the `React-hermes` pod is present to determine if hermes is enabled

## Changelog:

[IOS] [CHANGED] - Update ios pod post_install logic for detecting if hermes is enabled

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

Test Plan: Run `use_react_native!(hermes => false)` should not add `USE_HERMES = true;` to `project.pbxproj`

Reviewed By: blakef

Differential Revision: D50899654

Pulled By: cipolleschi

fbshipit-source-id: a5ab5b0117c61014e77b780c50bf349da92c6342
2023-11-02 07:26:02 -07:00
Arushi KesarwaniandFacebook GitHub Bot f3474cc8a1 Changing interface of UIManagerProvider to be a functional interface for the return type of getUIManagerProvider()
Summary:
Changing interface of UIManagerProvider to be a [functional(SAM) interface](https://kotlinlang.org/docs/fun-interfaces.html) for the return type of getUIManagerProvider() to be used in various apps for clarity.

Changelog:
[Internal] internal

Reviewed By: javache

Differential Revision: D50846818

fbshipit-source-id: c22977b45b0118d70b994e14ff79ea8990248e3c
2023-11-01 18:32:42 -07:00
David VaccaandFacebook GitHub Bot cf305772c3 Refactor gating that tests removal of ReactModuleInfoProvider in TurboModule system
Summary:
Refactor gating that tests removal of ReactModuleInfoProvider in TurboModule system

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D50895575

fbshipit-source-id: c9050fcc22bcb2b23208a31a05b3367909094f33
2023-11-01 15:44:14 -07:00
Gabriel DonadelandFacebook GitHub Bot 0f8a83eb49 Fix ios pod post_install logic for detecting if fabric is enabled (#41284)
Summary:
There is a problem in the way that we check if Fabric is enabled inside `react_native_post_install`.

https://github.com/facebook/react-native/blob/899e7cdb55197fc17a96a93af4f8bcc7519553c2/packages/react-native/scripts/react_native_pods.rb#L239

We're determining if fabric is enabled by checking if the `React-Fabric pod `is present, but since we always call `setup_fabric!(:react_native_path => prefix)`  (https://github.com/facebook/react-native/pull/39057) inside `use_react_native` the `React-Fabric` pod is always present causing the `-DRN_FABRIC_ENABLED` flag to always be added to `project.pbxproj` even if the new arch is disabled.

## Changelog:

[IOS] [FIXED] - Fix ios pod post_install logic for detecting if fabric is enabled

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

Test Plan: Run `use_react_native!(fabric => false)` should not add the `-DRN_FABRIC_ENABLED` flag to `project.pbxproj`

Reviewed By: fkgozali

Differential Revision: D50896487

Pulled By: cipolleschi

fbshipit-source-id: 78154407ce52b09fd3a317b7dc64bd4bba56363e
2023-11-01 13:43:34 -07:00
Intl SchedulerandFacebook GitHub Bot e532f1f43f translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907942942108
Sandcastle Job Instance ID: 18014399606455255
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D50895724

fbshipit-source-id: 7379382ab183884c49b64511ff0b9f782ec1ee09
2023-11-01 12:14:27 -07:00
Arushi KesarwaniandFacebook GitHub Bot 4d12b0bfe4 Kotlinfy UIManagerProvider
Summary:
UIManagerProvider.java -> UIManager.kt so as to take advantage of Functional SAM interfaces of Kotlin for simplication

Changelog:
[Internal] internal

Reviewed By: rshest

Differential Revision: D50855256

fbshipit-source-id: 352edb39f019446c2ddae88a914c898f46239fce
2023-11-01 11:58:58 -07:00
Phillip PanandFacebook GitHub Bot f513a883ed setup test to use custom queue for RCTNetworking operations instead of module queue (#41251)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41251

Changelog: [Internal]

remerge of https://github.com/facebook/react-native/pull/41183

>in my quest to get rid of all synthesized methodQueues, we have RCTNetworking which uses it internally as well as exposes its underlying execution queue. in this diff, i add a config that replaces that queue with one that is managed by the module itself instead of the one generated by the infra.
this is the last one!

Reviewed By: cipolleschi

Differential Revision: D50764523

fbshipit-source-id: 442f3a9f112409f2f05c69c0aa8391c04e8b0173
2023-11-01 11:24:57 -07:00
Phillip PanandFacebook GitHub Bot 052d20058b mark init as designated initializer for RCTNetworking (#41252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41252

Changelog: [Internal]

let's add compile time guarantee that `RCTNetworking` must go thru `initWithDisabledObservation`.

Reviewed By: cipolleschi

Differential Revision: D50764524

fbshipit-source-id: fcc92411b26343bd5977dbfa1b2e95f0841e4ac8
2023-11-01 11:24:57 -07:00
TatianaKaposandFacebook GitHub Bot 695a30d6b4 Fix windows 4018 and 4244 compiler warnings (#41254)
Summary:
Windows had to remove some previously suppressed compiler warnings and fork `ShadowNode.cpp` and `RawPropsParser.cpp` (See: https://github.com/microsoft/react-native-windows/issues/12300) to fix them. This PR adds the right data types and static casts to get rid of the compiler warnings.

## Changelog:

[GENERAL] [FIXED] - Fix windows 4018 and 4244 compiler warnings

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

Test Plan: tested in RNW Repository

Reviewed By: rshest

Differential Revision: D50820705

Pulled By: rozele

fbshipit-source-id: fa61f7ca428d31fc6be56c80215246ee2bdfc67c
2023-11-01 11:06:06 -07:00
Gijs WeteringsandFacebook GitHub Bot f3a916f3ae Back out "Apply Babel arrow transform only when needed" (#41282)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41282

Original commit changeset: ad96540bb777

Original Phabricator Diff: D50818568

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D50885400

fbshipit-source-id: b5039b6430e48a3b87456758bf4fef6cc182ee8f
2023-11-01 09:22:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7e7fefd2c1 Fix Ruby installation (#41263)
Summary:
Starting from Monday, Ruby jobs using Xcode 14.1 started failing on PRs but not on main.
While CircleCI is investigating why this is happening, we found a way to make sure that we can install Ruby even when the cache misses.

## Changelog:
[Internal] - Make sure we can install ruby 3.2.0 when rbenv cache misses.

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

Test Plan: CircleCI is green

Reviewed By: blakef

Differential Revision: D50885897

Pulled By: cipolleschi

fbshipit-source-id: 9a452fd24d779cc14c86c7a8a4e3bf8ec62d0ceb
2023-11-01 09:00:07 -07:00
Fabrizio CucciandFacebook GitHub Bot 0c0d02298e Drop $TEMPORARY from PermissionsAndroid results (#41280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41280

This is probably just an old Flow artifact?

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D50879201

fbshipit-source-id: da7dec248e8dd50b8e824b09ed8f37294b69ed98
2023-11-01 08:10:20 -07:00
Pieter De BaetsandFacebook GitHub Bot 285629922c Rollout enableCloseVisibleGapBetweenPaths
Summary:
This has been fully rolled out internally.

Changelog: [Fixed] Rolls out rounded view rendering improvements introduced in D39979567

Reviewed By: NickGerleman

Differential Revision: D50641814

fbshipit-source-id: 8e4dc470ca8716444c5bd88ae0e76754dc7acf37
2023-11-01 05:49:20 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ecffc4d40c Update node installation on debian (#41274)
Summary:
Instruction to install node on Debiam machine [has changed](https://github.com/nodesource/distributions#new-update-%EF%B8%8F) and the previous script cannot be used anymore.
This change updates it.

## Changelog:
[Internal] - Fix CI

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

Test Plan: CircleCI is green

Reviewed By: rshest

Differential Revision: D50879481

Pulled By: cipolleschi

fbshipit-source-id: a1d2a3b06c42587e168d66746e2ccb2959c0f9e0
2023-11-01 03:29:50 -07:00
Sam ZhouandFacebook GitHub Bot edcee71318 Deploy 0.220.0 to xplat (#41246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41246

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D50793514

fbshipit-source-id: 33ac73116e94c7dbf892afa9b6bb26a456c0c4b0
2023-10-31 21:35:31 -07:00
David VaccaandFacebook GitHub Bot c66ca47f2b Back out "Add support for legacy UIManager in UIManagerHelper"
Summary:
Original commit changeset: 93eba1eb3106

Original Phabricator Diff: D50694805

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D50853438

fbshipit-source-id: 687cb100dfea28f3ea63812e1dd5b21e4c8ceb0e
2023-10-31 20:23:36 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot ace81ff7d8 feat(iOS): remove usages of UIScreen mainScreen for Trait collections (#41214)
Summary:
The goal of this PR is to migrate from deprecated `[UIScreen mainScreen]` and get the `displayScale` from currentTraitCollection. Both of those return the same values.

## Changelog:

[IOS] [CHANGED] - retrieve screen scale from trait collection instead of UIScreen mainScreen

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

Test Plan:
Go to Dimensions example and check that everything works as expected

### Before

<img src="https://github.com/facebook/react-native/assets/52801365/53141e67-63e2-4c3b-818e-6a232aae8a5b" height="500" />

### After

<img src="https://github.com/facebook/react-native/assets/52801365/33728fce-0298-459c-b63e-a0b8ea34bde1" height="500" />

Reviewed By: NickGerleman

Differential Revision: D50736794

Pulled By: javache

fbshipit-source-id: d512cba1120204be95caf43ac9916f6597e2ccc8
2023-10-31 17:57:56 -07:00
Nick GerlemanandFacebook GitHub Bot 817fedb0e7 Bail on hiPri render on missing layout data before checking priority (#41270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41270

`scheduleCellsToRenderUpdate()` is called in response to new measurements, or component changes. It has logic to decide whether to immediately calculate new state, or to defer it until a later batched period.

It will not immediately update state if we don't yet have measurements for cells, but this condition is after another which calculates priority, relying on these measurements. These are garbage if we don't yet have measurements, and trigger an invariant violation in horizontal RTL.

This switches around the conditions, to avoid offset resolution if we don't yet have valid measurements.

I suspect some "hiPri" renders where cells shift are bugged right now when we update state in response to content size change, before we have new corresponding cell layouts.

Changelog:
[General][Fixed] - Bail on hiPri render on missing layout data before checking priority

Reviewed By: yungsters

Differential Revision: D50791506

fbshipit-source-id: 8dbffc37edd2a42f7842c0090d344dcd6f3e3c6d
2023-10-31 16:49:58 -07:00
Cody BennettandFacebook GitHub Bot 572dd76ba0 Revert "BlobManager: implement Blob from ArrayBuffer (#39276)" (#41170)
Summary:
As per https://github.com/facebook/react-native/issues/41079, we're outputting ASCII encoded data URIs to `FileReader.readAsDataURL` due to lack of native `ArrayBuffer` support and unclear use of encoding to align with web. I'll revisit this at a later point with a better testing strategy once we have a good idea of how this should behave internally.

Aside from purely reverting https://github.com/facebook/react-native/issues/39276, I've kept the use of `ArrayBuffer.isView(part)` to the previous `part instanceof global.ArrayBufferView` since it is more correct.

## Changelog:

[INTERNAL] [REMOVED] - Revert Blob from ArrayBuffer

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

Test Plan:
Run the following at the project root to selectively test changes:

`jest packages/react-native/Libraries/Blob`

Reviewed By: cipolleschi

Differential Revision: D50601036

Pulled By: dmytrorykun

fbshipit-source-id: 0ef5c960c253db255c2f8532ea1f44111093706c
2023-10-31 11:58:27 -07:00
Nikita LutsenkoandFacebook GitHub Bot 37e509f2b6 rn-android | Allow injecting a custom ChoreographerProvider via ReactNativeHost into construction of ReactInstanceManager.
Summary:
Further propagating extension to the Android choreographer, now allowing to override it from the perspective of ReactNativeHost/ReactInstanceManager(Builder).

Changelog:
[Android][Added] ReactChoreographer can now use an implementation substitution instead of relying on android.view.Choreographer directly.

Reviewed By: javache

Differential Revision: D50827973

fbshipit-source-id: 42efaa3ece2c2b45fe4ee04a4bbc87c9d59132c8
2023-10-31 11:51:09 -07:00
Nikita LutsenkoandFacebook GitHub Bot 751f7e97ba rn-android | Add abstraction layer between ReactChoreographer and android.view.Choreographer that allows substituting current implementation.
Summary:
We want to have an extension point for choreographer, so we can override default behavior and have either rate-limiting, or testing or other form of manual control.
For all those cases allow substitution of choreographer that ReactChoreographer would use by default with a custom one.

Changelog:
[Android][Added] ReactChoreographer can now use an implementation substitution instead of relying on android.view.Choreographer directly.

Reviewed By: javache

Differential Revision: D50827975

fbshipit-source-id: 0fd78e1f4f96ffd832e5d8cdc6c805f9a9e272cf
2023-10-31 11:51:09 -07:00
Samuel SuslaandFacebook GitHub Bot ae85be3e92 remove const from UIManager::createNode and UIManager::cloneNode
Summary:
changelog: [internal]

These shadow nodes are freshly created and unsealed. Return non-const.

Reviewed By: NickGerleman

Differential Revision: D50796024

fbshipit-source-id: 6e2a61bb03efbc6f63a489928787e645971780df
2023-10-31 09:58:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 475b835e43 Add Hermes Xcode integration test to GH Actions (#41187)
Summary:
After disabling the E2E tests, we lost a test that was verifying that Hermes works well with the latest version of React Native for iOS
This change introduce this test back in GH actions

## Changelog:
[Internal] Add tests for Hermes-Xcode integration to GH Actions

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

Test Plan: CI is green 🤞

Reviewed By: NickGerleman

Differential Revision: D50737860

Pulled By: cipolleschi

fbshipit-source-id: f4bc09be879af7aba0ca42f1b7e407a5d5dc0986
2023-10-31 09:37:24 -07:00
Ruslan LesiutinandFacebook GitHub Bot a286f00073 refactor(getInspectorDataForViewAtPoint): listen to attached renderers (#41202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41202

Changelog: [Internal]

Previous implementation only works because `getInspectorDataForViewAtPoint.js` module is evaluated once `Inspector` component is renderered, which is DEV-only and [imported with inline require](https://www.internalfb.com/code/fbsource/[86a4c61a19ad]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/AppContainer.js?lines=72).

This also depends on React DevTools' hook being injected.

With these changes, `getInspectorDataForViewAtPoint` can be evaluated at startup, and it also listens to potential renderers attached later

Reviewed By: NickGerleman

Differential Revision: D50649867

fbshipit-source-id: c67426da313a80d7d57c918fe1d177ec685d753a
2023-10-31 09:06:21 -07:00
Pieter De BaetsandFacebook GitHub Bot b35914de38 Remove references to global.nativeExtensions (#41260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41260

This was introduced some experiments which are no longer relevant.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D50736166

fbshipit-source-id: 7c9ff571112127e6a9e317113c05c30483626076
2023-10-31 08:26:28 -07:00
Peter AbbondanzoandFacebook GitHub Bot e8d622e9d1 Fix an issue where the status bar colors would not match when opening modals (#40979)
Summary:
The current ReactModalHostView implementation incorrectly applies system bar appearances by providing the wrong mask to the `setSystemBarsAppearance` method invocation. Per [this issue comment](https://github.com/facebook/react-native/issues/34350#issuecomment-1760339877), jaydonlau correctly identified that when the status bar is set to `light-content` (light icons, dark background), the function is called with both a `0` appearance and `0` mask, which should instead be provided with the `APPEARANCE_LIGHT_STATUS_BARS` mask.

The first pass at this PR attempted to pull out the entire appearance from the activity, compare it against the dialog's appearance, and only use a mask of differing bits (see the `appearanceMask` variable). However, if the `android:windowLightStatusBar` attribute is ever set to true, this does not impact the appearance of the status bar but rather the system UI visibility. As a result, the derived mask from system bars appearance would be 0 since both the activity and dialog would have appearances of 0.

Rather than try and "future-proof" this implementation for other uses of system bar appearance, this change is directed only at updating the `APPEARANCE_LIGHT_STATUS_BARS` bit in the dialog's system bar appearance. The only other native code that touches status bars is the `StatusBarModule` and that only touches this flag.

This is a follow-up to https://github.com/facebook/react-native/issues/34899.

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

[ANDROID] [FIXED] - Fixed an issue where the status bar colors would not match when opening modals

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

Test Plan:
First test:
- Replace the `RNTesterAppShared` implementation with the implementation from [this Expo snack](https://snack.expo.dev/abbondanzo/status-bar-tester)
- Toggle the status bar to show dark icons, open the modal and ensure that dark icons are displayed
- Toggle the status bar to show light icons, open the modal and ensure that light icons are displayed

Second test:
- Set the `android:windowLightStatusBar` attribute to true in the `AppTheme`
- Follow the steps from the First test above, guaranteeing that status bar appearance overrides the theme

Reviewed By: NickGerleman

Differential Revision: D50329714

Pulled By: luluwu2032

fbshipit-source-id: 26ecaca05f8e00a52e13767e468b552ac167fc98
2023-10-31 07:22:26 -07:00
Pieter De BaetsandFacebook GitHub Bot dd694ec22e Remove unreferenced ParseUnhandledJSErrorStackNatively flag (#41239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41239

The experiment this covered was backed out and never re-landed (see D40387938).

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D50641810

fbshipit-source-id: 6f92c46a37a07029ef2aa56ebf9b69e0503bb2cd
2023-10-31 07:09:46 -07:00
Pieter De BaetsandFacebook GitHub Bot da5eb3efe3 Rollout RCTValidateCanSendEventInRCTEventEmitter (#41261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41261

Replaces a previous soft error with an RCTAssert.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D50641816

fbshipit-source-id: 06ef83d058169b3a73ad8179a778d32dff8db80d
2023-10-31 07:09:46 -07:00